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

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

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

revision 401 by bh, Tue Feb 11 15:19:21 2003 UTC revision 518 by jonathan, Tue Mar 11 17:34:21 2003 UTC
# Line 30  import tree Line 30  import tree
30  from interactor import Interactor  from interactor import Interactor
31  import mainwindow  import mainwindow
32    
33  from messages import SESSION_CHANGED  from messages import SESSION_REPLACED
34    
35    
36    
# Line 56  class ThubanApplication(wxApp, Publisher Line 56  class ThubanApplication(wxApp, Publisher
56              self.ShowMainWindow()              self.ShowMainWindow()
57          self.session = None          self.session = None
58          self.create_session()          self.create_session()
59          return true          return True
60    
61      def OnExit(self):      def OnExit(self):
62          """Clean up code.          """Clean up code.
# Line 132  class ThubanApplication(wxApp, Publisher Line 132  class ThubanApplication(wxApp, Publisher
132          also arranges for ShowMainWindow to be called at the appropriate          also arranges for ShowMainWindow to be called at the appropriate
133          time.          time.
134          """          """
135          self.top.Show(true)          self.top.Show(True)
136                
137      def CreateMainWindow(self):      def CreateMainWindow(self):
138          """Create and return the main window for the application.          """Create and return the main window for the application.
# Line 157  class ThubanApplication(wxApp, Publisher Line 157  class ThubanApplication(wxApp, Publisher
157      def SetSession(self, session):      def SetSession(self, session):
158          """Make session the new session.          """Make session the new session.
159    
160          Issue SESSION_CHANGED after self.session has become the new          Issue SESSION_REPLACED after self.session has become the new
161          session. After the session has been assigned call          session. After the session has been assigned call
162          self.subscribe_session() with the new session and          self.subscribe_session() with the new session and
163          self.unsubscribe_session with the old one.          self.unsubscribe_session with the old one.
# Line 165  class ThubanApplication(wxApp, Publisher Line 165  class ThubanApplication(wxApp, Publisher
165          oldsession = self.session          oldsession = self.session
166          self.session = session          self.session = session
167          self.subscribe_session(self.session)          self.subscribe_session(self.session)
168          self.issue(SESSION_CHANGED)          self.issue(SESSION_REPLACED)
169          self.interactor.SetSession(session)          self.interactor.SetSession(session)
170          self.maps_changed()          self.maps_changed()
171          if oldsession is not None:          if oldsession is not None:

Legend:
Removed from v.401  
changed lines
  Added in v.518

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26