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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 13 03:48:42 EDT 2008


Author: martinl
Date: 2008-10-13 03:48:42 -0400 (Mon, 13 Oct 2008)
New Revision: 33860

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: unused methods removed


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2008-10-13 06:38:14 UTC (rev 33859)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2008-10-13 07:48:42 UTC (rev 33860)
@@ -1467,80 +1467,6 @@
         
         event.Skip()
         
-    def OnDbColumn(self, event):
-        """Get list of table columns"""
-        choices = []
-        
-        p = self.task.get_param('table', raiseError=False)
-        if p and p.get('prompt', '') == 'dbtable':
-            cmd = ['db.columns',
-                   'table=%s' % p.get('value')]
-            try:
-                choices = gcmd.Command(cmd).ReadStdOutput()
-            except gcmd.CmdError:
-                choices = []
-        if not p:
-            p = self.task.get_param('map', raiseError=False)
-            if not p:
-                p = self.task.get_param('input', raiseError=False)
-            if p:
-                mapName = utils.GetLayerNameFromCmd(self.task.getCmd(ignoreErrors=True))
-                if mapName !=  _('<required>'):
-                    layer = 1
-                    p = self.task.get_param('layer')
-                    if p:
-                        value = p.get('value', '1')
-                        if value:
-                            layer = int(value)
-                    
-                    cmd = ['v.info',
-                           'map=%s' % mapName,
-                           'layer=%d' % layer,
-                           '-c', '--q']
-                    
-                    try:
-                        for line in gcmd.Command(cmd).ReadStdOutput():
-                            type, name = line.split('|')
-                            choices.append(name.strip())
-                    except gcmd.CmdError:
-                        choices = []
-            
-        win = self.FindWindowById(event.GetId())
-
-        win.SetItems(choices)
-
-        if len(choices) < 1:
-            win.SetValue('')
-        
-        event.Skip()
-        
-    def OnDbTable(self, event):
-        """Get list of tables"""
-        # TODO: add driver/database
-        cmd = ['db.tables',
-               '-p', '--q']
-
-        for p in self.task.params:
-            if p.get('name', '') == 'driver' and \
-               len(p.get('value', '')) > 0:
-                cmd.append('driver=%s' % p.get('value'))
-            elif p.get('name', '') == 'database' and \
-                 len(p.get('value', '')) > 0:
-                cmd.append('database=%s' % p.get('value'))
-        
-        try:
-            choices = gcmd.Command(cmd).ReadStdOutput()
-        except gcmd.CmdError:
-            choices = []
-            
-        win = self.FindWindowById(event.GetId())
-        win.SetItems(choices)
-
-        if len(choices) < 1:
-            win.SetValue('')
-        
-        event.Skip()
-
     def createCmd( self, ignoreErrors = False ):
         """
         Produce a command line string (list) or feeding into GRASS.



More information about the grass-commit mailing list