diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-26 13:50:50 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-26 13:50:50 (GMT) |
| commit | e46ef289e142982d7bd592faa7b0f85470364c01 (patch) | |
| tree | cda253e03788f7db0a7cdcd05662f66b4455e298 /src/python/stdlib/lib-tk/Dialog.py | |
| parent | d0d0d62bbcbb5c3417f8cba419c83bac192ea985 (diff) | |
| download | powder-e46ef289e142982d7bd592faa7b0f85470364c01.zip powder-e46ef289e142982d7bd592faa7b0f85470364c01.tar.gz | |
Remove Python console stuff
Diffstat (limited to 'src/python/stdlib/lib-tk/Dialog.py')
| -rw-r--r-- | src/python/stdlib/lib-tk/Dialog.py | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/python/stdlib/lib-tk/Dialog.py b/src/python/stdlib/lib-tk/Dialog.py deleted file mode 100644 index 2d08959..0000000 --- a/src/python/stdlib/lib-tk/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() |
