Browse Source

wxGUI: update for GSoC testing (wx.stream)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46791 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 years ago
parent
commit
2be9d4012b
2 changed files with 28 additions and 0 deletions
  1. 16 0
      gui/wxpython/wxgui.py
  2. 12 0
      gui/wxpython/xml/menudata.xml

+ 16 - 0
gui/wxpython/wxgui.py

@@ -332,6 +332,22 @@ class GMFrame(wx.Frame):
         win.CentreOnScreen()
         
         win.Show()
+
+    def OnRStream(self, event):
+        """!GSoC's r.stream.* interface for testing
+        """
+        try:
+            from gui_modules import rstream
+        except:
+            gcmd.GError(parent = self.parent,
+                        message = _("RStream Utility is not available. You can install it by %s") % \
+                            'g.extension -s extension=wx.stream')
+            return
+        
+        win = rstream.RStreamFrame(parent = self)
+        win.CentreOnScreen()
+        
+        win.Show()
         
     def OnDone(self, returncode):
         """Command execution finised"""

+ 12 - 0
gui/wxpython/xml/menudata.xml

@@ -738,6 +738,18 @@
 	  <command>ps.map</command>
 	</menuitem>
 	<separator />
+	<menu>
+	  <label>GSoC testing</label>
+	  <items>
+	    <menuitem>
+	      <label>RStream</label>
+	      <help>GUI for hydrological modelling (r.stream.*)</help>
+	      <keywords>raster,hydrology</keywords>
+	      <handler>OnRStream</handler>
+	    </menuitem>
+	  </items>
+	</menu>
+	<separator />
 	<menuitem>
 	  <label>Launch script</label>
 	  <help>Launches script file.</help>