/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/dialogs.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/dialogs.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1057 by frank, Tue May 27 11:30:02 2003 UTC revision 1891 by bh, Thu Oct 30 18:16:39 2003 UTC
# Line 10  Line 10 
10    
11  __version__ = "$Revision$"  __version__ = "$Revision$"
12    
 from wxPython.wx import wxFrame, wxDEFAULT_FRAME_STYLE, EVT_CLOSE  
   
 #class NonModalDialog(wxFrame):  
 #  
 #    def __init__(self, parent, name, title):  
 #        wxFrame.__init__(self, parent, -1, title,  
 #            style = wxDEFAULT_FRAME_STYLE )  
 #        self.parent = parent  
 #        self.name = name  
 #        EVT_CLOSE(self, self.OnClose)  
 #  
 #    def OnClose(self, event):  
 #        self.parent.remove_dialog(self.name)  
 #        self.Destroy()  
 #  
13  from wxPython.wx import *  from wxPython.wx import *
14    
15    class ThubanFrame(wxFrame):
16    
17        def __init__(self, parent, name, title):
18            wxFrame.__init__(self, parent, -1, title,
19                style = wxDEFAULT_FRAME_STYLE )
20            self.parent = parent
21            self.name = name
22            EVT_CLOSE(self, self.OnClose)
23            EVT_WINDOW_DESTROY(self, self.OnDestroy)
24    
25        def OnClose(self, event):
26            # FIXME: Shouldn't this really be in OnDestroy?
27            if self.parent.dialogs.has_key(self.name):
28                self.parent.remove_dialog(self.name)
29            self.Destroy()
30    
31        def OnDestroy(self, event):
32            """Implement in derived classes for resource cleanup, etc."""
33    
34    
35  class NonModalDialog(wxDialog):  class NonModalDialog(wxDialog):
36      def __init__(self, parent, name, title):      def __init__(self, parent, name, title):
37          wxDialog.__init__(self, parent, -1, title,          wxDialog.__init__(self, parent, -1, title,

Legend:
Removed from v.1057  
changed lines
  Added in v.1891

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26