summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/Dialog.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-07-14 15:29:10 (GMT)
committerGuido van Rossum <guido@python.org>1995-07-14 15:29:10 (GMT)
commit761c5aba8ecb1f3c4ff90ec76e1fd5639d21d89b (patch)
tree53d989e234bf0fe3ec4cb5d74c1f41adf43fc543 /Lib/tkinter/Dialog.py
parent677dfc37b5890e4d1223373bf450af8f7136f8b9 (diff)
downloadcpython-761c5aba8ecb1f3c4ff90ec76e1fd5639d21d89b.zip
cpython-761c5aba8ecb1f3c4ff90ec76e1fd5639d21d89b.tar.gz
cpython-761c5aba8ecb1f3c4ff90ec76e1fd5639d21d89b.tar.bz2
Tk 4.0 and Tcl 7.4 are now standard
Diffstat (limited to 'Lib/tkinter/Dialog.py')
-rwxr-xr-xLib/tkinter/Dialog.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/tkinter/Dialog.py b/Lib/tkinter/Dialog.py
index 022bd96..db8f5da 100755
--- a/Lib/tkinter/Dialog.py
+++ b/Lib/tkinter/Dialog.py
@@ -1,8 +1,16 @@
# Dialog.py -- Tkinter interface to the tk_dialog script.
+
from Tkinter import *
+if TkVersion == 3.6:
+ DIALOG_ICON = 'warning'
+else:
+ DIALOG_ICON = 'questhead'
+
+
class Dialog(Widget):
def __init__(self, master=None, cnf={}):
+ self.widgetName = '__dialog__'
Widget._setup(self, master, cnf)
self.num = self.tk.getint(
apply(self.tk.call,
@@ -21,7 +29,7 @@ def _test():
' since the last time it was saved.'
' Do you want to save it before'
' exiting the application.',
- 'bitmap': 'warning',
+ 'bitmap': DIALOG_ICON,
'default': 0,
'strings': ('Save File',
'Discard Changes',