[GRASS-SVN] r34758 - in grass/branches/develbranch_6: gui/wxpython/gui_modules vector/v.distance

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 6 15:34:54 EST 2008


Author: martinl
Date: 2008-12-06 15:34:54 -0500 (Sat, 06 Dec 2008)
New Revision: 34758

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
   grass/branches/develbranch_6/vector/v.distance/main.c
Log:
v.distance: paramaters description cosmetics


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2008-12-06 19:58:26 UTC (rev 34757)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2008-12-06 20:34:54 UTC (rev 34758)
@@ -1219,9 +1219,14 @@
                             win.Bind(wx.EVT_TEXT, self.OnUpdateSelection)
                             win.Bind(wx.EVT_TEXT, self.OnSetValue)
                         elif p.get('prompt', '') == 'dbtable':
-                            win = gselect.TableSelect(parent=which_panel)
-                            p['wxGetValue'] = win.GetStringSelection
-                            win.Bind(wx.EVT_COMBOBOX, self.OnSetValue)
+                            if p.get('age', 'old_dbtable') == 'old_dbtable':
+                                win = gselect.TableSelect(parent=which_panel)
+                                p['wxGetValue'] = win.GetStringSelection
+                                win.Bind(wx.EVT_COMBOBOX, self.OnSetValue)
+                            else:
+                                win = wx.TextCtrl(parent=which_panel, value = p.get('default',''),
+                                                  size=globalvar.DIALOG_TEXTCTRL_SIZE)
+                                win.Bind(wx.EVT_TEXT, self.OnSetValue)
                         elif p.get('prompt', '') == 'dbcolumn':
                             win = gselect.ColumnSelect(parent=which_panel)
                             p['wxGetValue'] = win.GetStringSelection

Modified: grass/branches/develbranch_6/vector/v.distance/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.distance/main.c	2008-12-06 19:58:26 UTC (rev 34757)
+++ grass/branches/develbranch_6/vector/v.distance/main.c	2008-12-06 20:34:54 UTC (rev 34758)
@@ -118,37 +118,37 @@
 
     from_opt = G_define_standard_option(G_OPT_V_INPUT);
     from_opt->key = "from";
-    from_opt->description = _("Name of existing vector map");
-    from_opt->guisection = _("From_map");
+    from_opt->description = _("Name of existing vector map (from)");
+    from_opt->guisection = _("From");
 
     to_opt = G_define_standard_option(G_OPT_V_INPUT);
     to_opt->key = "to";
-    to_opt->description = _("Name of existing vector map");
-    to_opt->guisection = _("To_map");
+    to_opt->description = _("Name of existing vector map (to)");
+    to_opt->guisection = _("To");
 
     from_type_opt = G_define_standard_option(G_OPT_V_TYPE);
     from_type_opt->key = "from_type";
     from_type_opt->options = "point,centroid";
     from_type_opt->answer = "point";
-    from_type_opt->label = _("From type");
-    from_type_opt->guisection = _("From_map");
+    from_type_opt->label = _("Feature type (from)");
+    from_type_opt->guisection = _("From");
 
     to_type_opt = G_define_standard_option(G_OPT_V_TYPE);
     to_type_opt->key = "to_type";
     to_type_opt->options = "point,line,boundary,centroid,area";
     to_type_opt->answer = "point,line,area";
-    to_type_opt->label = _("To type");
-    to_type_opt->guisection = _("To_map");
+    to_type_opt->label = _("Feature type (to)");
+    to_type_opt->guisection = _("To");
 
     from_field_opt = G_define_standard_option(G_OPT_V_FIELD);
     from_field_opt->key = "from_layer";
-    from_field_opt->label = _("From layer");
-    from_field_opt->guisection = _("From_map");
+    from_field_opt->label = _("Layer number (from)");
+    from_field_opt->guisection = _("From");
 
     to_field_opt = G_define_standard_option(G_OPT_V_FIELD);
     to_field_opt->key = "to_layer";
-    to_field_opt->label = _("To layer");
-    to_field_opt->guisection = _("To_map");
+    to_field_opt->label = _("Layer number (to)");
+    to_field_opt->guisection = _("To");
 
     out_opt = G_define_standard_option(G_OPT_V_OUTPUT);
     out_opt->key = "output";
@@ -204,9 +204,10 @@
     to_column_opt->key = "to_column";
     to_column_opt->description =
 	_("Column name of nearest feature (used with upload=to_attr)");
-    to_column_opt->guisection = _("To_map");
+    to_column_opt->guisection = _("To");
 
     table_opt = G_define_standard_option(G_OPT_TABLE);
+    table_opt->gisprompt = "new_dbtable,dbtable,dbtable";
     table_opt->description =
 	_("Name of table created for output when the distance to all flag is used");
 



More information about the grass-commit mailing list