summaryrefslogtreecommitdiffstats
path: root/library/menu.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-08-05 20:33:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-08-05 20:33:00 (GMT)
commit6ba2e41c6fe4434eae0a5b53cb3448fc95f667a9 (patch)
treeba3e06ffe6fd6984eed8bc65e6beca7e61d4e076 /library/menu.tcl
parent7607c52d6723742a4d0c6dc628d4289cec163520 (diff)
downloadtk-6ba2e41c6fe4434eae0a5b53cb3448fc95f667a9.zip
tk-6ba2e41c6fe4434eae0a5b53cb3448fc95f667a9.tar.gz
tk-6ba2e41c6fe4434eae0a5b53cb3448fc95f667a9.tar.bz2
Remove various unnecessary "global tcl_platform" occurrences, which are no longer used.
Add "Fit To Screen Width" menu entry to Windows (and android) console menu. Ported from androwish.
Diffstat (limited to 'library/menu.tcl')
-rw-r--r--library/menu.tcl11
1 files changed, 2 insertions, 9 deletions
diff --git a/library/menu.tcl b/library/menu.tcl
index 5a5d9de..a7aaa3f 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -248,7 +248,6 @@ proc ::tk::MbLeave w {
proc ::tk::MbPost {w {x {}} {y {}}} {
global errorInfo
variable ::tk::Priv
- global tcl_platform
if {[$w cget -state] eq "disabled" || $w eq $Priv(postedMb)} {
return
@@ -402,7 +401,6 @@ proc ::tk::MbPost {w {x {}} {y {}}} {
# is a posted menubutton.
proc ::tk::MenuUnpost menu {
- global tcl_platform
variable ::tk::Priv
set mb $Priv(postedMb)
@@ -531,7 +529,6 @@ proc ::tk::MbMotion {w upDown rootx rooty} {
proc ::tk::MbButtonUp w {
variable ::tk::Priv
- global tcl_platform
set menu [$w cget -menu]
set tearoff [expr {[tk windowingsystem] eq "x11" || \
@@ -606,7 +603,6 @@ proc ::tk::MenuMotion {menu x y state} {
proc ::tk::MenuButtonDown menu {
variable ::tk::Priv
- global tcl_platform
if {![winfo viewable $menu]} {
return
@@ -1218,8 +1214,6 @@ proc ::tk::MenuFindName {menu s} {
# upper-left corner goes at (x,y).
proc ::tk::PostOverPoint {menu x y {entry {}}} {
- global tcl_platform
-
if {$entry ne ""} {
if {$entry == [$menu index last]} {
incr y [expr {-([$menu yposition $entry] \
@@ -1234,8 +1228,8 @@ proc ::tk::PostOverPoint {menu x y {entry {}}} {
if {[tk windowingsystem] eq "win32"} {
# osVersion is not available in safe interps
set ver 5
- if {[info exists tcl_platform(osVersion)]} {
- scan $tcl_platform(osVersion) %d ver
+ if {[info exists ::tcl_platform(osVersion)]} {
+ scan $::tcl_platform(osVersion) %d ver
}
# We need to fix some problems with menu posting on Windows,
@@ -1340,7 +1334,6 @@ proc ::tk::GenerateMenuSelect {menu} {
proc ::tk_popup {menu x y {entry {}}} {
variable ::tk::Priv
- global tcl_platform
if {$Priv(popup) ne "" || $Priv(postedMb) ne ""} {
tk::MenuUnpost {}
}