summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-11-15 19:31:20 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-11-15 19:31:20 (GMT)
commit200834f077b18c8ca1f867369f74cb08db795931 (patch)
tree926c9c2655af85d9275fb6665b9ec2fa628f2093 /library
parentaf19f830b69eff450c610f16fe43cb8a50680c21 (diff)
downloadtk-200834f077b18c8ca1f867369f74cb08db795931.zip
tk-200834f077b18c8ca1f867369f74cb08db795931.tar.gz
tk-200834f077b18c8ca1f867369f74cb08db795931.tar.bz2
More complete purge of things only present for supporting long-dead Mac 9 systems.
Diffstat (limited to 'library')
-rw-r--r--library/bgerror.tcl16
-rw-r--r--library/button.tcl4
-rw-r--r--library/console.tcl17
-rw-r--r--library/dialog.tcl11
-rw-r--r--library/entry.tcl2
-rw-r--r--library/listbox.tcl2
-rw-r--r--library/msgbox.tcl12
-rw-r--r--library/scrlbar.tcl2
-rw-r--r--library/spinbox.tcl2
-rw-r--r--library/text.tcl6
-rw-r--r--library/tk.tcl22
11 files changed, 28 insertions, 68 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index 3372115..94db7f5 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -94,8 +94,7 @@ proc ::tk::dialog::error::bgerror err {
# we use the default dialog then :
set windowingsystem [tk windowingsystem]
- if {($windowingsystem eq "classic")
- || ($windowingsystem eq "aqua")} {
+ if {$windowingsystem eq "aqua"} {
set ok [mc Ok]
set messageFont system
set textRelief flat
@@ -143,8 +142,7 @@ proc ::tk::dialog::error::bgerror err {
wm iconname .bgerrorDialog ErrorDialog
wm protocol .bgerrorDialog WM_DELETE_WINDOW { }
- if {($windowingsystem eq "classic")
- || ($windowingsystem eq "aqua")} {
+ if {$windowingsystem eq "aqua"} {
::tk::unsupported::MacWindowStyle style .bgerrorDialog moveableAlert {}
} elseif {$windowingsystem eq "x11"} {
wm attributes .bgerrorDialog -type dialog
@@ -190,17 +188,10 @@ 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 {($windowingsystem eq "classic")
- || ($windowingsystem eq "aqua")} {
- # On the Macintosh, use the stop bitmap
- label .bgerrorDialog.bitmap -bitmap stop
- } else {
- # On other platforms, make the error icon
canvas .bgerrorDialog.bitmap -width 32 -height 32 -highlightthickness 0
.bgerrorDialog.bitmap create oval 0 0 31 31 -fill red -outline black
.bgerrorDialog.bitmap create line 9 9 23 23 -fill white -width 4
.bgerrorDialog.bitmap create line 9 23 23 9 -fill white -width 4
- }
grid .bgerrorDialog.bitmap .bgerrorDialog.msg \
-in .bgerrorDialog.top \
-row 0 \
@@ -226,8 +217,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 {($windowingsystem eq "classic")
- || ($windowingsystem eq "aqua")} {
+ if {$windowingsystem eq "aqua"} {
if {($name eq "ok") || ($name eq "dismiss")} {
grid columnconfigure .bgerrorDialog.bot $i -minsize 90
}
diff --git a/library/button.tcl b/library/button.tcl
index 195566e..fe92034 100644
--- a/library/button.tcl
+++ b/library/button.tcl
@@ -16,7 +16,7 @@
# The code below creates the default class bindings for buttons.
#-------------------------------------------------------------------------
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
bind Radiobutton <Enter> {
tk::ButtonEnter %W
}
@@ -442,7 +442,7 @@ proc ::tk::ButtonUp w {
}
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
####################
# Mac implementation
diff --git a/library/console.tcl b/library/console.tcl
index b473dd4..0dc6f63 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -48,8 +48,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"
@@ -66,8 +65,7 @@ proc ::tk::ConsoleInit {} {
-underline 0 -command {wm withdraw .}
.menubar.file add command -label [mc "Clear Console"] \
-underline 0 -command {.console delete 1.0 "promptEnd linestart"}
- if {$tcl_platform(platform) eq "macintosh"
- || [tk windowingsystem] eq "aqua"} {
+ if {[tk windowingsystem] eq "aqua"} {
.menubar.file add command -label [mc "Quit"] \
-command exit -accel Cmd-Q
} else {
@@ -103,9 +101,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 10 normal} -highlightthickness 0
- }
"windows" {
$con configure -font systemfixed
}
@@ -467,13 +462,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/dialog.tcl b/library/dialog.tcl
index 1ec578e..504bc9e 100644
--- a/library/dialog.tcl
+++ b/library/dialog.tcl
@@ -45,7 +45,7 @@ proc ::tk_dialog {w title text bitmap default args} {
}
set windowingsystem [tk windowingsystem]
- if {$tcl_platform(platform) eq "macintosh" || $windowingsystem eq "aqua"} {
+ if {$windowingsystem eq "aqua"} {
option add *Dialog*background systemDialogBackgroundActive widgetDefault
option add *Dialog*Button.highlightBackground \
systemDialogBackgroundActive widgetDefault
@@ -71,7 +71,7 @@ proc ::tk_dialog {w title text bitmap default args} {
wm transient $w [winfo toplevel [winfo parent $w]]
}
- if {$tcl_platform(platform) eq "macintosh" || $windowingsystem eq "aqua"} {
+ if {$windowingsystem eq "aqua"} {
::tk::unsupported::MacWindowStyle style $w moveableModal {}
} elseif {$windowingsystem eq "x11"} {
wm attributes $w -type dialog
@@ -91,7 +91,7 @@ proc ::tk_dialog {w title text bitmap default args} {
# overridden by the caller).
option add *Dialog.msg.wrapLength 3i widgetDefault
- if {$tcl_platform(platform) eq "macintosh" || $windowingsystem eq "aqua"} {
+ if {$windowingsystem eq "aqua"} {
option add *Dialog.msg.font system widgetDefault
} else {
option add *Dialog.msg.font {Times 12} widgetDefault
@@ -100,8 +100,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 {$bitmap ne ""} {
- if {($tcl_platform(platform) eq "macintosh"
- || $windowingsystem eq "aqua") && ($bitmap eq "error")} {
+ if {$windowingsystem eq "aqua" && $bitmap eq "error"} {
set bitmap "stop"
}
label $w.bitmap -bitmap $bitmap
@@ -122,7 +121,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 {$tcl_platform(platform) eq "macintosh" || $windowingsystem eq "aqua"} {
+ if {$windowingsystem eq "aqua"} {
set tmp [string tolower $but]
if {$tmp eq "ok" || $tmp eq "cancel"} {
grid columnconfigure $w.bot $i -minsize 90
diff --git a/library/entry.tcl b/library/entry.tcl
index 93812b7..da9a865 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -203,7 +203,7 @@ bind Entry <Escape> {# nothing}
bind Entry <Return> {# nothing}
bind Entry <KP_Enter> {# nothing}
bind Entry <Tab> {# nothing}
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
bind Entry <Command-KeyPress> {# nothing}
}
diff --git a/library/listbox.tcl b/library/listbox.tcl
index 9fd86e4..40fe9f7 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -176,7 +176,7 @@ bind Listbox <B2-Motion> {
# The MouseWheel will typically only fire on Windows and Mac OS X.
# However, someone could use the "event generate" command to produce
# one on other platforms.
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D)}] units
}
diff --git a/library/msgbox.tcl b/library/msgbox.tcl
index e5a363d..301b750 100644
--- a/library/msgbox.tcl
+++ b/library/msgbox.tcl
@@ -156,7 +156,7 @@ proc ::tk::MessageBox {args} {
error "bad -icon value \"$data(-icon)\": must be error, info, question, or warning"
}
set windowingsystem [tk windowingsystem]
- if {$windowingsystem eq "classic" || $windowingsystem eq "aqua"} {
+ if {$windowingsystem eq "aqua"} {
switch -- $data(-icon) {
"error" {set data(-icon) "stop"}
"warning" {set data(-icon) "caution"}
@@ -263,7 +263,7 @@ proc ::tk::MessageBox {args} {
wm transient $w $data(-parent)
}
- if {$windowingsystem eq "classic" || $windowingsystem eq "aqua"} {
+ if {$windowingsystem eq "aqua"} {
::tk::unsupported::MacWindowStyle style $w moveableModal {}
} elseif {$windowingsystem eq "x11"} {
wm attributes $w -type dialog
@@ -273,7 +273,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 {$windowingsystem ne "classic" && $windowingsystem ne "aqua"} {
+ if {$windowingsystem ne "aqua"} {
$w.bot configure -relief raised -bd 1
$w.top configure -relief raised -bd 1
}
@@ -283,7 +283,7 @@ proc ::tk::MessageBox {args} {
# overridden by the caller).
option add *Dialog.msg.wrapLength 3i widgetDefault
- if {$windowingsystem eq "classic" || $windowingsystem eq "aqua"} {
+ if {$windowingsystem eq "aqua"} {
option add *Dialog.msg.font system widgetDefault
} else {
option add *Dialog.msg.font {Times 14} widgetDefault
@@ -292,7 +292,7 @@ proc ::tk::MessageBox {args} {
label $w.msg -anchor nw -justify left -text $data(-message) \
-background $bg
if {$data(-icon) ne ""} {
- if {($windowingsystem eq "classic" || $windowingsystem eq "aqua")
+ if {($windowingsystem eq "aqua")
|| ([winfo depth $w] < 4) || $tk_strictMotif} {
label $w.bitmap -bitmap $data(-icon) -background $bg
} else {
@@ -358,7 +358,7 @@ proc ::tk::MessageBox {args} {
grid $w.$name -in $w.bot -row 0 -column $i -padx 3m -pady 2m -sticky ew
grid columnconfigure $w.bot $i -uniform buttons
# We boost the size of some Mac buttons for l&f
- if {$windowingsystem eq "classic" || $windowingsystem eq "aqua"} {
+ if {$windowingsystem eq "aqua"} {
set tmp [string tolower $name]
if {$tmp eq "ok" || $tmp eq "cancel" || $tmp eq "yes" ||
$tmp eq "no" || $tmp eq "abort" || $tmp eq "retry" ||
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl
index f048922..5a4d960 100644
--- a/library/scrlbar.tcl
+++ b/library/scrlbar.tcl
@@ -128,7 +128,7 @@ bind Scrollbar <End> {
tk::ScrollToPos %W 1
}
}
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
bind Scrollbar <MouseWheel> {
tk::ScrollByUnits %W v [expr {- (%D)}]
}
diff --git a/library/spinbox.tcl b/library/spinbox.tcl
index 9b63e09..3fa8618 100644
--- a/library/spinbox.tcl
+++ b/library/spinbox.tcl
@@ -211,7 +211,7 @@ bind Spinbox <Return> {# nothing}
bind Spinbox <KP_Enter> {# nothing}
bind Spinbox <Tab> {# nothing}
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
bind Spinbox <Command-KeyPress> {# nothing}
}
diff --git a/library/text.tcl b/library/text.tcl
index 3b32991..10b4424 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -275,7 +275,7 @@ bind Text <Control-KeyPress> {# nothing}
bind Text <Escape> {# nothing}
bind Text <KP_Enter> {# nothing}
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
bind Text <Command-KeyPress> {# nothing}
}
@@ -391,7 +391,7 @@ bind Text <Meta-Delete> {
# Macintosh only bindings:
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
bind Text <FocusIn> {
%W configure -selectbackground systemHighlight -selectforeground systemHighlightText
}
@@ -452,7 +452,7 @@ set ::tk::Priv(prevPos) {}
# However, someone could use the "event generate" command to produce
# one on other platforms.
-if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
+if {[tk windowingsystem] eq "aqua"} {
bind Text <MouseWheel> {
%W yview scroll [expr {- (%D)}] units
}
diff --git a/library/tk.tcl b/library/tk.tcl
index a09cd9c..87026f6 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -117,7 +117,7 @@ proc ::tk::PlaceWindow {w {place ""} {anchor ""}} {
} elseif {$y > ([winfo vrooty $w]+[winfo vrootheight $w]-[winfo reqheight $w])} {
set y [expr {[winfo vrooty $w]+[winfo vrootheight $w]-[winfo reqheight $w]}]
}
- if {$windowingsystem eq "classic" || $windowingsystem eq "aqua"} {
+ if {$windowingsystem eq "aqua"} {
# Avoid the native menu bar which sits on top of everything.
if {$y < 22} { set y 22 }
}
@@ -390,35 +390,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 {[tk windowingsystem] eq "classic"} {
- 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]]
}
- }
namespace eval ::tk {
SourceLibFile button
SourceLibFile entry