Browse Source

v.distance: paramaters description cosmetics
(merge from devbr6, https://trac.osgeo.org/grass/changeset/34758)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@34759 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 years ago
parent
commit
5e8abf505e
2 changed files with 22 additions and 16 deletions
  1. 8 3
      gui/wxpython/gui_modules/menuform.py
  2. 14 13
      vector/v.distance/main.c

+ 8 - 3
gui/wxpython/gui_modules/menuform.py

@@ -1219,9 +1219,14 @@ class cmdPanel(wx.Panel):
                             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

+ 14 - 13
vector/v.distance/main.c

@@ -117,37 +117,37 @@ int main(int argc, char *argv[])
 
     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";
@@ -203,9 +203,10 @@ int main(int argc, char *argv[])
     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_DB_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");