/[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 1126 by bh, Mon Jun 2 14:15:43 2003 UTC revision 1667 by bh, Thu Aug 28 10:21:05 2003 UTC
# Line 12  The main window Line 12  The main window
12  """  """
13    
14  __version__ = "$Revision$"  __version__ = "$Revision$"
15    # $Source$
16  __ThubanVersion__ = "0.2" #"$THUBAN_0_2$"  # $Id$
 #__BuildDate__ = "$Date$"  
17    
18  import os  import os
19  import copy  import copy
20    
21  from wxPython.wx import *  from wxPython.wx import *
 from wxPython.wx import __version__ as wxPython_version  
   
 from wxPython.lib.dialogs import wxMultipleChoiceDialog  
22    
23  import Thuban  import Thuban
 import Thuban.version  
24    
25  from Thuban import _  from Thuban import _
26  from Thuban.Model.session import create_empty_session  from Thuban.Model.session import create_empty_session
27  from Thuban.Model.layer import Layer, RasterLayer  from Thuban.Model.layer import Layer, RasterLayer
28    from Thuban.Model.postgisdb import PostGISShapeStore, has_postgis_support
29    # XXX: replace this by
30    # from wxPython.lib.dialogs import wxMultipleChoiceDialog
31    # when Thuban does not support wxPython 2.4.0 any more.
32    from Thuban.UI.multiplechoicedialog import wxMultipleChoiceDialog
33    
34  import view  import view
35  import tree  import tree
# Line 40  from menu import Menu Line 40  from menu import Menu
40    
41  from context import Context  from context import Context
42  from command import registry, Command, ToolCommand  from command import registry, Command, ToolCommand
43  from messages import LAYER_SELECTED, SHAPES_SELECTED, VIEW_POSITION  from messages import LAYER_SELECTED, SHAPES_SELECTED, VIEW_POSITION, \
44         MAP_REPLACED
45    from about import About
46    
47  from Thuban.UI.dock import DockFrame  from Thuban.UI.dock import DockFrame
48  from Thuban.UI.join import JoinDialog  from Thuban.UI.join import JoinDialog
49    from Thuban.UI.dbdialog import DBFrame, DBDialog, ChooseDBTableDialog
50  import resource  import resource
51    import Thuban.Model.resource
52    
53  import projdialog  import projdialog
54    
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 59  class MainWindow(DockFrame): Line 61  class MainWindow(DockFrame):
61      # actually come from. This delegation is implemented in the      # actually come from. This delegation is implemented in the
62      # Subscribe and unsubscribed methods      # Subscribe and unsubscribed methods
63      delegated_messages = {LAYER_SELECTED: "canvas",      delegated_messages = {LAYER_SELECTED: "canvas",
64                            SHAPES_SELECTED: "canvas"}                            SHAPES_SELECTED: "canvas",
65                              MAP_REPLACED: "canvas"}
66    
67      # Methods delegated to some instance variables. The delegation is      # Methods delegated to some instance variables. The delegation is
68      # implemented in the __getattr__ method.      # implemented in the __getattr__ method.
# Line 105  class MainWindow(DockFrame): Line 108  class MainWindow(DockFrame):
108    
109          self.init_dialogs()          self.init_dialogs()
110    
111            self.ShowLegend()
112    
113          EVT_CLOSE(self, self.OnClose)          EVT_CLOSE(self, self.OnClose)
114    
115      def Subscribe(self, channel, *args):      def Subscribe(self, channel, *args):
# Line 358  class MainWindow(DockFrame): Line 363  class MainWindow(DockFrame):
363              result = wxID_NO              result = wxID_NO
364          return result          return result
365    
     def prepare_new_session(self):  
         for d in self.dialogs.values():  
             if not isinstance(d, tree.SessionTreeView):  
                 d.Close()  
   
366      def NewSession(self):      def NewSession(self):
367          if self.save_modified_session() != wxID_CANCEL:          if self.save_modified_session() != wxID_CANCEL:
             self.prepare_new_session()  
368              self.application.SetSession(create_empty_session())              self.application.SetSession(create_empty_session())
369    
370      def OpenSession(self):      def OpenSession(self):
# Line 374  class MainWindow(DockFrame): Line 373  class MainWindow(DockFrame):
373                                 "Thuban Session File (*.thuban)|*.thuban",                                 "Thuban Session File (*.thuban)|*.thuban",
374                                 wxOPEN)                                 wxOPEN)
375              if dlg.ShowModal() == wxID_OK:              if dlg.ShowModal() == wxID_OK:
376                  self.prepare_new_session()                  self.application.OpenSession(dlg.GetPath(),
377                  self.application.OpenSession(dlg.GetPath())                                               self.run_db_param_dialog)
378              dlg.Destroy()              dlg.Destroy()
379    
380        def run_db_param_dialog(self, parameters, message):
381            dlg = DBDialog(self, _("DB Connection Parameters"), parameters,
382                           message)
383            return dlg.RunDialog()
384    
385      def SaveSession(self):      def SaveSession(self):
386          if self.application.session.filename == None:          if self.application.session.filename == None:
387              self.SaveSessionAs()              self.SaveSessionAs()
# Line 440  class MainWindow(DockFrame): Line 444  class MainWindow(DockFrame):
444          return self.get_open_dialog("session_tree") is not None          return self.get_open_dialog("session_tree") is not None
445    
446      def About(self):      def About(self):
447          self.RunMessageBox(_("About"),          dlg = About(self)
448                             _("Thuban %s\n"          dlg.ShowModal()
449                              #"Build Date: %s\n"          dlg.Destroy()
450                              "using:\n"  
451                              "  %s\n"      def DatabaseManagement(self):
452                              "  %s\n\n"          name = "dbmanagement"
453                              "Thuban is a program for\n"          dialog = self.get_open_dialog(name)
454                              "exploring geographic data.\n"          if dialog is None:
455                              "Copyright (C) 2001-2003 Intevation GmbH.\n"              map = self.canvas.Map()
456                              "Thuban is licensed under the GNU GPL"              dialog = DBFrame(self, name, self.application.Session())
457                              % (Thuban.version.longversion,              self.add_dialog(name, dialog)
458                                 "wxPython %s" % wxPython_version,              dialog.Show()
459                                 "Python %d.%d.%d" % sys.version_info[:3]          dialog.Raise()
                               )),  
 #                           % __ThubanVersion__), #__BuildDate__)),  
                            wxOK | wxICON_INFORMATION)  
460    
461      def AddLayer(self):      def AddLayer(self):
462          dlg = wxFileDialog(self, _("Select a data file"), ".", "", "*.*",          dlg = wxFileDialog(self, _("Select one or more data files"), ".", "",
463                             wxOPEN)                             _("Shapefiles (*.shp)") + "|*.shp|" +
464                               _("All Files (*.*)") + "|*.*",
465                               wxOPEN | wxMULTIPLE)
466          if dlg.ShowModal() == wxID_OK:          if dlg.ShowModal() == wxID_OK:
467              filename = dlg.GetPath()              filenames = dlg.GetPaths()
468              title = os.path.splitext(os.path.basename(filename))[0]              for filename in filenames:
469              map = self.canvas.Map()                  title = os.path.splitext(os.path.basename(filename))[0]
470              has_layers = map.HasLayers()                  map = self.canvas.Map()
471              try:                  has_layers = map.HasLayers()
472                  store = self.application.Session().OpenShapefile(filename)                  try:
473              except IOError:                      store = self.application.Session().OpenShapefile(filename)
474                  # the layer couldn't be opened                  except IOError:
475                  self.RunMessageBox(_("Add Layer"),                      # the layer couldn't be opened
476                                     _("Can't open the file '%s'.") % filename)                      self.RunMessageBox(_("Add Layer"),
477              else:                                         _("Can't open the file '%s'.")%filename)
478                  layer = Layer(title, store)                  else:
479                  map.AddLayer(layer)                      layer = Layer(title, store)
480                  if not has_layers:                      map.AddLayer(layer)
481                      # if we're adding a layer to an empty map, fit the                      if not has_layers:
482                      # new map to the window                          # if we're adding a layer to an empty map, fit the
483                      self.canvas.FitMapToWindow()                          # new map to the window
484                            self.canvas.FitMapToWindow()
485          dlg.Destroy()          dlg.Destroy()
486    
487      def AddRasterLayer(self):      def AddRasterLayer(self):
# Line 502  class MainWindow(DockFrame): Line 506  class MainWindow(DockFrame):
506                      self.canvas.FitMapToWindow()                      self.canvas.FitMapToWindow()
507          dlg.Destroy()          dlg.Destroy()
508    
509        def AddDBLayer(self):
510            """Add a layer read from a database"""
511            session = self.application.Session()
512            dlg = ChooseDBTableDialog(self.application.Session(), self,-1, "")
513    
514            if dlg.ShowModal() == wxID_OK:
515                dbconn, dbtable = dlg.GetTable()
516                try:
517                    title = str(dbtable)
518    
519                    # Chose the correct Interface for the database type
520                    store = PostGISShapeStore(dbconn, dbtable)
521                    session.AddShapeStore(store)
522                    layer = Layer(title, store)
523                except:
524                    # Some error occured while initializing the layer
525                    self.RunMessageBox(_("Add Layer from database"),
526                                       _("Can't open the database table '%s'")
527                                       % dbtable)
528    
529                map = self.canvas.Map()
530    
531                has_layers = map.HasLayers()
532                map.AddLayer(layer)
533                if not has_layers:
534                    self.canvas.FitMapToWindow()
535    
536            dlg.Destroy()
537    
538      def RemoveLayer(self):      def RemoveLayer(self):
539          layer = self.current_layer()          layer = self.current_layer()
540          if layer is not None:          if layer is not None:
# Line 575  class MainWindow(DockFrame): Line 608  class MainWindow(DockFrame):
608      def LayerShowTable(self):      def LayerShowTable(self):
609          layer = self.current_layer()          layer = self.current_layer()
610          if layer is not None:          if layer is not None:
611              table = layer.table              table = layer.ShapeStore().Table()
612              name = "table_view" + str(id(table))              name = "table_view" + str(id(table))
613              dialog = self.get_open_dialog(name)              dialog = self.get_open_dialog(name)
614              if dialog is None:              if dialog is None:
# Line 632  class MainWindow(DockFrame): Line 665  class MainWindow(DockFrame):
665          dialog = self.get_open_dialog(name)          dialog = self.get_open_dialog(name)
666    
667          if dialog is None:          if dialog is None:
668              dialog = Classifier(self, name, layer, group)              dialog = Classifier(self, name, self.Map(), layer, group)
669              self.add_dialog(name, dialog)              self.add_dialog(name, dialog)
670              dialog.Show()              dialog.Show()
671          dialog.Raise()          dialog.Raise()
# Line 670  class MainWindow(DockFrame): Line 703  class MainWindow(DockFrame):
703          else:          else:
704              dialog.Show(not dialog.IsShown())              dialog.Show(not dialog.IsShown())
705    
         self.canvas.FitMapToWindow()  
   
706      def LegendShown(self):      def LegendShown(self):
707          """Return true iff the legend is currently open"""          """Return true iff the legend is currently open"""
708          dialog = self.FindRegisteredDock("legend")          dialog = self.FindRegisteredDock("legend")
# Line 747  class MainWindow(DockFrame): Line 778  class MainWindow(DockFrame):
778                                                 table)                                                 table)
779              self.add_dialog(name, dialog)              self.add_dialog(name, dialog)
780              dialog.Show(True)              dialog.Show(True)
781          # FIXME: else bring dialog to front          dialog.Raise()
782    
783      def TableRename(self):      def TableRename(self):
784          """Let the user rename a table"""          """Let the user rename a table"""
# Line 936  def _has_legend_shown(context): Line 967  def _has_legend_shown(context):
967      """Return true if the legend window is shown"""      """Return true if the legend window is shown"""
968      return context.mainwindow.LegendShown()      return context.mainwindow.LegendShown()
969    
970    def _has_gdal_support(context):
971        """Return True if the GDAL is available"""
972        return Thuban.Model.resource.has_gdal_support()
973    
974    def _has_dbconnections(context):
975        """Return whether the the session has database connections"""
976        return context.session.HasDBConnections()
977    
978    def _has_postgis_support(context):
979        return has_postgis_support()
980    
981    
982  # File menu  # File menu
983  _method_command("new_session", _("&New Session"), "NewSession")  _method_command("new_session", _("&New Session"), "NewSession",
984  _method_command("open_session", _("&Open Session..."), "OpenSession")                  helptext = _("Start a new session"))
985  _method_command("save_session", _("&Save Session"), "SaveSession")  _method_command("open_session", _("&Open Session..."), "OpenSession",
986  _method_command("save_session_as", _("Save Session &As..."), "SaveSessionAs")                  helptext = _("Open a session file"))
987    _method_command("save_session", _("&Save Session"), "SaveSession",
988                    helptext =_("Save this session to the file it was opened from"))
989    _method_command("save_session_as", _("Save Session &As..."), "SaveSessionAs",
990                    helptext = _("Save this session to a new file"))
991  _method_command("toggle_session_tree", _("Session &Tree"), "ToggleSessionTree",  _method_command("toggle_session_tree", _("Session &Tree"), "ToggleSessionTree",
992                  checked = _has_tree_window_shown)                  checked = _has_tree_window_shown,
993                    helptext = _("Toggle on/off the session tree analysis window"))
994  _method_command("toggle_legend", _("Legend"), "ToggleLegend",  _method_command("toggle_legend", _("Legend"), "ToggleLegend",
995                  checked = _has_legend_shown)                  checked = _has_legend_shown,
996  _method_command("exit", _("E&xit"), "Exit")                  helptext = _("Toggle Legend on/off"))
997    _method_command("database_management", _("&Database Connections..."),
998                    "DatabaseManagement",
999                    sensitive = _has_postgis_support)
1000    _method_command("exit", _("E&xit"), "Exit",
1001                    helptext = _("Finish working with Thuban"))
1002    
1003  # Help menu  # Help menu
1004  _method_command("help_about", _("&About..."), "About")  _method_command("help_about", _("&About..."), "About",
1005                    helptext = _("Info about Thuban authors, version and modules"))
1006    
1007    
1008  # Map menu  # Map menu
1009  _method_command("map_projection", _("Pro&jection..."), "MapProjection")  _method_command("map_projection", _("Pro&jection..."), "MapProjection",
1010                    helptext = _("Set or change the map projection"))
1011    
1012  _tool_command("map_zoom_in_tool", _("&Zoom in"), "ZoomInTool", "ZoomInTool",  _tool_command("map_zoom_in_tool", _("&Zoom in"), "ZoomInTool", "ZoomInTool",
1013                helptext = _("Switch to map-mode 'zoom-in'"), icon = "zoom_in",                helptext = _("Switch to map-mode 'zoom-in'"), icon = "zoom_in",
# Line 972  _tool_command("map_label_tool", _("&Labe Line 1026  _tool_command("map_label_tool", _("&Labe
1026                helptext = _("Add/Remove labels"), icon = "label",                helptext = _("Add/Remove labels"), icon = "label",
1027                sensitive = _has_visible_map)                sensitive = _has_visible_map)
1028  _method_command("map_full_extent", _("&Full extent"), "FullExtent",  _method_command("map_full_extent", _("&Full extent"), "FullExtent",
1029                 helptext = _("Full Extent"), icon = "fullextent",                 helptext = _("Zoom to the full map extent"), icon = "fullextent",
1030                sensitive = _has_visible_map)                sensitive = _has_visible_map)
1031  _method_command("layer_full_extent", _("&Full layer extent"), "FullLayerExtent",  _method_command("layer_full_extent", _("&Full layer extent"), "FullLayerExtent",
1032                 helptext = _("Full Layer Extent"), icon = "fulllayerextent",                  helptext = _("Zoom to the full layer extent"),
1033                sensitive = _has_selected_layer)                  icon = "fulllayerextent", sensitive = _has_selected_layer)
1034  _method_command("selected_full_extent", _("&Full selection extent"), "FullSelectionExtent",  _method_command("selected_full_extent", _("&Full selection extent"),
1035                 helptext = _("Full Selection Extent"), icon = "fullselextent",                  "FullSelectionExtent",
1036                sensitive = _has_selected_shapes)                  helptext = _("Zoom to the full selection extent"),
1037                    icon = "fullselextent", sensitive = _has_selected_shapes)
1038  _method_command("map_export", _("E&xport"), "ExportMap",  _method_command("map_export", _("E&xport"), "ExportMap",
1039                      helptext = _("Export the map to file"))                  helptext = _("Export the map to file"))
1040  _method_command("map_print", _("Prin&t"), "PrintMap",  _method_command("map_print", _("Prin&t"), "PrintMap",
1041                  helptext = _("Print the map"))                  helptext = _("Print the map"))
1042  _method_command("map_rename", _("&Rename..."), "RenameMap",  _method_command("map_rename", _("&Rename..."), "RenameMap",
1043                  helptext = _("Rename the map"))                  helptext = _("Rename the map"))
1044  _method_command("layer_add", _("&Add Layer..."), "AddLayer",  _method_command("layer_add", _("&Add Layer..."), "AddLayer",
1045                  helptext = _("Add a new layer to active map"))                  helptext = _("Add a new layer to the map"))
1046  _method_command("rasterlayer_add", _("&Add Image Layer..."), "AddRasterLayer",  _method_command("rasterlayer_add", _("&Add Image Layer..."), "AddRasterLayer",
1047                  helptext = _("Add a new image layer to active map"))                  helptext = _("Add a new image layer to the map"),
1048                    sensitive = _has_gdal_support)
1049    _method_command("layer_add_db", _("Add &Database Layer..."), "AddDBLayer",
1050                    helptext = _("Add a new database layer to active map"),
1051                    sensitive = _has_dbconnections)
1052  _method_command("layer_remove", _("&Remove Layer"), "RemoveLayer",  _method_command("layer_remove", _("&Remove Layer"), "RemoveLayer",
1053                  helptext = _("Remove selected layer(s)"),                  helptext = _("Remove selected layer"),
1054                  sensitive = _can_remove_layer)                  sensitive = _can_remove_layer)
1055    
1056  # Layer menu  # Layer menu
1057  _method_command("layer_projection", _("Pro&jection..."), "LayerProjection",  _method_command("layer_projection", _("Pro&jection..."), "LayerProjection",
1058                  sensitive = _has_selected_layer)                  sensitive = _has_selected_layer,
1059                    helptext = _("Specify projection for selected layer"))
1060  _method_command("layer_duplicate", _("&Duplicate"), "DuplicateLayer",  _method_command("layer_duplicate", _("&Duplicate"), "DuplicateLayer",
1061                  helptext = _("Duplicate selected layer(s)"),                  helptext = _("Duplicate selected layer"),
1062            sensitive = lambda context: context.mainwindow.CanDuplicateLayer())            sensitive = lambda context: context.mainwindow.CanDuplicateLayer())
1063  _method_command("layer_rename", _("Re&name ..."), "RenameLayer",  _method_command("layer_rename", _("Re&name ..."), "RenameLayer",
1064                  helptext = _("Rename selected layer"),                  helptext = _("Rename selected layer"),
1065                  sensitive = _has_selected_layer)                  sensitive = _has_selected_layer)
1066  _method_command("layer_raise", _("&Raise"), "RaiseLayer",  _method_command("layer_raise", _("&Raise"), "RaiseLayer",
1067                  helptext = _("Raise selected layer(s)"),                  helptext = _("Raise selected layer"),
1068                  sensitive = _has_selected_layer)                  sensitive = _has_selected_layer)
1069  _method_command("layer_lower", _("&Lower"), "LowerLayer",  _method_command("layer_lower", _("&Lower"), "LowerLayer",
1070                  helptext = _("Lower selected layer(s)"),                  helptext = _("Lower selected layer"),
1071                  sensitive = _has_selected_layer)                  sensitive = _has_selected_layer)
1072  _method_command("layer_show", _("&Show"), "ShowLayer",  _method_command("layer_show", _("&Show"), "ShowLayer",
1073                  helptext = _("Make selected layer(s) visible"),                  helptext = _("Make selected layer visible"),
1074                  sensitive = _has_selected_layer)                  sensitive = _has_selected_layer)
1075  _method_command("layer_hide", _("&Hide"), "HideLayer",  _method_command("layer_hide", _("&Hide"), "HideLayer",
1076                  helptext = _("Make selected layer(s) unvisible"),                  helptext = _("Make selected layer unvisible"),
1077                  sensitive = _has_selected_layer)                  sensitive = _has_selected_layer)
1078  _method_command("layer_show_table", _("Show Ta&ble"), "LayerShowTable",  _method_command("layer_show_table", _("Show Ta&ble"), "LayerShowTable",
1079                  helptext = _("Show the selected layer's table"),                  helptext = _("Show the selected layer's table"),
1080                  sensitive = _has_selected_layer)                  sensitive = _has_selected_layer)
1081  _method_command("layer_properties", _("&Properties..."), "LayerEditProperties",  _method_command("layer_properties", _("&Properties..."), "LayerEditProperties",
1082                  sensitive = _has_selected_layer)                  sensitive = _has_selected_layer,
1083                    helptext = _("Edit the properties of the selected layer"))
1084  _method_command("layer_jointable", _("&Join Table..."), "LayerJoinTable",  _method_command("layer_jointable", _("&Join Table..."), "LayerJoinTable",
1085                  sensitive = _has_selected_layer)                  sensitive = _has_selected_layer,
1086                    helptext = _("Join and attach a table to the selected layer"))
1087    
1088  def _can_unjoin(context):  def _can_unjoin(context):
1089      """Return whether the Layer/Unjoin command can be executed.      """Return whether the Layer/Unjoin command can be executed.
# Line 1038  def _can_unjoin(context): Line 1100  def _can_unjoin(context):
1100      else:      else:
1101          return 0          return 0
1102  _method_command("layer_unjointable", _("&Unjoin Table..."), "LayerUnjoinTable",  _method_command("layer_unjointable", _("&Unjoin Table..."), "LayerUnjoinTable",
1103                  sensitive = _can_unjoin)                  sensitive = _can_unjoin,
1104                    helptext = _("Undo the last join operation"))
1105    
1106    
1107  def _has_tables(context):  def _has_tables(context):
1108      return bool(context.session.Tables())      return bool(context.session.Tables())
1109    
1110  # Table menu  # Table menu
1111  _method_command("table_open", _("&Open..."), "TableOpen")  _method_command("table_open", _("&Open..."), "TableOpen",
1112  _method_command("table_close", _("&Close"), "TableClose",                  helptext = _("Open a DBF-table from a file"))
1113         sensitive = lambda context: bool(context.session.UnreferencedTables()))  _method_command("table_close", _("&Close..."), "TableClose",
1114           sensitive = lambda context: bool(context.session.UnreferencedTables()),
1115                    helptext = _("Close one or more tables from a list"))
1116  _method_command("table_rename", _("&Rename..."), "TableRename",  _method_command("table_rename", _("&Rename..."), "TableRename",
1117                  sensitive = _has_tables)                  sensitive = _has_tables,
1118  _method_command("table_show", _("&Show"), "TableShow",                  helptext = _("Rename one or more tables"))
1119                  sensitive = _has_tables)  _method_command("table_show", _("&Show..."), "TableShow",
1120                    sensitive = _has_tables,
1121                    helptext = _("Show one or more tables in a dialog"))
1122  _method_command("table_join", _("&Join..."), "TableJoin",  _method_command("table_join", _("&Join..."), "TableJoin",
1123                  sensitive = _has_tables)                  sensitive = _has_tables,
1124                    helptext = _("Join two tables creating a new one"))
1125    
1126  #  Export only under Windows ...  #  Export only under Windows ...
1127  map_menu = ["layer_add", "rasterlayer_add", "layer_remove", "map_rename",  map_menu = ["layer_add", "layer_add_db", "rasterlayer_add", "layer_remove",
1128                          None,                          None,
1129                            "map_rename",
1130                          "map_projection",                          "map_projection",
1131                          None,                          None,
1132                          "map_zoom_in_tool", "map_zoom_out_tool",                          "map_zoom_in_tool", "map_zoom_out_tool",
1133                          "map_pan_tool",                          "map_pan_tool",
1134                          "map_full_extent",                          "map_full_extent",
1135                          "layer_full_extent",                          "layer_full_extent",
1136                          "selected_full_extent",                          "selected_full_extent",
1137                          None,                          None,
# Line 1079  main_menu = Menu("<main>", "<main>", Line 1148  main_menu = Menu("<main>", "<main>",
1148                   [Menu("file", _("&File"),                   [Menu("file", _("&File"),
1149                         ["new_session", "open_session", None,                         ["new_session", "open_session", None,
1150                          "save_session", "save_session_as", None,                          "save_session", "save_session_as", None,
1151                            "database_management", None,
1152                          "toggle_session_tree", None,                          "toggle_session_tree", None,
1153                          "exit"]),                          "exit"]),
1154                    Menu("map", _("&Map"), map_menu),                    Menu("map", _("&Map"), map_menu),
# Line 1114  main_toolbar = Menu("<toolbar>", "<toolb Line 1184  main_toolbar = Menu("<toolbar>", "<toolb
1184                       "selected_full_extent",                       "selected_full_extent",
1185                       None,                       None,
1186                       "map_identify_tool", "map_label_tool"])                       "map_identify_tool", "map_label_tool"])
1187    

Legend:
Removed from v.1126  
changed lines
  Added in v.1667

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26