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

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

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

revision 1622 by jan, Thu Aug 21 11:56:06 2003 UTC revision 1625 by bh, Thu Aug 21 16:02:23 2003 UTC
# Line 28  import Thuban.version Line 28  import Thuban.version
28  from Thuban import _  from Thuban import _
29  from Thuban.Model.session import create_empty_session  from Thuban.Model.session import create_empty_session
30  from Thuban.Model.layer import Layer, RasterLayer  from Thuban.Model.layer import Layer, RasterLayer
31  from Thuban.Model.postgisdb import PostGISShapeStore  from Thuban.Model.postgisdb import PostGISShapeStore, has_postgis_support
32  # XXX: replace this by  # XXX: replace this by
33  # from wxPython.lib.dialogs import wxMultipleChoiceDialog  # from wxPython.lib.dialogs import wxMultipleChoiceDialog
34  # when Thuban does not support wxPython 2.4.0 any more.  # when Thuban does not support wxPython 2.4.0 any more.
# Line 972  def _has_dbconnections(context): Line 972  def _has_dbconnections(context):
972      """Return whether the the session has database connections"""      """Return whether the the session has database connections"""
973      return context.session.HasDBConnections()      return context.session.HasDBConnections()
974    
975    def _has_postgis_support(context):
976        return has_postgis_support()
977    
978    
979  # File menu  # File menu
980  _method_command("new_session", _("&New Session"), "NewSession",  _method_command("new_session", _("&New Session"), "NewSession",
981                  helptext = _("Start a new session"))                  helptext = _("Start a new session"))
# Line 988  _method_command("toggle_legend", _("Lege Line 992  _method_command("toggle_legend", _("Lege
992                  checked = _has_legend_shown,                  checked = _has_legend_shown,
993                  helptext = _("Toggle Legend on/off"))                  helptext = _("Toggle Legend on/off"))
994  _method_command("database_management", _("&Database Connections..."),  _method_command("database_management", _("&Database Connections..."),
995                  "DatabaseManagement")                  "DatabaseManagement",
996                    sensitive = _has_postgis_support)
997  _method_command("exit", _("E&xit"), "Exit",  _method_command("exit", _("E&xit"), "Exit",
998                  helptext = _("Finish working with Thuban"))                  helptext = _("Finish working with Thuban"))
999    

Legend:
Removed from v.1622  
changed lines
  Added in v.1625

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26