summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/bgerror.tcl16
-rw-r--r--library/button.tcl8
-rw-r--r--library/console.tcl22
-rw-r--r--library/demos/text.tcl4
-rw-r--r--library/demos/widget8
-rw-r--r--library/dialog.tcl14
-rw-r--r--library/entry.tcl5
-rw-r--r--library/msgbox.tcl17
-rw-r--r--library/spinbox.tcl5
-rw-r--r--library/tearoff.tcl5
-rw-r--r--library/text.tcl11
-rw-r--r--library/tk.tcl31
12 files changed, 44 insertions, 102 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index a96c755..778c715 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -9,8 +9,8 @@
# Copyright (c) 1998-2000 by Ajuba Solutions.
# All rights reserved.
#
-# RCS: @(#) $Id: bgerror.tcl,v 1.25 2003/12/20 19:57:53 jenglish Exp $
-# $Id: bgerror.tcl,v 1.25 2003/12/20 19:57:53 jenglish Exp $
+# RCS: @(#) $Id: bgerror.tcl,v 1.26 2004/03/17 18:15:44 das Exp $
+# $Id: bgerror.tcl,v 1.26 2004/03/17 18:15:44 das Exp $
namespace eval ::tk {
namespace eval dialog {
@@ -92,8 +92,7 @@ proc ::tk::dialog::error::bgerror err {
# Ok the application's tkerror either failed or was not found
# we use the default dialog then :
- if {($tcl_platform(platform) eq "macintosh")
- || ([tk windowingsystem] eq "aqua")} {
+ if {[tk windowingsystem] eq "aqua"} {
set ok [mc Ok]
set messageFont system
set textRelief flat
@@ -143,8 +142,7 @@ proc ::tk::dialog::error::bgerror err {
if {$tcl_platform(platform) eq "windows"} {
wm attributes .bgerrorDialog -topmost 1
}
- if {($tcl_platform(platform) eq "macintosh")
- || ([tk windowingsystem] eq "aqua")} {
+ if {[tk windowingsystem] eq "aqua"} {
::tk::unsupported::MacWindowStyle style .bgerrorDialog dBoxProc
}
@@ -186,8 +184,7 @@ proc ::tk::dialog::error::bgerror err {
set wrapwidth [expr {$wrapwidth-60-[winfo pixels .bgerrorDialog 9m]}]
label .bgerrorDialog.msg -justify left -text $text -font $messageFont \
-wraplength $wrapwidth
- if {($tcl_platform(platform) eq "macintosh")
- || ([tk windowingsystem] eq "aqua")} {
+ if {[tk windowingsystem] eq "aqua"} {
# On the Macintosh, use the stop bitmap
label .bgerrorDialog.bitmap -bitmap stop
} else {
@@ -222,8 +219,7 @@ proc ::tk::dialog::error::bgerror err {
-padx 10
grid columnconfigure .bgerrorDialog.bot $i -weight 1
# We boost the size of some Mac buttons for l&f
- if {($tcl_platform(platform) eq "macintosh")
- || ([tk windowingsystem] eq "aqua")} {
+ if {[tk windowingsystem] eq "aqua"} {
if {($name eq "ok") || ($name eq "dismiss")} {
grid columnconfigure .bgerrorDialog.bot $i -minsize 79
}
diff --git a/library/button.tcl b/library/button.tcl
index f6cea6a..0810375 100644
--- a/library/button.tcl
+++ b/library/button.tcl
@@ -4,7 +4,7 @@
# checkbutton, and radiobutton widgets and provides procedures
# that help in implementing those bindings.
#
-# RCS: @(#) $Id: button.tcl,v 1.17 2002/09/04 02:05:52 hobbs Exp $
+# RCS: @(#) $Id: button.tcl,v 1.18 2004/03/17 18:15:44 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -18,8 +18,7 @@
# The code below creates the default class bindings for buttons.
#-------------------------------------------------------------------------
-if {[string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"]} {
+if {[string equal [tk windowingsystem] "aqua"]} {
bind Radiobutton <Enter> {
tk::ButtonEnter %W
}
@@ -445,8 +444,7 @@ proc ::tk::ButtonUp w {
}
-if {[string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"]} {
+if {[string equal [tk windowingsystem] "aqua"]} {
####################
# Mac implementation
diff --git a/library/console.tcl b/library/console.tcl
index 2de77c6..115830a 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.24 2003/10/02 23:02:36 patthoyts Exp $
+# RCS: @(#) $Id: console.tcl,v 1.25 2004/03/17 18:15:44 das Exp $
#
# Copyright (c) 1995-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Ajuba Solutions.
@@ -49,8 +49,7 @@ proc ::tk::ConsoleInit {} {
wm withdraw .
}
- if {$tcl_platform(platform) eq "macintosh"
- || [tk windowingsystem] eq "aqua"} {
+ if {[tk windowingsystem] eq "aqua"} {
set mod "Cmd"
} else {
set mod "Ctrl"
@@ -69,8 +68,7 @@ proc ::tk::ConsoleInit {} {
-command {wm withdraw .}
AmpMenuArgs .menubar.file add command -label [mc "&Clear Console"] \
-command {.console delete 1.0 "promptEnd linestart"}
- if {$tcl_platform(platform) eq "macintosh" || \
- [tk windowingsystem] eq "aqua"} {
+ if {[tk windowingsystem] eq "aqua"} {
AmpMenuArgs .menubar.file add command \
-label [mc &Quit] -command {exit} -accel "Cmd-Q"
} else {
@@ -105,9 +103,6 @@ proc ::tk::ConsoleInit {} {
pack .sb -side right -fill both
pack $con -fill both -expand 1 -side left
switch -exact $tcl_platform(platform) {
- "macintosh" {
- $con configure -font {Monaco 9 normal} -highlightthickness 0
- }
"windows" {
$con configure -font systemfixed
}
@@ -468,16 +463,9 @@ proc ::tk::ConsoleBind {w} {
}
bind Console <F9> {
eval destroy [winfo child .]
- if {$tcl_platform(platform) eq "macintosh"} {
- if {[catch {source [file join $tk_library console.tcl]}]} {
- source -rsrc console
- }
- } else {
- source [file join $tk_library console.tcl]
- }
+ source [file join $tk_library console.tcl]
}
- if {$::tcl_platform(platform) eq "macintosh" \
- || [tk windowingsystem] eq "aqua"} {
+ if {[tk windowingsystem] eq "aqua"} {
bind Console <Command-q> {
exit
}
diff --git a/library/demos/text.tcl b/library/demos/text.tcl
index 242dd54..0cc4870 100644
--- a/library/demos/text.tcl
+++ b/library/demos/text.tcl
@@ -3,7 +3,7 @@
# This demonstration script creates a text widget that describes
# the basic editing functions.
#
-# RCS: @(#) $Id: text.tcl,v 1.4 2003/08/20 23:02:18 hobbs Exp $
+# RCS: @(#) $Id: text.tcl,v 1.5 2004/03/17 18:15:45 das Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -68,7 +68,7 @@ insertion cursor. Control-z undoes the last editing action performed,
and }
switch $tcl_platform(platform) {
- "unix" - "macintosh" {
+ "unix" {
$w.text insert end "Control-Shift-z"
}
"windows" {
diff --git a/library/demos/widget b/library/demos/widget
index a83b473..8c59d6c 100644
--- a/library/demos/widget
+++ b/library/demos/widget
@@ -11,7 +11,7 @@ exec wish "$0" "$@"
# ".tcl" files is this directory, which are sourced by this script
# as needed.
#
-# RCS: @(#) $Id: widget,v 1.22 2004/02/25 13:22:32 cc_benny Exp $
+# RCS: @(#) $Id: widget,v 1.23 2004/03/17 18:15:45 das Exp $
package require Tcl 8.4
package require Tk 8.4
@@ -104,7 +104,7 @@ menu .menuBar -tearoff 0
menu .menuBar.file -tearoff 0
# On the Mac use the specia .apple menu for the about item
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
.menuBar add cascade -menu .menuBar.apple
menu .menuBar.apple -tearoff 0
.menuBar.apple add command -label [mc "About..."] -command {aboutBox}
@@ -575,10 +575,6 @@ proc printCode {w file} {
-message "Print spooling probably failed: $msg"
}
}
- macintosh {
- tk_messageBox -title "Operation not Implemented" \
- -message "Oops, sorry: not implemented yet!"
- }
default {
tk_messageBox -title "Operation not Implemented" \
-message "Wow! Unknown platform: $::tcl_platform(platform)"
diff --git a/library/dialog.tcl b/library/dialog.tcl
index e51e7a1..45569fc 100644
--- a/library/dialog.tcl
+++ b/library/dialog.tcl
@@ -3,7 +3,7 @@
# This file defines the procedure tk_dialog, which creates a dialog
# box containing a bitmap, a message, and one or more buttons.
#
-# RCS: @(#) $Id: dialog.tcl,v 1.16 2004/01/25 01:29:15 pspjuth Exp $
+# RCS: @(#) $Id: dialog.tcl,v 1.17 2004/03/17 18:15:44 das Exp $
#
# Copyright (c) 1992-1993 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -65,8 +65,7 @@ proc ::tk_dialog {w title text bitmap default args} {
wm transient $w [winfo toplevel [winfo parent $w]]
}
- if {[string equal $tcl_platform(platform) "macintosh"]
- || [string equal [tk windowingsystem] "aqua"]} {
+ if {[string equal [tk windowingsystem] "aqua"]} {
::tk::unsupported::MacWindowStyle style $w dBoxProc
}
@@ -85,8 +84,7 @@ proc ::tk_dialog {w title text bitmap default args} {
# overridden by the caller).
option add *Dialog.msg.wrapLength 3i widgetDefault
- if {[string equal $tcl_platform(platform) "macintosh"]
- || [string equal [tk windowingsystem] "aqua"]} {
+ if {[string equal [tk windowingsystem] "aqua"]} {
option add *Dialog.msg.font system widgetDefault
} else {
option add *Dialog.msg.font {Times 12} widgetDefault
@@ -95,8 +93,7 @@ proc ::tk_dialog {w title text bitmap default args} {
label $w.msg -justify left -text $text
pack $w.msg -in $w.top -side right -expand 1 -fill both -padx 3m -pady 3m
if {[string compare $bitmap ""]} {
- if {([string equal $tcl_platform(platform) "macintosh"]
- || [string equal [tk windowingsystem] "aqua"]) &&\
+ if {[string equal [tk windowingsystem] "aqua"] &&\
[string equal $bitmap "error"]} {
set bitmap "stop"
}
@@ -118,8 +115,7 @@ proc ::tk_dialog {w title text bitmap default args} {
-padx 10 -pady 4
grid columnconfigure $w.bot $i
# We boost the size of some Mac buttons for l&f
- if {[string equal $tcl_platform(platform) "macintosh"]
- || [string equal [tk windowingsystem] "aqua"]} {
+ if {[string equal [tk windowingsystem] "aqua"]} {
set tmp [string tolower $but]
if {[string equal $tmp "ok"] || [string equal $tmp "cancel"]} {
grid columnconfigure $w.bot $i -minsize [expr {59 + 20}]
diff --git a/library/entry.tcl b/library/entry.tcl
index 8828909..2718145 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk entry widgets and provides
# procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: entry.tcl,v 1.21 2003/01/23 23:30:11 drh Exp $
+# RCS: @(#) $Id: entry.tcl,v 1.22 2004/03/17 18:15:44 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -204,8 +204,7 @@ bind Entry <Escape> {# nothing}
bind Entry <Return> {# nothing}
bind Entry <KP_Enter> {# nothing}
bind Entry <Tab> {# nothing}
-if {[string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"]} {
+if {[string equal [tk windowingsystem] "aqua"]} {
bind Entry <Command-KeyPress> {# nothing}
}
diff --git a/library/msgbox.tcl b/library/msgbox.tcl
index 4f9badf..cfbd3e7 100644
--- a/library/msgbox.tcl
+++ b/library/msgbox.tcl
@@ -3,7 +3,7 @@
# Implements messageboxes for platforms that do not have native
# messagebox support.
#
-# RCS: @(#) $Id: msgbox.tcl,v 1.26 2004/01/25 01:29:15 pspjuth Exp $
+# RCS: @(#) $Id: msgbox.tcl,v 1.27 2004/03/17 18:15:44 das Exp $
#
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
#
@@ -157,8 +157,7 @@ proc ::tk::MessageBox {args} {
if {[lsearch -exact {info warning error question} $data(-icon)] == -1} {
error "bad -icon value \"$data(-icon)\": must be error, info, question, or warning"
}
- if {[string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"]} {
+ if {[string equal [tk windowingsystem] "aqua"]} {
switch -- $data(-icon) {
"error" {set data(-icon) "stop"}
"warning" {set data(-icon) "caution"}
@@ -256,8 +255,7 @@ proc ::tk::MessageBox {args} {
wm transient $w $data(-parent)
}
- if {[string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"]} {
+ if {[string equal [tk windowingsystem] "aqua"]} {
unsupported::MacWindowStyle style $w dBoxProc
}
@@ -266,8 +264,7 @@ proc ::tk::MessageBox {args} {
pack $w.bot -side bottom -fill both
frame $w.top -background $bg
pack $w.top -side top -fill both -expand 1
- if {![string equal [tk windowingsystem] "classic"]
- && ![string equal [tk windowingsystem] "aqua"]} {
+ if {![string equal [tk windowingsystem] "aqua"]} {
$w.bot configure -relief raised -bd 1
$w.top configure -relief raised -bd 1
}
@@ -277,8 +274,7 @@ proc ::tk::MessageBox {args} {
# overridden by the caller).
option add *Dialog.msg.wrapLength 3i widgetDefault
- if {[string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"]} {
+ if {[string equal [tk windowingsystem] "aqua"]} {
option add *Dialog.msg.font system widgetDefault
} else {
option add *Dialog.msg.font {Times 18} widgetDefault
@@ -287,8 +283,7 @@ proc ::tk::MessageBox {args} {
label $w.msg -anchor nw -justify left -text $data(-message) \
-background $bg
if {[string compare $data(-icon) ""]} {
- if {([string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"])
+ if {[string equal [tk windowingsystem] "aqua"]
|| ([winfo depth $w] < 4) || $tk_strictMotif} {
label $w.bitmap -bitmap $data(-icon) -background $bg
} else {
diff --git a/library/spinbox.tcl b/library/spinbox.tcl
index 8d0a52b..e774e59 100644
--- a/library/spinbox.tcl
+++ b/library/spinbox.tcl
@@ -4,7 +4,7 @@
# procedures that help in implementing those bindings. The spinbox builds
# off the entry widget, so it can reuse Entry bindings and procedures.
#
-# RCS: @(#) $Id: spinbox.tcl,v 1.6 2002/08/31 06:12:28 das Exp $
+# RCS: @(#) $Id: spinbox.tcl,v 1.7 2004/03/17 18:15:45 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -212,8 +212,7 @@ bind Spinbox <Escape> {# nothing}
bind Spinbox <Return> {# nothing}
bind Spinbox <KP_Enter> {# nothing}
bind Spinbox <Tab> {# nothing}
-if {[string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"]} {
+if {[string equal [tk windowingsystem] "aqua"]} {
bind Spinbox <Command-KeyPress> {# nothing}
}
diff --git a/library/tearoff.tcl b/library/tearoff.tcl
index 3ee6ca3..f8b6856 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.8 2003/05/27 23:44:36 vincentdarley Exp $
+# RCS: @(#) $Id: tearoff.tcl,v 1.9 2004/03/17 18:15:45 das Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -37,8 +37,7 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} {
}
if {$y == 0} {
set y [winfo rooty $w]
- if {[tk windowingsystem] eq "macintosh" \
- || [tk windowingsystem] eq "aqua"} {
+ if {[tk windowingsystem] eq "aqua"} {
# Avoid the native menu bar which sits on top of everything.
if {$y < 20} { set y 20 }
}
diff --git a/library/text.tcl b/library/text.tcl
index 93434a0..d038002 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.29 2003/11/13 18:27:00 vincentdarley Exp $
+# RCS: @(#) $Id: text.tcl,v 1.30 2004/03/17 18:15:45 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -276,8 +276,7 @@ bind Text <Meta-KeyPress> {# nothing}
bind Text <Control-KeyPress> {# nothing}
bind Text <Escape> {# nothing}
bind Text <KP_Enter> {# nothing}
-if {[string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"]} {
+if {[string equal [tk windowingsystem] "aqua"]} {
bind Text <Command-KeyPress> {# nothing}
}
@@ -386,8 +385,7 @@ bind Text <Meta-Delete> {
# Macintosh only bindings:
# if text black & highlight black -> text white, other text the same
-if {[string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"]} {
+if {[string equal [tk windowingsystem] "aqua"]} {
bind Text <FocusIn> {
%W tag configure sel -borderwidth 0
%W configure -selectbackground systemHighlight -selectforeground systemHighlightText
@@ -457,8 +455,7 @@ set ::tk::Priv(prevPos) {}
bind Text <MouseWheel> {
%W yview scroll [expr {-%D}] pixels
}
-if {[string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"]} {
+if {[string equal [tk windowingsystem] "aqua"]} {
bind Text <Option-MouseWheel> {
%W yview scroll [expr {- 10*%D}] pixels
}
diff --git a/library/tk.tcl b/library/tk.tcl
index e6ef6f6..9daeb69 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.52 2003/10/29 01:45:41 chengyemao Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.53 2004/03/17 18:15:45 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -119,8 +119,7 @@ proc ::tk::PlaceWindow {w {place ""} {anchor ""}} {
} elseif {$y > ([winfo screenheight $w]-[winfo reqheight $w])} {
set y [expr {[winfo screenheight $w]-[winfo reqheight $w]}]
}
- if {[tk windowingsystem] eq "macintosh" \
- || [tk windowingsystem] eq "aqua"} {
+ if {[tk windowingsystem] eq "aqua"} {
# Avoid the native menu bar which sits on top of everything.
if {$y < 20} { set y 20 }
}
@@ -384,35 +383,15 @@ switch [tk windowingsystem] {
event add <<Undo>> <Command-Key-z>
event add <<Redo>> <Command-Key-y>
}
- "classic" {
- event add <<Cut>> <Control-Key-x> <Key-F2>
- event add <<Copy>> <Control-Key-c> <Key-F3>
- event add <<Paste>> <Control-Key-v> <Key-F4>
- event add <<PasteSelection>> <ButtonRelease-2>
- event add <<Clear>> <Clear>
- event add <<Undo>> <Control-Key-z> <Key-F1>
- event add <<Redo>> <Control-Key-Z>
- }
}
# ----------------------------------------------------------------------
# Read in files that define all of the class bindings.
# ----------------------------------------------------------------------
if {$::tk_library ne ""} {
- if {[string equal $tcl_platform(platform) "macintosh"]} {
- proc ::tk::SourceLibFile {file} {
- if {[catch {
- namespace eval :: \
- [list source [file join $::tk_library $file.tcl]]
- }]} {
- namespace eval :: [list source -rsrc $file]
- }
- }
- } else {
- proc ::tk::SourceLibFile {file} {
- namespace eval :: [list source [file join $::tk_library $file.tcl]]
- }
- }
+ proc ::tk::SourceLibFile {file} {
+ namespace eval :: [list source [file join $::tk_library $file.tcl]]
+ }
namespace eval ::tk {
SourceLibFile button
SourceLibFile entry