/[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 1163 by jan, Thu Jun 12 12:17:11 2003 UTC revision 1164 by jonathan, Thu Jun 12 12:41:44 2003 UTC
# Line 49  from Thuban.UI.dock import DockFrame Line 49  from Thuban.UI.dock import DockFrame
49  from Thuban.UI.join import JoinDialog  from Thuban.UI.join import JoinDialog
50    
51  import resource  import resource
52    import Thuban.Model.resource
53    
54  import projdialog  import projdialog
55    
   
   
56  class MainWindow(DockFrame):  class MainWindow(DockFrame):
57    
58      # Some messages that can be subscribed/unsubscribed directly through      # Some messages that can be subscribed/unsubscribed directly through
# Line 939  def _has_legend_shown(context): Line 938  def _has_legend_shown(context):
938      """Return true if the legend window is shown"""      """Return true if the legend window is shown"""
939      return context.mainwindow.LegendShown()      return context.mainwindow.LegendShown()
940    
941    def _has_gdal_support(context):
942        """Return True if the GDAL is available"""
943        return Thuban.Model.resource.has_gdal_support()
944    
945  # File menu  # File menu
946  _method_command("new_session", _("&New Session"), "NewSession",  _method_command("new_session", _("&New Session"), "NewSession",
# Line 1002  _method_command("map_rename", _("&Rename Line 1004  _method_command("map_rename", _("&Rename
1004  _method_command("layer_add", _("&Add Layer..."), "AddLayer",  _method_command("layer_add", _("&Add Layer..."), "AddLayer",
1005                  helptext = _("Add a new layer to the map"))                  helptext = _("Add a new layer to the map"))
1006  _method_command("rasterlayer_add", _("&Add Image Layer..."), "AddRasterLayer",  _method_command("rasterlayer_add", _("&Add Image Layer..."), "AddRasterLayer",
1007                  helptext = _("Add a new image layer to the map"))                  helptext = _("Add a new image layer to the map"),
1008                    sensitive = _has_gdal_support)
1009  _method_command("layer_remove", _("&Remove Layer"), "RemoveLayer",  _method_command("layer_remove", _("&Remove Layer"), "RemoveLayer",
1010                  helptext = _("Remove selected layer"),                  helptext = _("Remove selected layer"),
1011                  sensitive = _can_remove_layer)                  sensitive = _can_remove_layer)
# Line 1078  _method_command("table_join", _("&Join.. Line 1081  _method_command("table_join", _("&Join..
1081                  helptext = _("Join two tables creating a new one"))                  helptext = _("Join two tables creating a new one"))
1082    
1083  #  Export only under Windows ...  #  Export only under Windows ...
1084  map_menu = ["layer_add", "rasterlayer_add", "layer_remove", "map_rename",  map_menu = ["layer_add", "rasterlayer_add", "layer_remove",
1085                          None,                          None,
1086                            "map_rename",
1087                          "map_projection",                          "map_projection",
1088                          None,                          None,
1089                          "map_zoom_in_tool", "map_zoom_out_tool",                          "map_zoom_in_tool", "map_zoom_out_tool",

Legend:
Removed from v.1163  
changed lines
  Added in v.1164

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26