diff options
author | Guido van Rossum <guido@python.org> | 1995-07-14 15:29:10 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-07-14 15:29:10 (GMT) |
commit | 761c5aba8ecb1f3c4ff90ec76e1fd5639d21d89b (patch) | |
tree | 53d989e234bf0fe3ec4cb5d74c1f41adf43fc543 /Lib/lib-tk/Dialog.py | |
parent | 677dfc37b5890e4d1223373bf450af8f7136f8b9 (diff) | |
download | cpython-761c5aba8ecb1f3c4ff90ec76e1fd5639d21d89b.zip cpython-761c5aba8ecb1f3c4ff90ec76e1fd5639d21d89b.tar.gz cpython-761c5aba8ecb1f3c4ff90ec76e1fd5639d21d89b.tar.bz2 |
Tk 4.0 and Tcl 7.4 are now standard
Diffstat (limited to 'Lib/lib-tk/Dialog.py')
-rw-r--r-- | Lib/lib-tk/Dialog.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/lib-tk/Dialog.py b/Lib/lib-tk/Dialog.py index 022bd96..db8f5da 100644 --- a/Lib/lib-tk/Dialog.py +++ b/Lib/lib-tk/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', |