diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-10 14:58:08 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-10 14:58:08 (GMT) |
commit | 793eef48e4b6d7e97c23a87b23687a756cf98482 (patch) | |
tree | 741f4b49474055d2c37007d780f15d4c7772c3e1 /library | |
parent | d9503f7117b404a347ef78da625e2fa349396cf5 (diff) | |
parent | 538cdae2d292a523e1b72613162b236db2a16d08 (diff) | |
download | tk-793eef48e4b6d7e97c23a87b23687a756cf98482.zip tk-793eef48e4b6d7e97c23a87b23687a756cf98482.tar.gz tk-793eef48e4b6d7e97c23a87b23687a756cf98482.tar.bz2 |
[Bug 3534137]: $tcl_platform(platform) != [tk windowingsystem]
Diffstat (limited to 'library')
-rw-r--r-- | library/bgerror.tcl | 2 | ||||
-rw-r--r-- | library/button.tcl | 4 | ||||
-rw-r--r-- | library/demos/menu.tcl | 2 | ||||
-rw-r--r-- | library/demos/text.tcl | 6 | ||||
-rw-r--r-- | library/entry.tcl | 4 | ||||
-rw-r--r-- | library/menu.tcl | 2 | ||||
-rw-r--r-- | library/scale.tcl | 2 | ||||
-rw-r--r-- | library/spinbox.tcl | 2 | ||||
-rw-r--r-- | library/text.tcl | 4 | ||||
-rw-r--r-- | library/tk.tcl | 2 | ||||
-rw-r--r-- | library/ttk/entry.tcl | 2 |
11 files changed, 16 insertions, 16 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl index 3b21d4c..d1ed60a 100644 --- a/library/bgerror.tcl +++ b/library/bgerror.tcl @@ -233,7 +233,7 @@ proc ::tk::dialog::error::bgerror err { # 8. Ensure that we are topmost. raise $dlg - 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 "$dlg"} { diff --git a/library/button.tcl b/library/button.tcl index fb6ad1c..a1f0a26 100644 --- a/library/button.tcl +++ b/library/button.tcl @@ -39,7 +39,7 @@ if {[tk windowingsystem] eq "aqua"} { tk::ButtonLeave %W } } -if {"windows" eq $tcl_platform(platform)} { +if {"win32" eq [tk windowingsystem]} { bind Checkbutton <equal> { tk::CheckRadioInvoke %W select } @@ -131,7 +131,7 @@ bind Radiobutton <Leave> { tk::ButtonLeave %W } -if {"windows" eq $tcl_platform(platform)} { +if {"win32" eq [tk windowingsystem]} { ######################### # Windows implementation diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl index ebd44f7..e19df57 100644 --- a/library/demos/menu.tcl +++ b/library/demos/menu.tcl @@ -56,7 +56,7 @@ menu $m -tearoff 0 $m add command -label "Long entry that does nothing" if {[tk windowingsystem] eq "aqua"} { set modifier Command -} elseif {$tcl_platform(platform) == "windows"} { +} elseif {[tk windowingsystem] == "win32"} { set modifier Control } else { set modifier Meta diff --git a/library/demos/text.tcl b/library/demos/text.tcl index e1b3a0c..785e9e6 100644 --- a/library/demos/text.tcl +++ b/library/demos/text.tcl @@ -92,11 +92,11 @@ cursor. Control-t transposes the two characters on either side of the insertion cursor. Control-z undoes the last editing action performed, and } -switch $tcl_platform(platform) { - "unix" { +switch [tk windowingsystem] { + "aqua" - "x11" { $w.text insert end "Control-Shift-z" } - "windows" { + "win32" { $w.text insert end "Control-y" } } diff --git a/library/entry.tcl b/library/entry.tcl index 69480eb..de6c463 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -219,7 +219,7 @@ bind Entry <Up> {# nothing} # 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]} } @@ -579,7 +579,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 5fb96fa..cc57532 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -1219,7 +1219,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 d362284..b4da824 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 84a00a7..20b477a 100644 --- a/library/spinbox.tcl +++ b/library/spinbox.tcl @@ -223,7 +223,7 @@ if {[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 32fd9ad..331d1b4 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -560,7 +560,7 @@ proc ::tk::TextButton1 {w x y} { } # 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" \ + if {[tk windowingsystem] eq "win32" \ || [$w cget -state] eq "normal"} { focus $w } @@ -1118,7 +1118,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 deea9db..928fc2e 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -206,7 +206,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 diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl index faae7b2..a27921a 100644 --- a/library/ttk/entry.tcl +++ b/library/ttk/entry.tcl @@ -229,7 +229,7 @@ proc ttk::entry::See {w {index insert}} { # position following the next end-of-word position. # set ::ttk::entry::State(startNext) \ - [string equal $::tcl_platform(platform) "windows"] + [string equal [tk windowingsystem] "win32"] proc ttk::entry::NextWord {w start} { variable State |