mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Tk 4.0 and Tcl 7.4 are now standard
This commit is contained in:
parent
677dfc37b5
commit
761c5aba8e
4 changed files with 314 additions and 156 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue