summaryrefslogtreecommitdiffstats
path: root/library/tk.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/tk.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/tk.tcl')
-rw-r--r--library/tk.tcl62
1 files changed, 29 insertions, 33 deletions
diff --git a/library/tk.tcl b/library/tk.tcl
index ae68609..7328b8e 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -3,7 +3,7 @@
# Initialization script normally executed in the interpreter for each
# Tk-based application. Arranges class bindings for widgets.
#
-# RCS: @(#) $Id: tk.tcl,v 1.10 1999/08/13 02:58:17 hobbs Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.11 1999/09/02 17:02:53 hobbs Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -56,33 +56,29 @@ proc tkScreenChanged screen {
return
}
array set tkPriv {
- activeMenu {}
- activeItem {}
- afterId {}
- buttons 0
- buttonWindow {}
- dragging 0
- focus {}
- grab {}
- initPos {}
- inMenubutton {}
- listboxPrev {}
- menuBar {}
- mouseMoved 0
- oldGrab {}
- popup {}
- postedMb {}
- pressX 0
- pressY 0
- prevPos 0
- selectMode char
+ activeMenu {}
+ activeItem {}
+ afterId {}
+ buttons 0
+ buttonWindow {}
+ dragging 0
+ focus {}
+ grab {}
+ initPos {}
+ inMenubutton {}
+ listboxPrev {}
+ menuBar {}
+ mouseMoved 0
+ oldGrab {}
+ popup {}
+ postedMb {}
+ pressX 0
+ pressY 0
+ prevPos 0
+ selectMode char
}
set tkPriv(screen) $screen
- if {[string compare $tcl_platform(platform) "unix"] == 0} {
- set tkPriv(tearoff) 1
- } else {
- set tkPriv(tearoff) 0
- }
+ set tkPriv(tearoff) [string equal $tcl_platform(platform) "unix"]
set tkPriv(window) {}
}
@@ -119,12 +115,12 @@ proc tkEventMotifBindings {n1 dummy dummy} {
# using compiled code.
#----------------------------------------------------------------------
-if {![string compare [info commands tk_chooseColor] ""]} {
+if {[string equal [info commands tk_chooseColor] ""]} {
proc tk_chooseColor {args} {
return [eval tkColorDialog $args]
}
}
-if {![string compare [info commands tk_getOpenFile] ""]} {
+if {[string equal [info commands tk_getOpenFile] ""]} {
proc tk_getOpenFile {args} {
if {$::tk_strictMotif} {
return [eval tkMotifFDialog open $args]
@@ -133,7 +129,7 @@ if {![string compare [info commands tk_getOpenFile] ""]} {
}
}
}
-if {![string compare [info commands tk_getSaveFile] ""]} {
+if {[string equal [info commands tk_getSaveFile] ""]} {
proc tk_getSaveFile {args} {
if {$::tk_strictMotif} {
return [eval tkMotifFDialog save $args]
@@ -142,7 +138,7 @@ if {![string compare [info commands tk_getSaveFile] ""]} {
}
}
}
-if {![string compare [info commands tk_messageBox] ""]} {
+if {[string equal [info commands tk_messageBox] ""]} {
proc tk_messageBox {args} {
return [eval tkMessageBox $args]
}
@@ -180,8 +176,8 @@ switch $tcl_platform(platform) {
# Read in files that define all of the class bindings.
# ----------------------------------------------------------------------
-if {[string compare $tcl_platform(platform) "macintosh"] &&
- [string compare {} $tk_library]} {
+if {[string compare $tcl_platform(platform) "macintosh"] && \
+ [string compare {} $tk_library]} {
source [file join $tk_library button.tcl]
source [file join $tk_library entry.tcl]
source [file join $tk_library listbox.tcl]
@@ -221,7 +217,7 @@ proc tkCancelRepeat {} {
# w - Window to which focus should be set.
proc tkTabToWindow {w} {
- if {![string compare [winfo class $w] Entry]} {
+ if {[string equal [winfo class $w] Entry]} {
$w selection range 0 end
$w icursor end
}