[GRASS-SVN] r47335 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 1 08:05:37 EDT 2011


Author: martinl
Date: 2011-08-01 05:05:37 -0700 (Mon, 01 Aug 2011)
New Revision: 47335

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
Log:
wxGUI/dbm: error trapping for v.db.select
	   (merge r47334 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2011-08-01 12:01:05 UTC (rev 47334)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2011-08-01 12:05:37 UTC (rev 47335)
@@ -191,20 +191,22 @@
             if columns:
                 ret = gcmd.RunCommand('v.db.select',
                                       quiet = True,
+                                      parent = self,
                                       flags = 'c',
                                       map = self.mapDBInfo.map,
                                       layer = layer,
                                       columns = ','.join(columns),
                                       where = where,
-                                      stdout=outFile)
+                                      stdout = outFile)
             else:
                 ret = gcmd.RunCommand('v.db.select',
                                       quiet = True,
+                                      parent = self,
                                       flags = 'c',
                                       map = self.mapDBInfo.map,
                                       layer = layer,
                                       where = where,
-                                      stdout=outFile) 
+                                      stdout = outFile) 
         
         # These two should probably be passed to init more cleanly
         # setting the numbers of items = number of elements in the dictionary
@@ -699,9 +701,12 @@
             win.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnDataItemActivated)
 
             self.layerPage[layer] = {'browsePage': panel.GetId()}
-
+            
+            label = _("Table")
+            if not self.editable:
+                label += _(" (readonly)")
             self.browsePage.AddPage(page=panel, text=" %d / %s %s" % \
-                                        (layer, _("Table"), self.mapDBInfo.layers[layer]['table']))
+                                        (layer, label, self.mapDBInfo.layers[layer]['table']))
 
             pageSizer = wx.BoxSizer(wx.VERTICAL)
 



More information about the grass-commit mailing list