summaryrefslogtreecommitdiffstats
path: root/library/msgbox.tcl
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2023-08-21 23:41:40 (GMT)
committerkjnash <k.j.nash@usa.net>2023-08-21 23:41:40 (GMT)
commit561272cb0b7555a05c04b08986ba67bd978740ca (patch)
tree4baeb66c2dfe7c210e013ea4644f68acb793fe38 /library/msgbox.tcl
parent857bd32afbdcb569193e8105ffe0901b22e8583c (diff)
downloadtk-561272cb0b7555a05c04b08986ba67bd978740ca.zip
tk-561272cb0b7555a05c04b08986ba67bd978740ca.tar.gz
tk-561272cb0b7555a05c04b08986ba67bd978740ca.tar.bz2
Use ::tk::PrivButton instead of ::tk::Priv(button) in ::tk::MessageBox - see Tk ticket e2cec2fa41.
Diffstat (limited to 'library/msgbox.tcl')
-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