summaryrefslogtreecommitdiffstats
path: root/library/tearoff.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-01-25 18:21:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-01-25 18:21:40 (GMT)
commitee09dd0c7cfc65378fac95dd53067bcd72b390e9 (patch)
tree9b964605296b4f7dd7bd91a2baa6ebd8c0bf21bc /library/tearoff.tcl
parent2a147ca9e8cdff6b06499b16942dd0a9b8b92228 (diff)
downloadtk-ee09dd0c7cfc65378fac95dd53067bcd72b390e9.zip
tk-ee09dd0c7cfc65378fac95dd53067bcd72b390e9.tar.gz
tk-ee09dd0c7cfc65378fac95dd53067bcd72b390e9.tar.bz2
* library/bgerror.tcl: Updates to use Tcl 8.4 features. [Patch 1237759] * library/button.tcl:
* library/choosedir.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/panedwindow.tcl: * library/safetk.tcl: * library/scale.tcl: * library/scrlbar.tcl: * library/spinbox.tcl: * library/tearoff.tcl: * library/text.tcl: * library/tk.tcl: * library/tkfbox.tcl: * library/xmfbox.tcl:
Diffstat (limited to 'library/tearoff.tcl')
-rw-r--r--library/tearoff.tcl15
1 files changed, 7 insertions, 8 deletions
diff --git a/library/tearoff.tcl b/library/tearoff.tcl
index 8bcdc81..053ebd9 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.7 2001/08/01 16:21:11 dgp Exp $
+# RCS: @(#) $Id: tearoff.tcl,v 1.7.4.1 2006/01/25 18:21:41 dgp Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -40,11 +40,10 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} {
}
set parent [winfo parent $w]
- while {[string compare [winfo toplevel $parent] $parent] \
- || [string equal [winfo class $parent] "Menu"]} {
+ while {[winfo toplevel $parent] ne $parent || [winfo class $parent] eq "Menu"} {
set parent [winfo parent $parent]
}
- if {[string equal $parent "."]} {
+ if {$parent eq "."} {
set parent ""
}
for {set i 1} 1 {incr i} {
@@ -61,7 +60,7 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} {
# entry. If it's a menubutton then use its text.
set parent [winfo parent $w]
- if {[string compare [$menu cget -title] ""]} {
+ if {[$menu cget -title] ne ""} {
wm title $menu [$menu cget -title]
} else {
switch [winfo class $parent] {
@@ -92,7 +91,7 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} {
# now.
set cmd [$w cget -tearoffcommand]
- if {[string compare $cmd ""]} {
+ if {$cmd ne ""} {
uplevel #0 $cmd [list $w $menu]
}
return $menu
@@ -114,14 +113,14 @@ proc ::tk::MenuDup {src dst type} {
if {[llength $option] == 2} {
continue
}
- if {[string equal [lindex $option 0] "-type"]} {
+ if {[lindex $option 0] eq "-type"} {
continue
}
lappend cmd [lindex $option 0] [lindex $option 4]
}
eval $cmd
set last [$src index last]
- if {[string equal $last "none"]} {
+ if {$last eq "none"} {
return
}
for {set i [$src cget -tearoff]} {$i <= $last} {incr i} {