summaryrefslogtreecommitdiffstats
path: root/library/msgbox.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2001-08-01 16:21:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2001-08-01 16:21:11 (GMT)
commit98ea3cb2214b51432f38f6ea50c1c429397281cc (patch)
tree38846cbe94cc8aac068898282ced4624f130770e /library/msgbox.tcl
parent7e9aececf720b6f0e20157366f8e977ad2378ddd (diff)
downloadtk-98ea3cb2214b51432f38f6ea50c1c429397281cc.zip
tk-98ea3cb2214b51432f38f6ea50c1c429397281cc.tar.gz
tk-98ea3cb2214b51432f38f6ea50c1c429397281cc.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)
}