/[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 1518 by jonathan, Tue Jul 29 15:04:11 2003 UTC revision 1648 by bh, Mon Aug 25 13:55:35 2003 UTC
# Line 189  class ThubanApplication(wxApp, Publisher Line 189  class ThubanApplication(wxApp, Publisher
189          """          """
190          self.SetSession(create_empty_session())          self.SetSession(create_empty_session())
191    
192      def OpenSession(self, filename):      def OpenSession(self, filename, db_connection_callback = None):
193          """Open the session in the file named filename"""          """Open the session in the file named filename"""
194          # Make sure we deal with an absolute pathname. Otherwise we can          # Make sure we deal with an absolute pathname. Otherwise we can
195          # get problems when saving because the saving code expects an          # get problems when saving because the saving code expects an
196          # absolute directory name          # absolute directory name
197          filename = os.path.abspath(filename)          filename = os.path.abspath(filename)
198          session = load_session(filename)          session = load_session(filename,
199                                   db_connection_callback = db_connection_callback)
200          session.SetFilename(filename)          session.SetFilename(filename)
201          session.UnsetModified()          session.UnsetModified()
202          self.SetSession(session)          self.SetSession(session)
# Line 204  class ThubanApplication(wxApp, Publisher Line 205  class ThubanApplication(wxApp, Publisher
205              for layer in map.Layers():              for layer in map.Layers():
206                  if isinstance(layer, RasterLayer) \                  if isinstance(layer, RasterLayer) \
207                      and not Thuban.Model.resource.has_gdal_support():                      and not Thuban.Model.resource.has_gdal_support():
208                      msg = _("The current session contains Image layers,\n" +                      msg = _("The current session contains Image layers,\n"
209                              "but the GDAL library is not available to " +                              "but the GDAL library is not available to "
210                              "draw them.")                              "draw them.")
211                      dlg = wx.wxMessageDialog(None,                      dlg = wx.wxMessageDialog(None,
212                                               msg,                                               msg,
213                                               _("Library not available"),                                               _("Library not available"),
214                                               wx.wxOK | wx.wxICON_INFORMATION)                                               wx.wxOK | wx.wxICON_INFORMATION)
215                      print msg                      print msg

Legend:
Removed from v.1518  
changed lines
  Added in v.1648

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26