[GRASS-SVN] r53244 - in grass/branches/develbranch_6/gui/wxpython: dbmgr gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 20 03:27:52 PDT 2012


Author: annakrat
Date: 2012-09-20 03:27:51 -0700 (Thu, 20 Sep 2012)
New Revision: 53244

Modified:
   grass/branches/develbranch_6/gui/wxpython/dbmgr/manager.py
   grass/branches/develbranch_6/gui/wxpython/gui_core/preferences.py
Log:
wxGUI/dbmgr: disable fs option in attribute manager for Windows until better solution is found (merge from releasebranch, r53233)

Modified: grass/branches/develbranch_6/gui/wxpython/dbmgr/manager.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/dbmgr/manager.py	2012-09-20 08:27:20 UTC (rev 53243)
+++ grass/branches/develbranch_6/gui/wxpython/dbmgr/manager.py	2012-09-20 10:27:51 UTC (rev 53244)
@@ -181,36 +181,27 @@
         # TODO: more effective way should be implemented...
         outFile = tempfile.NamedTemporaryFile(mode = 'w+b')
         
+        cmdParams = dict(quiet = True,
+                         parent = self,
+                         flags = 'c')
+        if sys.platform != "win32":
+            cmdParams.update(dict(fs = fs))
+
         if sql:
+            cmdParams.update(dict(sql = sql,
+                                  output = outFile.name))
             ret = RunCommand('db.select',
-                             quiet = True,
-                             parent = self,
-                             flags = 'c',
-                             fs = fs,
-                             sql = sql,
-                             output = outFile.name)
+                             **cmdParams)
         else:
+            cmdParams.update(dict(map = self.mapDBInfo.map,
+                                  layer = layer,
+                                  where = where,
+                                  stdout = outFile))
             if columns:
-                ret = RunCommand('v.db.select',
-                                 quiet = True,
-                                 parent = self,
-                                 flags = 'c',
-                                 map = self.mapDBInfo.map,
-                                 layer = layer,
-                                 columns = ','.join(columns),
-                                 fs = fs,
-                                 where = where,
-                                 stdout = outFile)
-            else:
-                ret = RunCommand('v.db.select',
-                                 quiet = True,
-                                 parent = self,
-                                 flags = 'c',
-                                 map = self.mapDBInfo.map,
-                                 layer = layer,
-                                 fs = fs,
-                                 where = where,
-                                 stdout = outFile) 
+                cmdParams.update(dict(columns = ','.join(columns)))
+
+            ret = RunCommand('v.db.select',
+                             **cmdParams)
         
         # These two should probably be passed to init more cleanly
         # setting the numbers of items = number of elements in the dictionary

Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/preferences.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/preferences.py	2012-09-20 08:27:20 UTC (rev 53243)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/preferences.py	2012-09-20 10:27:51 UTC (rev 53244)
@@ -1014,6 +1014,9 @@
 
         flexSizer.Add(label, proportion = 0, flag = wx.ALIGN_CENTER_VERTICAL)
         flexSizer.Add(separator, proportion = 0, flag = wx.ALIGN_RIGHT | wx.FIXED_MINSIZE)
+        if sys.platform == "win32":
+            label.Hide()
+            separator.Hide()
 
         # ask on delete record
         askOnDeleteRec = wx.CheckBox(parent = panel, id = wx.ID_ANY,



More information about the grass-commit mailing list