/[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 535 by bh, Fri Mar 14 20:42:18 2003 UTC revision 765 by bh, Tue Apr 29 12:42:14 2003 UTC
# Line 62  class ThubanApplication(wxApp, Publisher Line 62  class ThubanApplication(wxApp, Publisher
62          Extend this in derived classes if needed.          Extend this in derived classes if needed.
63          """          """
64          self.session.Destroy()          self.session.Destroy()
65            self.session = None
66          Publisher.Destroy(self)          Publisher.Destroy(self)
67    
     def MainLoop(self):  
         """Call the inherited MainLoop method and then call OnExit.  
   
         In wxPython OnExit isn't called automatically, unfortunately, so  
         we do it here.  
         """  
         wxApp.MainLoop(self)  
         self.OnExit()  
   
68      def read_startup_files(self):      def read_startup_files(self):
69          """Read the startup files."""          """Read the startup files."""
70          # for now the startup file is ~/.thuban/thubanstart.py          # for now the startup file is ~/.thuban/thubanstart.py
# Line 88  class ThubanApplication(wxApp, Publisher Line 80  class ThubanApplication(wxApp, Publisher
80                          # The ImportError exception was raised from                          # The ImportError exception was raised from
81                          # inside the thubanstart module.                          # inside the thubanstart module.
82                          sys.stderr.write(_("Cannot import the thubanstart"                          sys.stderr.write(_("Cannot import the thubanstart"
83                                           "module\n"))                                           " module\n"))
84                          traceback.print_exc(None, sys.stderr)                          traceback.print_exc(None, sys.stderr)
85                      else:                      else:
86                          # There's no thubanstart module.                          # There's no thubanstart module.
# Line 191  class ThubanApplication(wxApp, Publisher Line 183  class ThubanApplication(wxApp, Publisher
183          self.SetSession(create_empty_session())          self.SetSession(create_empty_session())
184    
185      def OpenSession(self, filename):      def OpenSession(self, filename):
186            """Open the session in the file named filename"""
187            # Make sure we deal with an absolute pathname. Otherwise we can
188            # get problems when saving because the saving code expects an
189            # absolute directory name
190            filename = os.path.abspath(filename)
191          session = load_session(filename)          session = load_session(filename)
192          session.SetFilename(filename)          session.SetFilename(filename)
193          session.UnsetModified()          session.UnsetModified()

Legend:
Removed from v.535  
changed lines
  Added in v.765

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26