summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk/Dialog.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-10-23 18:31:14 (GMT)
committerFred Drake <fdrake@acm.org>2000-10-23 18:31:14 (GMT)
commitd038ca830fd5a6bafbd24b70eb71aeae83d362d3 (patch)
tree1a1febed0b11a25efb04bc50be91d4be3003e497 /Lib/lib-tk/Dialog.py
parent16f6329e6153c4b92f2175a5560e372a762befe6 (diff)
downloadcpython-d038ca830fd5a6bafbd24b70eb71aeae83d362d3.zip
cpython-d038ca830fd5a6bafbd24b70eb71aeae83d362d3.tar.gz
cpython-d038ca830fd5a6bafbd24b70eb71aeae83d362d3.tar.bz2
Make reindent.py happy (convert everything to 4-space indents!).
Diffstat (limited to 'Lib/lib-tk/Dialog.py')
-rw-r--r--Lib/lib-tk/Dialog.py68
1 files changed, 34 insertions, 34 deletions
diff --git a/Lib/lib-tk/Dialog.py b/Lib/lib-tk/Dialog.py
index 67e7dc9..e529001 100644
--- a/Lib/lib-tk/Dialog.py
+++ b/Lib/lib-tk/Dialog.py
@@ -4,46 +4,46 @@ from Tkinter import *
from Tkinter import _cnfmerge
if TkVersion <= 3.6:
- DIALOG_ICON = 'warning'
+ DIALOG_ICON = 'warning'
else:
- DIALOG_ICON = 'questhead'
+ 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(
- apply(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 __init__(self, master=None, cnf={}, **kw):
+ cnf = _cnfmerge((cnf, kw))
+ self.widgetName = '__dialog__'
+ Widget._setup(self, master, cnf)
+ self.num = self.tk.getint(
+ apply(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
+ 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()
+ t = Button(None, {'text': 'Test',
+ 'command': _test,
+ Pack: {}})
+ q = Button(None, {'text': 'Quit',
+ 'command': t.quit,
+ Pack: {}})
+ t.mainloop()