[GRASS-SVN] r34180 - in grass/branches/develbranch_6: gui/wxpython/gui_modules vector/v.db.connect

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 7 08:56:05 EST 2008


Author: martinl
Date: 2008-11-07 08:56:04 -0500 (Fri, 07 Nov 2008)
New Revision: 34180

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
   grass/branches/develbranch_6/vector/v.db.connect/main.c
Log:
v.db.connect: age: old_layer -> new_layer


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2008-11-07 11:34:44 UTC (rev 34179)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2008-11-07 13:56:04 UTC (rev 34180)
@@ -1190,11 +1190,17 @@
                             all = True
                         else:
                             all = False
-                        win = gselect.LayerSelect(parent=which_panel,
-                                                  all=all)
-                        p['wxGetValue'] = win.GetStringSelection
-                        win.Bind(wx.EVT_CHOICE, self.OnUpdateSelection)
-                        win.Bind(wx.EVT_CHOICE, self.OnSetValue)
+                        if p.get('age', 'old_layer') == 'old_layer':
+                            win = gselect.LayerSelect(parent=which_panel,
+                                                      all=all)
+                            p['wxGetValue'] = win.GetStringSelection
+                            win.Bind(wx.EVT_CHOICE, self.OnUpdateSelection)
+                            win.Bind(wx.EVT_CHOICE, self.OnSetValue)
+                        else:
+                            win = wx.SpinCtrl(parent=which_panel, id=wx.ID_ANY,
+                                              min=1, max=100, initial=1)
+                            win.Bind(wx.EVT_SPINCTRL, self.OnSetValue)
+
                     elif p.get('prompt', '') == 'dbdriver':
                         win = gselect.DriverSelect(parent=which_panel,
                                                    choices=p['values'],

Modified: grass/branches/develbranch_6/vector/v.db.connect/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.db.connect/main.c	2008-11-07 11:34:44 UTC (rev 34179)
+++ grass/branches/develbranch_6/vector/v.db.connect/main.c	2008-11-07 13:56:04 UTC (rev 34180)
@@ -7,7 +7,7 @@
  *               
  * PURPOSE:      sets/prints DB connection for a given vector map
  *               
- * COPYRIGHT:    (C) 2002 by the GRASS Development Team
+ * COPYRIGHT:    (C) 2002-2008 by the GRASS Development Team
  *
  *               This program is free software under the 
  *               GNU General Public License (>=v2). 
@@ -71,6 +71,7 @@
     dbkey->description = _("Must refer to an integer column");
 
     field_opt = G_define_standard_option(G_OPT_V_FIELD);
+    field_opt->gisprompt = "new_layer,layer,layer";
 
     sep_opt = G_define_standard_option(G_OPT_F_SEP);
     sep_opt->answer = " ";



More information about the grass-commit mailing list