summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2012-06-10 14:47:24 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2012-06-10 14:47:24 (GMT)
commit67fbe2530b1f554399831b61f7d03ab1ef722ef7 (patch)
treea2856b5cd593cfd80fcf0b20a8de5530d052e66f /library
parentf4249bfd26e66f81b3eb63a9ac528d2c1aadb7f4 (diff)
downloadtk-67fbe2530b1f554399831b61f7d03ab1ef722ef7.zip
tk-67fbe2530b1f554399831b61f7d03ab1ef722ef7.tar.gz
tk-67fbe2530b1f554399831b61f7d03ab1ef722ef7.tar.bz2
[Bug 3534137]: $tcl_platform(platform) != [tk windowingsystem]
Diffstat (limited to 'library')
-rw-r--r--library/bgerror.tcl10
-rw-r--r--library/button.tcl4
-rw-r--r--library/entry.tcl4
-rw-r--r--library/menu.tcl2
-rw-r--r--library/scale.tcl2
-rw-r--r--library/spinbox.tcl2
-rw-r--r--library/text.tcl6
-rw-r--r--library/tk.tcl4
8 files changed, 17 insertions, 17 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index 06c72a1..3372115 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -94,7 +94,7 @@ proc ::tk::dialog::error::bgerror err {
# we use the default dialog then :
set windowingsystem [tk windowingsystem]
- if {($tcl_platform(platform) eq "macintosh")
+ if {($windowingsystem eq "classic")
|| ($windowingsystem eq "aqua")} {
set ok [mc Ok]
set messageFont system
@@ -143,7 +143,7 @@ proc ::tk::dialog::error::bgerror err {
wm iconname .bgerrorDialog ErrorDialog
wm protocol .bgerrorDialog WM_DELETE_WINDOW { }
- if {($tcl_platform(platform) eq "macintosh")
+ if {($windowingsystem eq "classic")
|| ($windowingsystem eq "aqua")} {
::tk::unsupported::MacWindowStyle style .bgerrorDialog moveableAlert {}
} elseif {$windowingsystem eq "x11"} {
@@ -190,7 +190,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")
+ if {($windowingsystem eq "classic")
|| ($windowingsystem eq "aqua")} {
# On the Macintosh, use the stop bitmap
label .bgerrorDialog.bitmap -bitmap stop
@@ -226,7 +226,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")
+ if {($windowingsystem eq "classic")
|| ($windowingsystem eq "aqua")} {
if {($name eq "ok") || ($name eq "dismiss")} {
grid columnconfigure .bgerrorDialog.bot $i -minsize 90
@@ -251,7 +251,7 @@ proc ::tk::dialog::error::bgerror err {
# 7. Ensure that we are topmost.
raise .bgerrorDialog
- if {$tcl_platform(platform) eq "windows"} {
+ if {[tk windowingsystem] eq "win32"} {
# Place it topmost if we aren't at the top of the stacking
# order to ensure that it's seen
if {[lindex [wm stackorder .] end] ne ".bgerrorDialog"} {
diff --git a/library/button.tcl b/library/button.tcl
index 0da95f0..195566e 100644
--- a/library/button.tcl
+++ b/library/button.tcl
@@ -36,7 +36,7 @@ if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
tk::ButtonUp %W
}
}
-if {"windows" eq $tcl_platform(platform)} {
+if {"win32" eq [tk windowingsystem]} {
bind Checkbutton <equal> {
tk::CheckRadioInvoke %W select
}
@@ -125,7 +125,7 @@ bind Radiobutton <Leave> {
tk::ButtonLeave %W
}
-if {"windows" eq $tcl_platform(platform)} {
+if {"win32" eq [tk windowingsystem]} {
#########################
# Windows implementation
diff --git a/library/entry.tcl b/library/entry.tcl
index bfbaccf..93812b7 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -209,7 +209,7 @@ if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
# On Windows, paste is done using Shift-Insert. Shift-Insert already
# generates the <<Paste>> event, so we don't need to do anything here.
-if {$tcl_platform(platform) ne "windows"} {
+if {[tk windowingsystem] ne "win32"} {
bind Entry <Insert> {
catch {tk::EntryInsert %W [::tk::GetSelection %W PRIMARY]}
}
@@ -561,7 +561,7 @@ proc ::tk::EntryTranspose w {
# w - The entry window in which the cursor is to move.
# start - Position at which to start search.
-if {$tcl_platform(platform) eq "windows"} {
+if {[tk windowingsystem] eq "win32"} {
proc ::tk::EntryNextWord {w start} {
set pos [tcl_endOfWord [$w get] [$w index $start]]
if {$pos >= 0} {
diff --git a/library/menu.tcl b/library/menu.tcl
index 782a726..4ce0d8c 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -1189,7 +1189,7 @@ proc ::tk::PostOverPoint {menu x y {entry {}}} {
incr x [expr {-[winfo reqwidth $menu]/2}]
}
- if {$tcl_platform(platform) eq "windows"} {
+ if {[tk windowingsystem] eq "win32"} {
# osVersion is not available in safe interps
set ver 5
if {[info exists tcl_platform(osVersion)]} {
diff --git a/library/scale.tcl b/library/scale.tcl
index 41fd720..d5de754 100644
--- a/library/scale.tcl
+++ b/library/scale.tcl
@@ -60,7 +60,7 @@ bind Scale <ButtonRelease-2> {
tk::ScaleEndDrag %W
tk::ScaleActivate %W %x %y
}
-if {$tcl_platform(platform) eq "windows"} {
+if {[tk windowingsystem] eq "win32"} {
# On Windows do the same with button 3, as that is the right mouse button
bind Scale <3> [bind Scale <2>]
bind Scale <B3-Motion> [bind Scale <B2-Motion>]
diff --git a/library/spinbox.tcl b/library/spinbox.tcl
index 933c25c..9b63e09 100644
--- a/library/spinbox.tcl
+++ b/library/spinbox.tcl
@@ -217,7 +217,7 @@ if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
# On Windows, paste is done using Shift-Insert. Shift-Insert already
# generates the <<Paste>> event, so we don't need to do anything here.
-if {$tcl_platform(platform) ne "windows"} {
+if {[tk windowingsystem] ne "win32"} {
bind Spinbox <Insert> {
catch {::tk::EntryInsert %W [::tk::GetSelection %W PRIMARY]}
}
diff --git a/library/text.tcl b/library/text.tcl
index 3f608f3..3b32991 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -345,7 +345,7 @@ bind Text <<Redo>> {
catch { %W edit redo }
}
-if {$tcl_platform(platform) ne "windows"} {
+if {[tk windowingsystem] ne "win32"} {
bind Text <Control-v> {
if {!$tk_strictMotif} {
tk::TextScrollPages %W 1
@@ -530,7 +530,7 @@ proc ::tk::TextButton1 {w x y} {
$w mark set anchor insert
# Allow focus in any case on Windows, because that will let the
# selection be displayed even for state disabled text widgets.
- if {$::tcl_platform(platform) eq "windows" || [$w cget -state] eq "normal"} {focus $w}
+ if {[tk windowingsystem] eq "win32" || [$w cget -state] eq "normal"} {focus $w}
if {[$w cget -autoseparators]} {$w edit separator}
}
@@ -1040,7 +1040,7 @@ proc ::tk_textPaste w {
# w - The text window in which the cursor is to move.
# start - Position at which to start search.
-if {$tcl_platform(platform) eq "windows"} {
+if {[tk windowingsystem] eq "win32"} {
proc ::tk::TextNextWord {w start} {
TextNextPos $w [TextNextPos $w $start tcl_endOfWord] \
tcl_startOfNextWord
diff --git a/library/tk.tcl b/library/tk.tcl
index 57525f1..a09cd9c 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -199,7 +199,7 @@ proc ::tk::RestoreFocusGrab {grab focus {destroy destroy}} {
# Results:
# Returns the selection, or an error if none could be found
#
-if {$tcl_platform(platform) eq "unix"} {
+if {[tk windowingsystem] ne "win32"} {
proc ::tk::GetSelection {w {sel PRIMARY}} {
if {[catch {selection get -displayof $w -selection $sel \
-type UTF8_STRING} txt] \
@@ -405,7 +405,7 @@ switch [tk windowingsystem] {
# ----------------------------------------------------------------------
if {$::tk_library ne ""} {
- if {$tcl_platform(platform) eq "macintosh"} {
+ if {[tk windowingsystem] eq "classic"} {
proc ::tk::SourceLibFile {file} {
if {[catch {
namespace eval :: \