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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 12 08:09:16 EST 2009


Author: martinl
Date: 2009-01-12 08:09:16 -0500 (Mon, 12 Jan 2009)
New Revision: 35361

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
Log:
wxGUI: remove unused DbColumnSelect class
       (merge from trunk, r35359)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py	2009-01-12 13:08:37 UTC (rev 35360)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py	2009-01-12 13:09:16 UTC (rev 35361)
@@ -12,7 +12,7 @@
  - DatabaseSelect
  - ColumnSelect
 
-(C) 2007-2008 by the GRASS Development Team This program is free
+(C) 2007-2009 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.
 
@@ -527,48 +527,3 @@
 
         self.SetItems(columns)
         self.SetValue('')
-        
-class DbColumnSelect(wx.ComboBox):
-    """
-    Creates combo box for selecting columns from any table.
-    """
-    def __init__(self, parent,
-                 id=wx.ID_ANY, value='', pos=wx.DefaultPosition,
-                 size=wx.DefaultSize, choices=[''], **kargs):
-
-        super(ColumnSelect, self).__init__(parent, id, value, pos, size, choices)
-
-        dbtable = kargs['table'] # table to check for columns
-        dbdriver = kargs['driver'] # driver for table
-        dbdatabase = kargs['database'] # database for table
-
-        if dbtable == '':
-            return
-        else:
-            self.InsertColumns(dbtable)
-                
-    def InsertColumns(self, table):
-        """insert columns for a table into the columns combobox"""
-        if table == '' : return
-        
-        cmd = ['db.columns',
-               'table=%s' % table]
-        
-        if dbdriver:
-            cmd.append('driver=%s' % dbdriver)
-        if dbdatabase:
-            cmd.append('database=%s' % dbdatabase)
-        
-        ret = gcmd.RunCommand('db.columns',
-                              read = True,
-                              driver = dbdriver,
-                              database = dbdatabase)
-
-        columnchoices = []
-        if ret:
-            for item in ret.splitlines():
-                columnchoices.append(item)
-        
-        # columnchoices.sort()
-        self.SetItems(columnchoices)
-    



More information about the grass-commit mailing list