summaryrefslogtreecommitdiffstats
path: root/library/tearoff.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/tearoff.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/tearoff.tcl')
-rw-r--r--library/tearoff.tcl20
1 files changed, 10 insertions, 10 deletions
diff --git a/library/tearoff.tcl b/library/tearoff.tcl
index 7a240c3..c9e3231 100644
--- a/library/tearoff.tcl
+++ b/library/tearoff.tcl
@@ -2,7 +2,7 @@
#
# This file contains procedures that implement tear-off menus.
#
-# RCS: @(#) $Id: tearoff.tcl,v 1.4 1999/04/16 01:51:27 stanton Exp $
+# RCS: @(#) $Id: tearoff.tcl,v 1.5 1999/09/02 17:02:53 hobbs Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -40,11 +40,11 @@ proc tkTearOffMenu {w {x 0} {y 0}} {
}
set parent [winfo parent $w]
- while {[string compare [winfo toplevel $parent] $parent]
- || ![string compare [winfo class $parent] "Menu"]} {
+ while {[string compare [winfo toplevel $parent] $parent] \
+ || [string equal [winfo class $parent] "Menu"]} {
set parent [winfo parent $parent]
}
- if {![string compare $parent "."]} {
+ if {[string equal $parent "."]} {
set parent ""
}
for {set i 1} 1 {incr i} {
@@ -114,14 +114,14 @@ proc tkMenuDup {src dst type} {
if {[llength $option] == 2} {
continue
}
- if {[string compare [lindex $option 0] "-type"] == 0} {
+ if {[string equal [lindex $option 0] "-type"]} {
continue
}
lappend cmd [lindex $option 0] [lindex $option 4]
}
eval $cmd
set last [$src index last]
- if {![string compare $last "none"]} {
+ if {[string equal $last "none"]} {
return
}
for {set i [$src cget -tearoff]} {$i <= $last} {incr i} {
@@ -140,8 +140,8 @@ proc tkMenuDup {src dst type} {
# Copy tags to x, replacing each substring of src with dst.
while {[set index [string first $src $tags]] != -1} {
- append x [string range $tags 0 [expr {$index - 1}]]$dst
- set tags [string range $tags [expr {$index + $srcLen}] end]
+ append x [string range $tags 0 [expr {$index - 1}]]$dst
+ set tags [string range $tags [expr {$index + $srcLen}] end]
}
append x $tags
@@ -155,9 +155,9 @@ proc tkMenuDup {src dst type} {
# Copy script to x, replacing each substring of event with dst.
while {[set index [string first $event $script]] != -1} {
- append x [string range $script 0 [expr {$index - 1}]]
+ append x [string range $script 0 [expr {$index - 1}]]
append x $dst
- set script [string range $script [expr {$index + $eventLen}] end]
+ set script [string range $script [expr {$index + $eventLen}] end]
}
append x $script