summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/msgbox.tcl13
1 files changed, 8 insertions, 5 deletions
diff --git a/library/msgbox.tcl b/library/msgbox.tcl
index b401ad1..cb69c69 100644
--- a/library/msgbox.tcl
+++ b/library/msgbox.tcl
@@ -123,6 +123,9 @@ static unsigned char w3_bits[] = {
# Color icons are used on Unix displays that have a color
# depth of 4 or more and $tk_strictMotif is not on.
#
+# Uses ::tk::PrivButton instead of ::tk::Priv(button).
+# See ticket e2cec2fa41.
+#
# This procedure is a private procedure shouldn't be called
# directly. Call tk_messageBox instead.
#
@@ -130,7 +133,7 @@ static unsigned char w3_bits[] = {
#
proc ::tk::MessageBox {args} {
global tk_strictMotif
- variable ::tk::Priv
+ variable ::tk::PrivButton
set w ::tk::PrivMsgBox
upvar $w data
@@ -336,7 +339,7 @@ proc ::tk::MessageBox {args} {
}
eval [list tk::AmpWidget ttk::button $w.$name] $opts \
- [list -command [list set tk::Priv(button) $name]]
+ [list -command [list set tk::PrivButton $name]]
if {$name eq $data(-default)} {
$w.$name configure -default active
@@ -393,7 +396,7 @@ proc ::tk::MessageBox {args} {
bind $w <Escape> [list $w.$cancel invoke]
# At <Destroy> the buttons have vanished, so must do this directly.
- bind $w.msg <Destroy> [list set tk::Priv(button) $cancel]
+ bind $w.msg <Destroy> [list set tk::PrivButton $cancel]
# 7. Withdraw the window, then update all the geometry information
# so we know how big it wants to be, then center the window in the
@@ -416,10 +419,10 @@ proc ::tk::MessageBox {args} {
# may take the focus away so we can't redirect it. Finally,
# restore any grab that was in effect.
- vwait ::tk::Priv(button)
+ vwait ::tk::PrivButton
# Copy the result now so any <Destroy> that happens won't cause
# trouble
- set result $Priv(button)
+ set result $PrivButton
::tk::RestoreFocusGrab $w $focus