/[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 1776 by bh, Mon Oct 6 15:13:35 2003 UTC revision 2051 by frank, Wed Jan 21 17:09:15 2004 UTC
# Line 61  class ThubanApplication(wxApp, Publisher Line 61  class ThubanApplication(wxApp, Publisher
61              self.ShowMainWindow()              self.ShowMainWindow()
62          self.session = None          self.session = None
63          self.create_session()          self.create_session()
64            self.path={"data":".", "projection":"."}
65          return True          return True
66    
67      def OnExit(self):      def OnExit(self):
# Line 164  class ThubanApplication(wxApp, Publisher Line 165  class ThubanApplication(wxApp, Publisher
165              self.unsubscribe_session(oldsession)              self.unsubscribe_session(oldsession)
166              oldsession.Destroy()              oldsession.Destroy()
167    
168        def SetPath(self, group, filename):
169            """Store the application's default path for file dialogs extracted
170            from a given filename.
171            """
172            self.path[group] = os.path.dirname( filename )
173    
174        def Path(self, group):
175            """Return the application's default path for file dialogs."""
176            return self.path[group]
177    
178      def subscribe_session(self, session):      def subscribe_session(self, session):
179          """Subscribe to some of the sessions channels.          """Subscribe to some of the sessions channels.
180    
# Line 270  class ThubanApplication(wxApp, Publisher Line 281  class ThubanApplication(wxApp, Publisher
281          try:          try:
282              lines = traceback.format_exception(exc_type, exc_value,              lines = traceback.format_exception(exc_type, exc_value,
283                                              exc_traceback)                                              exc_traceback)
284              message = _("An unhandled exception occurred:\n%s\n") % exc_value+\              message = _("An unhandled exception occurred:\n%s\n"
285                      _("(please report to") +\                          "(please report to"
286                      " http://thuban.intevation.org/bugtracker.html)"\                          " http://thuban.intevation.org/bugtracker.html)"
287                      "\n\n\n"+\                          "\n\n%s") % (exc_value, "".join(lines))
                     "".join(lines)  
288              print message              print message
289    
290              # We don't use an explicit parent here because this method might              # We don't use an explicit parent here because this method might

Legend:
Removed from v.1776  
changed lines
  Added in v.2051

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26