mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
DialogWindows now have a self.dlg in addition to self.wid.
This commit is contained in:
parent
3ff82a3a4c
commit
ed24cd2cf7
3 changed files with 17 additions and 15 deletions
|
@ -222,8 +222,9 @@ class Application:
|
|||
return old
|
||||
|
||||
def do_dialogevent(self, event):
|
||||
gotone, window, item = DialogSelect(event)
|
||||
gotone, dlg, item = DialogSelect(event)
|
||||
if gotone:
|
||||
window = dlg.GetDialogWindow()
|
||||
if self._windows.has_key(window):
|
||||
self._windows[window].do_itemhit(item, event)
|
||||
else:
|
||||
|
@ -995,14 +996,15 @@ class DialogWindow(Window):
|
|||
"""A modeless dialog window"""
|
||||
|
||||
def open(self, resid):
|
||||
self.wid = GetNewDialog(resid, -1)
|
||||
self.dlg = GetNewDialog(resid, -1)
|
||||
self.wid = self.dlg.GetDialogWindow()
|
||||
self.do_postopen()
|
||||
|
||||
def close(self):
|
||||
self.do_postclose()
|
||||
|
||||
def do_itemhit(self, item, event):
|
||||
print 'Dialog %s, item %d hit'%(self.wid, item)
|
||||
print 'Dialog %s, item %d hit'%(self.dlg, item)
|
||||
|
||||
def do_rawupdate(self, window, event):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue