diff options
author | Barry Warsaw <barry@python.org> | 1998-10-06 19:50:33 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1998-10-06 19:50:33 (GMT) |
commit | e7f4a47bbf0e548f45446af661129e8776c965e5 (patch) | |
tree | da58f180f1497ab212beeaea6b2aba2edfe341e0 /Tools/pynche/PyncheWidget.py | |
parent | 45c8d3421693e709530c6e95c5ae7a4e82310a71 (diff) | |
download | cpython-e7f4a47bbf0e548f45446af661129e8776c965e5.zip cpython-e7f4a47bbf0e548f45446af661129e8776c965e5.tar.gz cpython-e7f4a47bbf0e548f45446af661129e8776c965e5.tar.bz2 |
Better initial color choosing
Diffstat (limited to 'Tools/pynche/PyncheWidget.py')
-rw-r--r-- | Tools/pynche/PyncheWidget.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Tools/pynche/PyncheWidget.py b/Tools/pynche/PyncheWidget.py index 85008ac..a5560cc 100644 --- a/Tools/pynche/PyncheWidget.py +++ b/Tools/pynche/PyncheWidget.py @@ -40,7 +40,7 @@ class PyncheWidget: # filemenu = self.__filemenu = Menu(menubar, tearoff=0) filemenu.add_command(label='Quit', - command=tkroot.quit, + command=self.__quit, accelerator='Alt-Q', underline=0) # @@ -78,12 +78,15 @@ class PyncheWidget: # now create the top level window root = self.__root = Toplevel(tkroot, class_='Pynche', menu=menubar) - root.protocol('WM_DELETE_WINDOW', tkroot.quit) + root.protocol('WM_DELETE_WINDOW', self.__quit) root.title('Pynche %s' % version) root.iconname('Pynche') root.tk.createtimerhandler(KEEPALIVE_TIMER, self.__keepalive) - root.bind('<Alt-q>', tkroot.quit) - root.bind('<Alt-Q>', tkroot.quit) + root.bind('<Alt-q>', self.__quit) + root.bind('<Alt-Q>', self.__quit) + + def __quit(self, event=None): + self.__root.quit() def __keepalive(self): # Exercise the Python interpreter regularly so keyboard interrupts get |