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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 23 19:38:42 PDT 2014


Author: annakrat
Date: 2014-07-23 19:38:41 -0700 (Wed, 23 Jul 2014)
New Revision: 61385

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: launch Timeline Tool directly from menu

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2014-07-24 01:00:50 UTC (rev 61384)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2014-07-24 02:38:41 UTC (rev 61385)
@@ -1560,6 +1560,16 @@
                 layerList.AddLayer(layer)
                 frame.SetAnimations([layerList, None, None, None])
 
+    def OnTimelineTool(self, event=None, cmd=None):
+        """Launch Timeline Tool"""
+        try:
+            from timeline.frame import TimelineFrame
+        except ImportError:
+            GError(parent=self, message=_("Unable to start Timeline Tool."))
+            return
+        frame = TimelineFrame(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	2014-07-24 01:00:50 UTC (rev 61384)
+++ grass/trunk/gui/wxpython/xml/toolboxes.xml	2014-07-24 02:38:41 UTC (rev 61385)
@@ -1978,9 +1978,7 @@
     <label>GUI tools</label>
     <items>
       <wxgui-item name="AnimationTool"/>
-      <module-item name="g.gui.timeline">
-        <label>Plot temporal extents</label>
-      </module-item>
+      <wxgui-item name="TimelineTool"/>
       <module-item name="g.gui.tplot">
         <label>Plot temporal values</label>
       </module-item>

Modified: grass/trunk/gui/wxpython/xml/wxgui_items.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/wxgui_items.xml	2014-07-24 01:00:50 UTC (rev 61384)
+++ grass/trunk/gui/wxpython/xml/wxgui_items.xml	2014-07-24 02:38:41 UTC (rev 61385)
@@ -28,6 +28,13 @@
     <description>Launch animation tool.</description>
     <keywords>general,gui,display</keywords>
   </wxgui-item>
+  <wxgui-item name="TimelineTool">
+    <label>Timeline tool</label>
+    <handler>OnTimelineTool</handler>
+    <related-module>g.gui.timeline</related-module>
+    <description>Plot temporal extents.</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