diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2008-05-14 18:59:09 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2008-05-14 18:59:09 +0000 |
commit | 80c4a79bab566d22c8268670d1e468a07cf1034f (patch) | |
tree | 31ef2f243ce854dccc95b0feeb0acd716eb09dd5 /packages | |
parent | 75abf230054a8c918ae323652f9a3cd798ee3159 (diff) |
added Home/End suport to object/message boxes (and emacs home end on Mac OS X, since that is a standard binding), patch #1964023
svn path=/trunk/; revision=9804
Diffstat (limited to 'packages')
-rw-r--r-- | packages/patches/add_home_end_to_obj_boxes-0.41.4.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/packages/patches/add_home_end_to_obj_boxes-0.41.4.patch b/packages/patches/add_home_end_to_obj_boxes-0.41.4.patch new file mode 100644 index 00000000..e280d984 --- /dev/null +++ b/packages/patches/add_home_end_to_obj_boxes-0.41.4.patch @@ -0,0 +1,32 @@ +Index: u_main.tk +=================================================================== +--- u_main.tk (revision 9725) ++++ u_main.tk (working copy) +@@ -3332,7 +3332,7 @@ + # if {$font < 13} {set fontname [format -*-courier-bold----%d-* $font]} + # if {$font >= 13} {set fontname [format -*-courier-----%d-* $font]} + +- global pd_fontlist ++ global pd_fontlist pd_nt + switch -- $font { + 8 { set typeface [lindex $pd_fontlist 0] } + 9 { set typeface [lindex $pd_fontlist 1] } +@@ -3346,9 +3346,16 @@ + 36 { set typeface [lindex $pd_fontlist 9] } + } + +- $canvasname create text $x $y \ +- -font $typeface \ ++ $canvasname create text $x $y -font $typeface \ + -tags $myname -text $text -fill $color -anchor nw ++ $canvasname bind $myname <Home> [concat $canvasname icursor $myname 0] ++ $canvasname bind $myname <End> [concat $canvasname icursor $myname end] ++ if {$pd_nt == 2} { # emacs bindings for Mac OS X ++ $canvasname bind $myname <Control-a> \ ++ [concat $canvasname icursor $myname 0] ++ $canvasname bind $myname <Control-e> \ ++ [concat $canvasname icursor $myname end] ++ } + # pd [concat $myname size [$canvasname bbox $myname] \;] + } + |