summaryrefslogtreecommitdiffstats
path: root/library/msgbox.tcl
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2001-08-01 16:21:11 (GMT)
committerdgp@users.sourceforge.net <dgp>2001-08-01 16:21:11 (GMT)
commitc7434cee89e3147e22707264d6a59c0f68153e58 (patch)
tree38846cbe94cc8aac068898282ced4624f130770e /library/msgbox.tcl
parent70f7337d907732723cfac8033e7ff856d33aa5e8 (diff)
downloadtk-c7434cee89e3147e22707264d6a59c0f68153e58.zip
tk-c7434cee89e3147e22707264d6a59c0f68153e58.tar.gz
tk-c7434cee89e3147e22707264d6a59c0f68153e58.tar.bz2
Merged changes from feature branch dgp-privates-into-namespace,
implementing TIP 44. All Tk commands and variables matching tk[A-Z]* are now in the ::tk namespace.
Diffstat (limited to 'library/msgbox.tcl')
-rw-r--r--library/msgbox.tcl21
1 files changed, 11 insertions, 10 deletions
diff --git a/library/msgbox.tcl b/library/msgbox.tcl
index 87b3e10..ade57ce 100644
--- a/library/msgbox.tcl
+++ b/library/msgbox.tcl
@@ -3,7 +3,7 @@
# Implements messageboxes for platforms that do not have native
# messagebox support.
#
-# RCS: @(#) $Id: msgbox.tcl,v 1.13 2001/06/14 10:56:58 dkf Exp $
+# RCS: @(#) $Id: msgbox.tcl,v 1.14 2001/08/01 16:21:11 dgp Exp $
#
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
#
@@ -114,7 +114,7 @@ static unsigned char w3_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};"
-# tkMessageBox --
+# ::tk::MessageBox --
#
# Pops up a messagebox with an application-supplied message with
# an icon and a list of buttons. This procedure will be called
@@ -130,11 +130,12 @@ static unsigned char w3_bits[] = {
#
# See the user documentation for details on what tk_messageBox does.
#
-proc tkMessageBox {args} {
- global tkPriv tcl_platform tk_strictMotif
+proc ::tk::MessageBox {args} {
+ global tcl_platform tk_strictMotif
+ variable ::tk::Priv
- set w tkPrivMsgBox
- upvar #0 $w data
+ set w ::tk::PrivMsgBox
+ upvar $w data
#
# The default value of the title is space (" ") not the empty string
@@ -364,7 +365,7 @@ proc tkMessageBox {args} {
set opts [list -text $capName]
}
- eval button [list $w.$name] $opts [list -command [list set tkPriv(button) $name]]
+ eval button [list $w.$name] $opts [list -command [list set tk::Priv(button) $name]]
if {[string equal $name $data(-default)]} {
$w.$name configure -default active
@@ -399,7 +400,7 @@ proc tkMessageBox {args} {
bind $w <Return> {
if {[string equal Button [winfo class %W]]} {
- tkButtonInvoke %W
+ tk::ButtonInvoke %W
}
}
@@ -424,9 +425,9 @@ proc tkMessageBox {args} {
# may take the focus away so we can't redirect it. Finally,
# restore any grab that was in effect.
- tkwait variable tkPriv(button)
+ vwait ::tk::Priv(button)
::tk::RestoreFocusGrab $w $focus
- return $tkPriv(button)
+ return $Priv(button)
}