[GRASS-SVN] r61386 - in grass/branches/releasebranch_7_0/gui/wxpython: lmgr xml

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 23 19:43:56 PDT 2014


Author: annakrat
Date: 2014-07-23 19:43:56 -0700 (Wed, 23 Jul 2014)
New Revision: 61386

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/lmgr/frame.py
   grass/branches/releasebranch_7_0/gui/wxpython/xml/toolboxes.xml
   grass/branches/releasebranch_7_0/gui/wxpython/xml/wxgui_items.xml
Log:
wxGUI: launch Timeline Tool directly from menu (merge from trunk, r61385)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/lmgr/frame.py	2014-07-24 02:38:41 UTC (rev 61385)
+++ grass/branches/releasebranch_7_0/gui/wxpython/lmgr/frame.py	2014-07-24 02:43:56 UTC (rev 61386)
@@ -1548,6 +1548,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/branches/releasebranch_7_0/gui/wxpython/xml/toolboxes.xml
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/xml/toolboxes.xml	2014-07-24 02:38:41 UTC (rev 61385)
+++ grass/branches/releasebranch_7_0/gui/wxpython/xml/toolboxes.xml	2014-07-24 02:43:56 UTC (rev 61386)
@@ -1982,9 +1982,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"/>
     </items>
   </toolbox>
   <toolbox name="GuiTools">

Modified: grass/branches/releasebranch_7_0/gui/wxpython/xml/wxgui_items.xml
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/xml/wxgui_items.xml	2014-07-24 02:38:41 UTC (rev 61385)
+++ grass/branches/releasebranch_7_0/gui/wxpython/xml/wxgui_items.xml	2014-07-24 02:43:56 UTC (rev 61386)
@@ -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