summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--library/console.tcl4
-rw-r--r--library/tk.tcl33
-rw-r--r--mac/tkMacInit.c10
4 files changed, 33 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 108a399..1734e06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-05-20 Daniel Steffen <das@users.sourceforge.net>
+
+ * mac/tkMacInit.c:
+ * library/console.tcl:
+ * library/tk.tcl: fix tk.tcl not sourcing library files
+ that define bindings at startup on mac. (independent of
+ tk library files being in resources or on auto_path)
+
2002-05-08 Don Porter <dgp@users.sourceforge.net>
* library/bgerror.tcl:
diff --git a/library/console.tcl b/library/console.tcl
index 74ad76c..ee5fbf8 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -4,7 +4,7 @@
# can be used by non-unix systems that do not have built-in support
# for shells.
#
-# RCS: @(#) $Id: console.tcl,v 1.18 2002/04/29 13:17:44 bagnonm Exp $
+# RCS: @(#) $Id: console.tcl,v 1.19 2002/05/20 10:21:23 das Exp $
#
# Copyright (c) 1995-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
@@ -447,7 +447,7 @@ proc ::tk::ConsoleBind {w} {
bind Console <F9> {
eval destroy [winfo child .]
if {[string equal $tcl_platform(platform) "macintosh"]} {
- if {[catch {source $tk_library:console.tcl}]} {source -rsrc console}
+ if {[catch {source [file join $tk_library console.tcl]}]} {source -rsrc console}
} else {
source [file join $tk_library console.tcl]
}
diff --git a/library/tk.tcl b/library/tk.tcl
index 4e1cb87..7665e6f 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.38 2002/04/29 13:17:44 bagnonm Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.39 2002/05/20 10:21:28 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -378,16 +378,27 @@ switch $::tcl_platform(platform) {
# Read in files that define all of the class bindings.
# ----------------------------------------------------------------------
-if {$::tcl_platform(platform) ne "macintosh" && $::tk_library ne ""} {
- source [file join $::tk_library button.tcl]
- source [file join $::tk_library entry.tcl]
- source [file join $::tk_library listbox.tcl]
- source [file join $::tk_library menu.tcl]
- source [file join $::tk_library panedwindow.tcl]
- source [file join $::tk_library scale.tcl]
- source [file join $::tk_library scrlbar.tcl]
- source [file join $::tk_library spinbox.tcl]
- source [file join $::tk_library text.tcl]
+if {$::tk_library ne ""} {
+ if {[string equal $tcl_platform(platform) "macintosh"]} {
+ proc sourceLibFile {file} {
+ if {[catch {uplevel #0 [list source [file join $::tk_library \
+ $file.tcl]]}]} {uplevel #0 [list source -rsrc $file]}
+ }
+ } else {
+ proc sourceLibFile {file} {
+ uplevel #0 [list source [file join $::tk_library $file.tcl]]
+ }
+ }
+ sourceLibFile button
+ sourceLibFile entry
+ sourceLibFile listbox
+ sourceLibFile menu
+ sourceLibFile panedwindow
+ sourceLibFile scale
+ sourceLibFile scrlbar
+ sourceLibFile spinbox
+ sourceLibFile text
+ rename sourceLibFile {}
}
# ----------------------------------------------------------------------
# Default bindings for keyboard traversal.
diff --git a/mac/tkMacInit.c b/mac/tkMacInit.c
index 9602304..7ca7667 100644
--- a/mac/tkMacInit.c
+++ b/mac/tkMacInit.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacInit.c,v 1.8 2002/02/08 02:57:11 dgp Exp $
+ * RCS: @(#) $Id: tkMacInit.c,v 1.9 2002/05/20 10:21:31 das Exp $
*/
#include <Resources.h>
@@ -75,22 +75,14 @@ proc sourcePath {file} {\n\
error $msg\n\
}\n\
sourcePath tk\n\
-sourcePath button\n\
sourcePath dialog\n\
-sourcePath entry\n\
sourcePath focus\n\
-sourcePath listbox\n\
-sourcePath menu\n\
sourcePath optMenu\n\
sourcePath palette\n\
-sourcePath scale\n\
-sourcePath scrlbar\n\
sourcePath tearoff\n\
-sourcePath text\n\
sourcePath bgerror\n\
sourcePath msgbox\n\
sourcePath comdlg\n\
-sourcePath spinbox\n\
rename sourcePath {}\n\
rename tkInit {}\n\
} }\n\