[GRASS-SVN] r67311 - in grass-addons/grass7/gui/wxpython/wx.metadata: g.gui.cswbrowser g.gui.metadata

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 21 17:26:14 PST 2015


Author: martinl
Date: 2015-12-21 17:26:14 -0800 (Mon, 21 Dec 2015)
New Revision: 67311

Modified:
   grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.cswbrowser/g.gui.cswbrowser.py
   grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py
Log:
wx.metadata: use set_gui_path

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.cswbrowser/g.gui.cswbrowser.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.cswbrowser/g.gui.cswbrowser.py	2015-12-22 01:14:53 UTC (rev 67310)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.cswbrowser/g.gui.cswbrowser.py	2015-12-22 01:26:14 UTC (rev 67311)
@@ -9,16 +9,8 @@
 
 @author Matej Krejci <matejkrejci gmail.com> (GSoC 2015)
 """
-
 import grass.script as grass
-from grass.pygrass.utils import set_path
 
-set_path(modulename='wx.metadata', dirname='mdlib')
-
-import wx
-from cswlib import CSWBrowserPanel, CSWConnectionPanel
-
-
 class CswBrowserMainDialog(wx.Frame):
     def __init__(self,giface=None):
         wx.Frame.__init__(self, None, title="Metadata browser", size=(1024, 760))
@@ -38,6 +30,16 @@
         self.SetSizer(self.mainsizer)
 
 def main(giface=None):
+    from grass.pygrass.utils import set_path
+    set_path(modulename='wx.metadata', dirname='mdlib')
+
+    import wx
+
+    from grass.script.setup import set_gui_path
+    set_gui_path()
+    
+    from cswlib import CSWBrowserPanel, CSWConnectionPanel
+    
     app = wx.App()
     a = CswBrowserMainDialog(giface)
     a.Show()

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py	2015-12-22 01:14:53 UTC (rev 67310)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py	2015-12-22 01:26:14 UTC (rev 67311)
@@ -14,7 +14,7 @@
  - g.gui.metadata::MdEditConfigPanel
  - g.gui.metadata::MdToolbar
 
-(C) 2014 by the GRASS Development Team
+(C) 2014-2015 by the GRASS Development Team
 This program is free software under the GNU General Public License
 (>=v2). Read the file COPYING that comes with GRASS for details.
 
@@ -23,13 +23,18 @@
 
 import sys
 import os
+
 from grass.pygrass.utils import set_path
 import grass.script as grass
 from grass.pydispatch import dispatcher
+from grass.pydispatch.signal import Signal
+import grass.temporal as tgis
+
+from grass.script.setup import set_gui_path
+set_gui_path()
+
 from core.gcmd import RunCommand, GError, GMessage
-import grass.temporal as tgis
 #from datacatalog.tree import LocationMapTree
-from grass.pydispatch.signal import Signal
 from core.utils import GetListOfLocations, ListOfMapsets
 from core.debug import Debug
 



More information about the grass-commit mailing list