summaryrefslogtreecommitdiffstats
path: root/library/button.tcl
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-09-02 17:02:52 (GMT)
committerhobbs <hobbs>1999-09-02 17:02:52 (GMT)
commit2abe00f21824a55ee6096189dc4979ca29af2e2e (patch)
treeccf3e977fda229d63d171853a7b5e3c8e3564996 /library/button.tcl
parentb598f1d55d8f6a4aefb4d53d8639f8f04bf94cf2 (diff)
downloadtk-2abe00f21824a55ee6096189dc4979ca29af2e2e.zip
tk-2abe00f21824a55ee6096189dc4979ca29af2e2e.tar.gz
tk-2abe00f21824a55ee6096189dc4979ca29af2e2e.tar.bz2
1999-09-01 Jeff Hobbs <hobbs@scriptics.com>
* library/msgbox.tcl: changed the behavior of tk_messageBox on Unix to be more Windows like in handling of <Return> and the default button * library/button.tcl: * library/clrpick.tcl: * library/comdlg.tcl: * library/console.tcl: * library/dialog.tcl: * library/entry.tcl: * library/focus.tcl: * library/listbox.tcl: * library/menu.tcl: * library/msgbox.tcl: * library/palette.tcl: * library/safetk.tcl: * library/scale.tcl: * library/scrlbar.tcl: * library/tearoff.tcl: * library/text.tcl: * library/tk.tcl: * library/tkfbox.tcl: * library/xmfbox.tcl: updated commands to use [string] ops instead of expr equality operators
Diffstat (limited to 'library/button.tcl')
-rw-r--r--library/button.tcl28
1 files changed, 14 insertions, 14 deletions
diff --git a/library/button.tcl b/library/button.tcl
index 7c33bc2..8feeba8 100644
--- a/library/button.tcl
+++ b/library/button.tcl
@@ -4,7 +4,7 @@
# checkbutton, and radiobutton widgets and provides procedures
# that help in implementing those bindings.
#
-# RCS: @(#) $Id: button.tcl,v 1.5 1999/08/09 16:52:06 hobbs Exp $
+# RCS: @(#) $Id: button.tcl,v 1.6 1999/09/02 17:02:52 hobbs Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -143,7 +143,7 @@ if {[string match "windows" $tcl_platform(platform)]} {
proc tkButtonEnter w {
global tkPriv
if {[string compare [$w cget -state] "disabled"] \
- && ![string compare $tkPriv(buttonWindow) $w]} {
+ && [string equal $tkPriv(buttonWindow) $w]} {
$w configure -state active -relief sunken
}
set tkPriv(window) $w
@@ -164,7 +164,7 @@ proc tkButtonLeave w {
if {[string compare [$w cget -state] "disabled"]} {
$w configure -state normal
}
- if {![string compare $tkPriv(buttonWindow) $w]} {
+ if {[string equal $tkPriv(buttonWindow) $w]} {
$w configure -relief $tkPriv(relief)
}
set tkPriv(window) ""
@@ -182,7 +182,7 @@ proc tkButtonLeave w {
proc tkCheckRadioEnter w {
global tkPriv
if {[string compare [$w cget -state] "disabled"] \
- && ![string compare $tkPriv(buttonWindow) $w]} {
+ && [string equal $tkPriv(buttonWindow) $w]} {
$w configure -state active
}
set tkPriv(window) $w
@@ -234,10 +234,10 @@ proc tkCheckRadioDown w {
proc tkButtonUp w {
global tkPriv
- if {![string compare $tkPriv(buttonWindow) $w]} {
+ if {[string equal $tkPriv(buttonWindow) $w]} {
set tkPriv(buttonWindow) ""
$w configure -relief $tkPriv(relief)
- if {![string compare $tkPriv(window) $w]
+ if {[string equal $tkPriv(window) $w]
&& [string compare [$w cget -state] "disabled"]} {
$w configure -state normal
uplevel #0 [list $w invoke]
@@ -265,7 +265,7 @@ proc tkButtonEnter {w} {
global tkPriv
if {[string compare [$w cget -state] "disabled"]} {
$w configure -state active
- if {![string compare $tkPriv(buttonWindow) $w]} {
+ if {[string equal $tkPriv(buttonWindow) $w]} {
$w configure -state active -relief sunken
}
}
@@ -287,7 +287,7 @@ proc tkButtonLeave w {
if {[string compare [$w cget -state] "disabled"]} {
$w configure -state normal
}
- if {![string compare $tkPriv(buttonWindow) $w]} {
+ if {[string equal $tkPriv(buttonWindow) $w]} {
$w configure -relief $tkPriv(relief)
}
set tkPriv(window) ""
@@ -321,10 +321,10 @@ proc tkButtonDown w {
proc tkButtonUp w {
global tkPriv
- if {![string compare $w $tkPriv(buttonWindow)]} {
+ if {[string equal $w $tkPriv(buttonWindow)]} {
set tkPriv(buttonWindow) ""
$w configure -relief $tkPriv(relief)
- if {![string compare $w $tkPriv(window)] \
+ if {[string equal $w $tkPriv(window)] \
&& [string compare [$w cget -state] "disabled"]} {
uplevel #0 [list $w invoke]
}
@@ -350,7 +350,7 @@ if {[string match "macintosh" $tcl_platform(platform)]} {
proc tkButtonEnter {w} {
global tkPriv
if {[string compare [$w cget -state] "disabled"]} {
- if {![string compare $w $tkPriv(buttonWindow)]} {
+ if {[string equal $w $tkPriv(buttonWindow)]} {
$w configure -state active
}
}
@@ -369,7 +369,7 @@ proc tkButtonEnter {w} {
proc tkButtonLeave w {
global tkPriv
- if {![string compare $w $tkPriv(buttonWindow)]} {
+ if {[string equal $w $tkPriv(buttonWindow)]} {
$w configure -state normal
}
set tkPriv(window) ""
@@ -402,10 +402,10 @@ proc tkButtonDown w {
proc tkButtonUp w {
global tkPriv
- if {![string compare $w $tkPriv(buttonWindow)]} {
+ if {[string equal $w $tkPriv(buttonWindow)]} {
$w configure -state normal
set tkPriv(buttonWindow) ""
- if {![string compare $w $tkPriv(window)]
+ if {[string equal $w $tkPriv(window)]
&& [string compare [$w cget -state] "disabled"]} {
uplevel #0 [list $w invoke]
}