[GRASS-SVN] r64292 - in grass/trunk/gui/wxpython: lmgr xml

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 24 06:12:05 PST 2015


Author: martinl
Date: 2015-01-24 06:12:04 -0800 (Sat, 24 Jan 2015)
New Revision: 64292

Modified:
   grass/trunk/gui/wxpython/lmgr/frame.py
   grass/trunk/gui/wxpython/xml/toolboxes.xml
   grass/trunk/gui/wxpython/xml/wxgui_items.xml
Log:
wxGUI: fix launching tplot tool from the menu


Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2015-01-23 20:28:49 UTC (rev 64291)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2015-01-24 14:12:04 UTC (rev 64292)
@@ -1624,6 +1624,16 @@
         frame = TimelineFrame(None)
         frame.Show()
 
+    def OnTplotTool(self, event=None, cmd=None):
+        """Launch Temporal Plot Tool"""
+        try:
+            from tplot.frame import TplotFrame
+        except ImportError:
+            GError(parent=self, message=_("Unable to start Temporal Plot Tool."))
+            return
+        frame = TplotFrame(None)
+        frame.Show()
+          
     def OnHistogram(self, event):
         """Init histogram display canvas and tools
         """

Modified: grass/trunk/gui/wxpython/xml/toolboxes.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/toolboxes.xml	2015-01-23 20:28:49 UTC (rev 64291)
+++ grass/trunk/gui/wxpython/xml/toolboxes.xml	2015-01-24 14:12:04 UTC (rev 64292)
@@ -1945,9 +1945,7 @@
     <items>
       <wxgui-item name="AnimationTool"/>
       <wxgui-item name="TimelineTool"/>
-      <module-item name="g.gui.tplot">
-        <label>Plot temporal values</label>
-      </module-item>
+      <wxgui-item name="TplotTool"/>
     </items>
   </toolbox>
   <toolbox name="GuiTools">

Modified: grass/trunk/gui/wxpython/xml/wxgui_items.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/wxgui_items.xml	2015-01-23 20:28:49 UTC (rev 64291)
+++ grass/trunk/gui/wxpython/xml/wxgui_items.xml	2015-01-24 14:12:04 UTC (rev 64292)
@@ -35,6 +35,13 @@
     <description>Plot temporal extents.</description>
     <keywords>general,gui,temporal</keywords>
   </wxgui-item>
+  <wxgui-item name="TplotTool">
+    <label>Temporal plot tool</label>
+    <handler>OnTplotTool</handler>
+    <related-module>g.gui.tplot</related-module>
+    <description>Plot temporal values.</description>
+    <keywords>general,gui,temporal</keywords>
+  </wxgui-item>
   <wxgui-item name="CartographicComposer">
     <label>Cartographic Composer</label>
     <handler>OnPsMap</handler>



More information about the grass-commit mailing list