[GRASS-SVN] r37083 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 9 14:46:22 EDT 2009


Author: martinl
Date: 2009-05-09 14:46:22 -0400 (Sat, 09 May 2009)
New Revision: 37083

Modified:
   grass/trunk/gui/wxpython/gui_modules/ogc_services.py
Log:
wxGUI: use gcmd.RunCommand() instead grass.*_command()


Modified: grass/trunk/gui/wxpython/gui_modules/ogc_services.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/ogc_services.py	2009-05-09 18:39:40 UTC (rev 37082)
+++ grass/trunk/gui/wxpython/gui_modules/ogc_services.py	2009-05-09 18:46:22 UTC (rev 37083)
@@ -21,7 +21,7 @@
 from wx.gizmos import TreeListCtrl
 import wx.lib.mixins.listctrl as listmix
 
-import grass
+import gcmd
 
 from preferences import globalSettings as UserSettings
 
@@ -54,9 +54,8 @@
                                         label = _(" Server settings "))
 
         self.serverText = wx.StaticText(parent = self.panel, id = wx.ID_ANY, label = _("Server:"))
-        self.server  = wx.TextCtrl(parent = self.panel, id = wx.ID_ANY,
-                                   value = 'http://wms.jpl.nasa.gov/wms.cgi')
-
+        self.server  = wx.TextCtrl(parent = self.panel, id = wx.ID_ANY)
+        
         #
         # list of layers
         #
@@ -168,14 +167,17 @@
             return # not reachable
 
         layers = {}
-        ret = grass.read_command('r.in.wms',
-                                 quiet = True,
-                                 flags = 'l',
-                                 mapserver = server)
+        ret = gcmd.RunCommand('r.in.wms',
+                              quiet = True,
+                              parent = self,
+                              read = True,
+                              flags = 'l',
+                              mapserver = server)
         
         if not ret:
+            self.list.LoadData()
             self.btn_import.Enable(False)
-            return layers # no layers found
+            return # no layers found
 
         lastLayer = lastStyle = ''
         for line in ret.splitlines():



More information about the grass-commit mailing list