[GRASS-SVN] r35359 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 12 06:52:06 EST 2009


Author: martinl
Date: 2009-01-12 06:52:06 -0500 (Mon, 12 Jan 2009)
New Revision: 35359

Modified:
   grass/trunk/gui/wxpython/gui_modules/gselect.py
Log:
wxGUI: remove unused DbColumnSelect class


Modified: grass/trunk/gui/wxpython/gui_modules/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gselect.py	2009-01-12 11:48:48 UTC (rev 35358)
+++ grass/trunk/gui/wxpython/gui_modules/gselect.py	2009-01-12 11:52:06 UTC (rev 35359)
@@ -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