[GRASS-SVN] r47317 - in grass/trunk/gui: icons/grass wxpython wxpython/gui_modules wxpython/icons wxpython/xml

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jul 30 09:18:13 EDT 2011


Author: martinl
Date: 2011-07-30 06:18:13 -0700 (Sat, 30 Jul 2011)
New Revision: 47317

Added:
   grass/trunk/gui/icons/grass/layer-wms-add.png
Modified:
   grass/trunk/gui/wxpython/gui_modules/toolbars.py
   grass/trunk/gui/wxpython/icons/icon.py
   grass/trunk/gui/wxpython/wxgui.py
   grass/trunk/gui/wxpython/xml/menudata.xml
Log:
wxGUI: link wx.wms (gsoc) for testing


Added: grass/trunk/gui/icons/grass/layer-wms-add.png
===================================================================
(Binary files differ)


Property changes on: grass/trunk/gui/icons/grass/layer-wms-add.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Modified: grass/trunk/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/toolbars.py	2011-07-30 06:12:08 UTC (rev 47316)
+++ grass/trunk/gui/wxpython/gui_modules/toolbars.py	2011-07-30 13:18:13 UTC (rev 47317)
@@ -1414,6 +1414,8 @@
         icons = Icons['layerManager']
         return self._getToolbarData((('newdisplay', icons["newdisplay"],
                                       self.parent.OnNewDisplay),
+                                     ('newdisplay', icons["newdisplayWMS"],
+                                      self.parent.OnNewDisplayWMS),
                                      (None, ),
                                      ('workspaceNew', icons["workspaceNew"],
                                       self.parent.OnWorkspaceNew),

Modified: grass/trunk/gui/wxpython/icons/icon.py
===================================================================
--- grass/trunk/gui/wxpython/icons/icon.py	2011-07-30 06:12:08 UTC (rev 47316)
+++ grass/trunk/gui/wxpython/icons/icon.py	2011-07-30 13:18:13 UTC (rev 47317)
@@ -165,6 +165,8 @@
     'layerManager' : {
         'newdisplay'   : MetaIcon(img = iconSet.get('monitor-create', wx.ART_ERROR),
                                   label = _('Start new map display')),
+        'newdisplayWMS' : MetaIcon(img = iconSet.get('layer-wms-add', wx.ART_ERROR),
+                                   label = _('Start new map display (experimental WMS support)')),
         'workspaceNew'  : MetaIcon(img = iconSet.get('create', wx.ART_ERROR),
                                    label = _('Create new workspace (Ctrl+N)')),
         'workspaceOpen' : MetaIcon(img = iconSet.get('open', wx.ART_ERROR),

Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2011-07-30 06:12:08 UTC (rev 47316)
+++ grass/trunk/gui/wxpython/wxgui.py	2011-07-30 13:18:13 UTC (rev 47317)
@@ -1236,6 +1236,22 @@
         # show ATM window
         dbmanager.Show()
         
+    def OnNewDisplayWMS(self, event = None):
+        """!Create new layer tree and map display instance"""
+        self.NewDisplayWMS()
+
+    def NewDisplayWMS(self, show = True):
+        Debug.msg(1, "GMFrame.NewDisplay(): idx=%d" % self.disp_idx)
+        try:
+            from gui_modules.wmsmenu import DisplayWMSMenu
+        except:
+            gcmd.GError(parent = self.parent,
+                        message = _("Experimental WMS support for wxGUI not available. You can install it by %s") % \
+                            'g.extension -s extension=wx.wms')
+            return
+        
+    	DisplayWMSMenu()
+    
     def OnNewDisplay(self, event = None):
         """!Create new layer tree and map display instance"""
         self.NewDisplay()

Modified: grass/trunk/gui/wxpython/xml/menudata.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/menudata.xml	2011-07-30 06:12:08 UTC (rev 47316)
+++ grass/trunk/gui/wxpython/xml/menudata.xml	2011-07-30 13:18:13 UTC (rev 47317)
@@ -735,6 +735,12 @@
 	  <label>GSoC testing</label>
 	  <items>
 	    <menuitem>
+	      <label>WMS</label>
+	      <help>Experimental WMS support for wxGUI</help>
+	      <keywords>display,wms</keywords>
+	      <handler>OnNewDisplayWMS</handler>
+	    </menuitem>
+	    <menuitem>
 	      <label>RStream</label>
 	      <help>GUI for hydrological modelling (r.stream.*)</help>
 	      <keywords>raster,hydrology</keywords>



More information about the grass-commit mailing list