summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/focus.tcl8
-rw-r--r--library/menu.tcl10
-rw-r--r--library/text.tcl4
-rw-r--r--library/tkfbox.tcl14
4 files changed, 18 insertions, 18 deletions
diff --git a/library/focus.tcl b/library/focus.tcl
index d1cf4a6..1658988 100644
--- a/library/focus.tcl
+++ b/library/focus.tcl
@@ -3,7 +3,7 @@
# This file defines several procedures for managing the input
# focus.
#
-# RCS: @(#) $Id: focus.tcl,v 1.6 2000/03/02 23:52:45 hobbs Exp $
+# RCS: @(#) $Id: focus.tcl,v 1.7 2000/03/31 09:24:11 hobbs Exp $
#
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
#
@@ -24,7 +24,7 @@
proc tk_focusNext w {
set cur $w
- while 1 {
+ while {1} {
# Descend to just before the first child of the current widget.
@@ -34,7 +34,7 @@ proc tk_focusNext w {
# Look for the next sibling that isn't a top-level.
- while 1 {
+ while {1} {
incr i
if {$i < [llength $children]} {
set cur [lindex $children $i]
@@ -76,7 +76,7 @@ proc tk_focusNext w {
proc tk_focusPrev w {
set cur $w
- while 1 {
+ while {1} {
# Collect information about the current window's position
# among its siblings. Also, if the window is a top-level,
diff --git a/library/menu.tcl b/library/menu.tcl
index 00c0e4c..6899b10 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -4,7 +4,7 @@
# It also implements keyboard traversal of menus and implements a few
# other utility procedures related to menus.
#
-# RCS: @(#) $Id: menu.tcl,v 1.10 2000/03/10 22:16:36 ericm Exp $
+# RCS: @(#) $Id: menu.tcl,v 1.11 2000/03/31 09:24:11 hobbs Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -405,7 +405,7 @@ proc tkMenuUnpost menu {
# including the top-level torn-off one) and deactivate the
# top-level torn off menu if there is one.
- while 1 {
+ while {1} {
set parent [winfo parent $menu]
if {[string compare [winfo class $parent] "Menu"] \
|| ![winfo ismapped $parent]} {
@@ -651,8 +651,8 @@ proc tkMenuInvoke {w buttonRelease} {
set menu [$w entrycget active -menu]
tkMenuFirstEntry $menu
} elseif {[string equal [$w type active] "tearoff"]} {
- tkMenuUnpost $w
tkTearOffMenu $w
+ tkMenuUnpost $w
} elseif {[string equal [$w cget -type] "menubar"]} {
$w postcascade none
$w activate none
@@ -795,7 +795,7 @@ proc tkMenuNextMenu {menu direction} {
set buttons [winfo children [winfo parent $w]]
set length [llength $buttons]
set i [expr {[lsearch -exact $buttons $w] + $count}]
- while 1 {
+ while {1} {
while {$i < 0} {
incr i $length
}
@@ -841,7 +841,7 @@ proc tkMenuNextEntry {menu count} {
} else {
set i [expr {$active + $count}]
}
- while 1 {
+ while {1} {
if {$quitAfter <= 0} {
# We've tried every entry in the menu. Either there are
# none, or they're all disabled. Just give up.
diff --git a/library/text.tcl b/library/text.tcl
index dd660f8..f1b79e4 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk text widgets and provides
# procedures that help in implementing the bindings.
#
-# RCS: @(#) $Id: text.tcl,v 1.10 2000/02/10 08:52:50 hobbs Exp $
+# RCS: @(#) $Id: text.tcl,v 1.11 2000/03/31 09:24:11 hobbs Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -829,7 +829,7 @@ proc tkTextUpDownLine {w n} {
proc tkTextPrevPara {w pos} {
set pos [$w index "$pos linestart"]
- while 1 {
+ while {1} {
if {([string equal [$w get "$pos - 1 line"] "\n"] \
&& [string compare [$w get $pos] "\n"]) \
|| [string equal $pos "1.0"]} {
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index 6090288..42c330d 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -11,7 +11,7 @@
# files by clicking on the file icons or by entering a filename
# in the "Filename:" entry.
#
-# RCS: @(#) $Id: tkfbox.tcl,v 1.17 2000/03/29 00:09:06 ericm Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.18 2000/03/31 09:24:12 hobbs Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -298,7 +298,7 @@ proc tkIconList_Arrange {w} {
set data(itemsPerColumn) 1
}
- if {[string compare $data(curItem) {}]} {
+ if {$data(curItem) != ""} {
tkIconList_Select $w [lindex [lindex $data(list) $data(curItem)] 2] 0
}
}
@@ -309,7 +309,7 @@ proc tkIconList_Arrange {w} {
proc tkIconList_Invoke {w} {
upvar #0 $w data
- if {[string compare $data(-command) ""] && [info exists data(selected)]} {
+ if {$data(-command) != "" && [info exists data(selected)]} {
uplevel #0 $data(-command)
}
}
@@ -397,7 +397,7 @@ proc tkIconList_Select {w rTag {callBrowse 1}} {
set data(curItem) $serial
set data(selected) $text
- if {$callBrowse && [string compare $data(-browsecmd) ""]} {
+ if {$callBrowse && $data(-browsecmd) != ""} {
eval $data(-browsecmd) [list $text]
}
}
@@ -571,7 +571,7 @@ proc tkIconList_Goto {w text} {
return
}
- if {[string equal $data(curItem) {}] || $data(curItem) == 0} {
+ if {$data(curItem) == "" || $data(curItem) == 0} {
set start 0
} else {
set start $data(curItem)
@@ -586,7 +586,7 @@ proc tkIconList_Goto {w text} {
# Search forward until we find a filename whose prefix is an exact match
# with $text
- while 1 {
+ while {1} {
set sub [string range $textList($i) 0 $len0]
if {[string equal $text $sub]} {
set theIndex $i
@@ -603,7 +603,7 @@ proc tkIconList_Goto {w text} {
if {$theIndex > -1} {
set rTag [lindex [lindex $data(list) $theIndex] 2]
- tkIconList_Select $w $rTag 0
+ tkIconList_Select $w $rTag
tkIconList_See $w $rTag
}
}