diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-10 07:04:29 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-10 07:04:29 (GMT) |
commit | 8a4797c9a16ff548b9d7a02b28ac8df76bdb2ff0 (patch) | |
tree | c6598344952695d555c707c547fb77fe6c119688 /library/tearoff.tcl | |
parent | 3018d78340026597655745f383e8f4c2e4e9505d (diff) | |
download | tk-8a4797c9a16ff548b9d7a02b28ac8df76bdb2ff0.zip tk-8a4797c9a16ff548b9d7a02b28ac8df76bdb2ff0.tar.gz tk-8a4797c9a16ff548b9d7a02b28ac8df76bdb2ff0.tar.bz2 |
Minor bindings cleanup. Some removal of "expr" when we can do without it. Some KeyPress -> Key changes (which are synonymes). Some implicit <Button-1> specifications in stead of simply <1> (making clear this is not a binding to the "1" key).
Diffstat (limited to 'library/tearoff.tcl')
-rw-r--r-- | library/tearoff.tcl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/tearoff.tcl b/library/tearoff.tcl index c2d2d6b..4c8b404 100644 --- a/library/tearoff.tcl +++ b/library/tearoff.tcl @@ -39,7 +39,7 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} { # Shift by height of tearoff entry minus height of window titlebar catch {incr y [expr {[$w yposition 1] - 16}]} # Avoid the native menu bar which sits on top of everything. - if {$y < 22} { set y 22 } + if {$y < 22} {set y 22} } } @@ -155,9 +155,9 @@ proc ::tk::MenuDup {src dst type} { while {[set index [string first $src $tags]] != -1} { if {$index > 0} { - append x [string range $tags 0 [expr {$index - 1}]]$dst + append x [string range $tags 0 $index-1]$dst } - set tags [string range $tags [expr {$index + $srcLen}] end] + set tags [string range $tags $index+$srcLen end] } append x $tags @@ -172,10 +172,10 @@ proc ::tk::MenuDup {src dst type} { while {[set index [string first $event $script]] != -1} { if {$index > 0} { - append x [string range $script 0 [expr {$index - 1}]] + append x [string range $script 0 $index-1] } append x $dst - set script [string range $script [expr {$index + $eventLen}] end] + set script [string range $script $index+$eventLen end] } append x $script |