summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/dialog.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-20 07:13:37 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-20 07:13:37 (GMT)
commit6634bf2919d855ccd821e878b8cc00c7209f1cbe (patch)
tree77ef2dfaaf00ec144e75ac19708e4dd457604ebc /Lib/tkinter/dialog.py
parent33cece05b918dff706a4298e33f84d8e8a0391d2 (diff)
downloadcpython-6634bf2919d855ccd821e878b8cc00c7209f1cbe.zip
cpython-6634bf2919d855ccd821e878b8cc00c7209f1cbe.tar.gz
cpython-6634bf2919d855ccd821e878b8cc00c7209f1cbe.tar.bz2
Tkinter rename reversal: remove tkinter package, adapt imports and docs.
Diffstat (limited to 'Lib/tkinter/dialog.py')
-rw-r--r--Lib/tkinter/dialog.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/Lib/tkinter/dialog.py b/Lib/tkinter/dialog.py
deleted file mode 100644
index 75e7fed..0000000
--- a/Lib/tkinter/dialog.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# dialog.py -- Tkinter interface to the tk_dialog script.
-
-from tkinter import *
-from tkinter import _cnfmerge
-
-if TkVersion <= 3.6:
- DIALOG_ICON = 'warning'
-else:
- DIALOG_ICON = 'questhead'
-
-
-class Dialog(Widget):
- def __init__(self, master=None, cnf={}, **kw):
- cnf = _cnfmerge((cnf, kw))
- self.widgetName = '__dialog__'
- Widget._setup(self, master, cnf)
- self.num = self.tk.getint(
- self.tk.call(
- 'tk_dialog', self._w,
- cnf['title'], cnf['text'],
- cnf['bitmap'], cnf['default'],
- *cnf['strings']))
- try: Widget.destroy(self)
- except TclError: pass
- def destroy(self): pass
-
-def _test():
- d = Dialog(None, {'title': 'File Modified',
- 'text':
- 'File "Python.h" has been modified'
- ' since the last time it was saved.'
- ' Do you want to save it before'
- ' exiting the application.',
- 'bitmap': DIALOG_ICON,
- 'default': 0,
- 'strings': ('Save File',
- 'Discard Changes',
- 'Return to Editor')})
- print d.num
-
-
-if __name__ == '__main__':
- t = Button(None, {'text': 'Test',
- 'command': _test,
- Pack: {}})
- q = Button(None, {'text': 'Quit',
- 'command': t.quit,
- Pack: {}})
- t.mainloop()