/[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 1704 by jan, Wed Sep 3 07:02:36 2003 UTC revision 1874 by bh, Mon Oct 27 17:36:49 2003 UTC
# Line 234  class ThubanApplication(wxApp, Publisher Line 234  class ThubanApplication(wxApp, Publisher
234          save_session(self.session, self.session.filename)          save_session(self.session, self.session.filename)
235    
236      def maps_changed(self, *args):      def maps_changed(self, *args):
237            """Subscribed to the session's MAPS_CHANGED messages.
238    
239            Set the toplevel window's map to the map in the session. This is
240            done by calling the window's SetMap method with the map as
241            argument. If the session doesn't have any maps None is used
242            instead.
243    
244            Currently Thuban can only really handle at most one map in a
245            sessions so the first map in the session's list of maps as
246            returned by the Maps method is used.
247            """
248          if self.session.HasMaps():          if self.session.HasMaps():
249              self.top.SetMap(self.session.Maps()[0])              self.top.SetMap(self.session.Maps()[0])
250          else:          else:
# Line 259  class ThubanApplication(wxApp, Publisher Line 270  class ThubanApplication(wxApp, Publisher
270          try:          try:
271              lines = traceback.format_exception(exc_type, exc_value,              lines = traceback.format_exception(exc_type, exc_value,
272                                              exc_traceback)                                              exc_traceback)
273              message = _("An unhandled exception occurred:\n%s\n") % exc_value+\              message = _("An unhandled exception occurred:\n%s\n"
274                      _("(please report to") +\                          "(please report to"
275                      " http://thuban.intevation.org/bugtracker.html)"\                          " http://thuban.intevation.org/bugtracker.html)"
276                      "\n\n\n"+\                          "\n\n%s") % (exc_value, "".join(lines))
                     "".join(lines)  
277              print message              print message
278    
279              # 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.1704  
changed lines
  Added in v.1874

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26