[GRASS-SVN] r51742 - grass/trunk/gui/wxpython/vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Fri May 25 09:20:29 EDT 2012


Author: annakrat
Date: 2012-05-25 06:20:28 -0700 (Fri, 25 May 2012)
New Revision: 51742

Modified:
   grass/trunk/gui/wxpython/vdigit/toolbars.py
Log:
wxGUI/digitizer: add help button to digitizer toolbar

Modified: grass/trunk/gui/wxpython/vdigit/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/toolbars.py	2012-05-25 13:04:08 UTC (rev 51741)
+++ grass/trunk/gui/wxpython/vdigit/toolbars.py	2012-05-25 13:20:28 UTC (rev 51742)
@@ -132,6 +132,8 @@
             'settings'        : BaseIcons['settings'].SetLabel(_('Digitization settings')),
             'quit'            : BaseIcons['quit'].SetLabel(label = _('Quit digitizer'),
                                                            desc = _('Quit digitizer and save changes')),
+            'help'            : BaseIcons['help'].SetLabel(label = _('Vector Digitizer manual'),
+                                                           desc = _('Show Vector Digitizer manual')),
             'additionalTools' : MetaIcon(img = 'tools',
                                          label = _('Additional tools '
                                                    '(copy, flip, connect, etc.)'),
@@ -207,8 +209,7 @@
                          self.OnAdditionalToolMenu,
                          wx.ITEM_CHECK))
         if not self.tools or 'undo' in self.tools or \
-                'settings' in self.tools or \
-                'quit' in self.tools:
+                'redo' in self.tools:
             data.append((None, ))
         if not self.tools or 'undo' in self.tools:
             data.append(("undo", icons["undo"],
@@ -216,9 +217,16 @@
         if not self.tools or 'redo' in self.tools:
             data.append(("redo", icons["redo"],
                          self.OnRedo))
+        if not self.tools or 'settings' in self.tools or \
+                'help' in self.tools or \
+                'quit' in self.tools:
+            data.append((None, ))
         if not self.tools or 'settings' in self.tools:
             data.append(("settings", icons["settings"],
                          self.OnSettings))
+        if not self.tools or 'help' in self.tools:
+            data.append(("help", icons["help"],
+                         self.OnHelp))
         if not self.tools or 'quit' in self.tools:
             data.append(("quit", icons["quit"],
                          self.OnExit))
@@ -439,6 +447,12 @@
                                                        style = wx.DEFAULT_DIALOG_STYLE)
             self.settingsDialog.Show()
 
+    def OnHelp(self, event):
+        """!Show digitizer help page in web browser"""
+        log = self.parent.GetLayerManager().GetLogWindow()
+        log.RunCmd(['g.manual',
+                    'entry=wxGUI.Vector_Digitizer'])
+
     def OnAdditionalToolMenu(self, event):
         """!Menu for additional tools"""
         point = wx.GetMousePosition()



More information about the grass-commit mailing list