diff options
author | dkf <dkf@noemail.net> | 2005-07-25 09:05:58 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2005-07-25 09:05:58 (GMT) |
commit | 5823e7fe9bef0d239ad9f95d9c6b2156b03595aa (patch) | |
tree | 500381c93622d097f72623503a4192b8a2313845 /library/spinbox.tcl | |
parent | 3d7b2be382c2e5fe292b2c8e99edbb086d09eda1 (diff) | |
download | tk-5823e7fe9bef0d239ad9f95d9c6b2156b03595aa.zip tk-5823e7fe9bef0d239ad9f95d9c6b2156b03595aa.tar.gz tk-5823e7fe9bef0d239ad9f95d9c6b2156b03595aa.tar.bz2 |
Apply some of the changes suggested in [Patch 1237759]
FossilOrigin-Name: f4f7febb1fd0d382ec64762edd93acd98eedff6f
Diffstat (limited to 'library/spinbox.tcl')
-rw-r--r-- | library/spinbox.tcl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/library/spinbox.tcl b/library/spinbox.tcl index d8d2d8a..f470888 100644 --- a/library/spinbox.tcl +++ b/library/spinbox.tcl @@ -4,7 +4,7 @@ # procedures that help in implementing those bindings. The spinbox builds # off the entry widget, so it can reuse Entry bindings and procedures. # -# RCS: @(#) $Id: spinbox.tcl,v 1.8 2004/10/19 18:56:01 jenglish Exp $ +# RCS: @(#) $Id: spinbox.tcl,v 1.9 2005/07/25 09:06:00 dkf Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -217,13 +217,13 @@ bind Spinbox <Escape> {# nothing} bind Spinbox <Return> {# nothing} bind Spinbox <KP_Enter> {# nothing} bind Spinbox <Tab> {# nothing} -if {[string equal [tk windowingsystem] "aqua"]} { - bind Spinbox <Command-KeyPress> {# nothing} +if {[tk windowingsystem] eq "aqua"} { + bind Spinbox <Command-KeyPress> {# nothing} } # On Windows, paste is done using Shift-Insert. Shift-Insert already # generates the <<Paste>> event, so we don't need to do anything here. -if {[string compare $tcl_platform(platform) "windows"]} { +if {$tcl_platform(platform) ne "windows"} { bind Spinbox <Insert> { catch {::tk::EntryInsert %W [::tk::GetSelection %W PRIMARY]} } @@ -500,7 +500,9 @@ proc ::tk::spinbox::MouseSelect {w x {cursor {}}} { proc ::tk::spinbox::Paste {w x} { $w icursor [::tk::spinbox::ClosestGap $w $x] catch {$w insert insert [::tk::GetSelection $w PRIMARY]} - if {[string equal "disabled" [$w cget -state]]} {focus $w} + if {"disabled" eq [$w cget -state]} { + focus $w + } } # ::tk::spinbox::Motion -- |