summaryrefslogtreecommitdiffstats
path: root/library/listbox.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/listbox.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/listbox.tcl')
-rw-r--r--library/listbox.tcl24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/listbox.tcl b/library/listbox.tcl
index d273a28..341f108 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk listbox widgets
# and provides procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: listbox.tcl,v 1.6 1999/08/09 16:52:06 hobbs Exp $
+# RCS: @(#) $Id: listbox.tcl,v 1.7 1999/09/02 17:02:52 hobbs Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
@@ -136,7 +136,7 @@ bind Listbox <Shift-Control-End> {
tkListboxDataExtend %W [%W index end]
}
bind Listbox <<Copy>> {
- if {![string compare [selection own -displayof %W] "%W"]} {
+ if {[string equal [selection own -displayof %W] "%W"]} {
clipboard clear -displayof %W
clipboard append -displayof %W [selection get -displayof %W]
}
@@ -162,7 +162,7 @@ bind Listbox <Control-slash> {
bind Listbox <Control-backslash> {
if {[string compare [%W cget -selectmode] "browse"]} {
%W selection clear 0 end
- event generate %W <<ListboxSelect>>
+ event generate %W <<ListboxSelect>>
}
}
@@ -197,7 +197,7 @@ bind Listbox <MouseWheel> {
proc tkListboxBeginSelect {w el} {
global tkPriv
- if {![string compare [$w cget -selectmode] "multiple"]} {
+ if {[string equal [$w cget -selectmode] "multiple"]} {
if {[$w selection includes $el]} {
$w selection clear $el
} else {
@@ -280,7 +280,7 @@ proc tkListboxMotion {w el} {
# one under the pointer). Must be in numerical form.
proc tkListboxBeginExtend {w el} {
- if {![string compare [$w cget -selectmode] "extended"]} {
+ if {[string equal [$w cget -selectmode] "extended"]} {
if {[$w selection includes anchor]} {
tkListboxMotion $w $el
} else {
@@ -304,7 +304,7 @@ proc tkListboxBeginExtend {w el} {
proc tkListboxBeginToggle {w el} {
global tkPriv
- if {![string compare [$w cget -selectmode] "extended"]} {
+ if {[string equal [$w cget -selectmode] "extended"]} {
set tkPriv(listboxSelection) [$w curselection]
set tkPriv(listboxPrev) $el
$w selection anchor $el
@@ -313,7 +313,7 @@ proc tkListboxBeginToggle {w el} {
} else {
$w selection set $el
}
- event generate $w <<ListboxSelect>>
+ event generate $w <<ListboxSelect>>
}
}
@@ -365,7 +365,7 @@ proc tkListboxUpDown {w amount} {
browse {
$w selection clear 0 end
$w selection set active
- event generate $w <<ListboxSelect>>
+ event generate $w <<ListboxSelect>>
}
extended {
$w selection clear 0 end
@@ -373,7 +373,7 @@ proc tkListboxUpDown {w amount} {
$w selection anchor active
set tkPriv(listboxPrev) [$w index active]
set tkPriv(listboxSelection) {}
- event generate $w <<ListboxSelect>>
+ event generate $w <<ListboxSelect>>
}
}
}
@@ -410,13 +410,13 @@ proc tkListboxExtendUpDown {w amount} {
proc tkListboxDataExtend {w el} {
set mode [$w cget -selectmode]
- if {![string compare $mode "extended"]} {
+ if {[string equal $mode "extended"]} {
$w activate $el
$w see $el
if {[$w selection includes anchor]} {
tkListboxMotion $w $el
}
- } elseif {![string compare $mode "multiple"]} {
+ } elseif {[string equal $mode "multiple"]} {
$w activate $el
$w see $el
}
@@ -465,7 +465,7 @@ proc tkListboxCancel w {
proc tkListboxSelectAll w {
set mode [$w cget -selectmode]
- if {![string compare $mode "single"] || ![string compare $mode "browse"]} {
+ if {[string equal $mode "single"] || [string equal $mode "browse"]} {
$w selection clear 0 end
$w selection set active
} else {