Pārlūkot izejas kodu

clean https://trac.osgeo.org/grass/changeset/36317, don't use grass.run_command() - use gcmd.RunCommand()
instead


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@36332 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 gadi atpakaļ
vecāks
revīzija
9194adaf8c
1 mainītis faili ar 12 papildinājumiem un 5 dzēšanām
  1. 12 5
      gui/wxpython/gui_modules/location_wizard.py

+ 12 - 5
gui/wxpython/gui_modules/location_wizard.py

@@ -1861,12 +1861,19 @@ class LocationWizard(wx.Object):
                 os.mkdir(database)
                 
             # change to new GISDbase directory
-            grass.run_command('g.gisenv', set='GISDBASE=%s' % database)
+            gcmd.RunCommand('g.gisenv',
+                            parent = self.wizard,
+                            set='GISDBASE=%s' % database)
+            
             wx.MessageBox(parent=self.wizard,
-                                message=_("You will need to change the default GIS data directory in the GRASS startup screen"),
-                                caption=("Location <%s> will be created in GIS data directory <%s>") % \
-                                    (location,database), style=wx.OK | wx.ICON_ERROR)
-
+                          message=_("Location <%(loc)s> will be created "
+                                    "in GIS data directory <%(dir)s>."
+                                    "You will need to change the default GIS "
+                                    "data directory in the GRASS startup screen.") % \
+                              { 'loc' : location, 'dir' : database},
+                          caption=_("New GIS data directory"), 
+                          style=wx.OK | wx.ICON_INFORMATION | wx.CENTRE)
+            
         if coordsys == "xy":
             success = self.XYCreate()
         elif coordsys == "latlong":