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)
commit3525b8b01c138cbc30c498a9e0f9a587dab26e32 (patch)
treeba3e06ffe6fd6984eed8bc65e6beca7e61d4e076 /library/menu.tcl
parent9f976792239fa11da36f575e206bd8e6f1cc0045 (diff)
downloadtk-3525b8b01c138cbc30c498a9e0f9a587dab26e32.zip
tk-3525b8b01c138cbc30c498a9e0f9a587dab26e32.tar.gz
tk-3525b8b01c138cbc30c498a9e0f9a587dab26e32.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 {}
}