[GRASS-SVN] r34638 - grass/trunk/vector/v.extract

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 30 14:31:35 EST 2008


Author: martinl
Date: 2008-11-30 14:31:35 -0500 (Sun, 30 Nov 2008)
New Revision: 34638

Modified:
   grass/trunk/vector/v.extract/main.c
Log:
v.extract: cosmetics (more guisection, order options based on
guisections)
	    (merge from devbr6, r34637)


Modified: grass/trunk/vector/v.extract/main.c
===================================================================
--- grass/trunk/vector/v.extract/main.c	2008-11-30 19:29:16 UTC (rev 34637)
+++ grass/trunk/vector/v.extract/main.c	2008-11-30 19:31:35 UTC (rev 34638)
@@ -88,7 +88,7 @@
 
     /* set up the options and flags for the command line parser */
     module = G_define_module();
-    module->keywords = _("vector");
+    module->keywords = _("vector, extract");
     module->description =
 	_("Selects vector objects from an existing vector map and "
 	  "creates a new map containing only the selected objects.");
@@ -104,6 +104,7 @@
     r_flag = G_define_flag();
     r_flag->key = 'r';
     r_flag->description = _("Reverse selection");
+    r_flag->guisection = _("Query");
 
     inopt = G_define_standard_option(G_OPT_V_INPUT);
 
@@ -112,30 +113,28 @@
     typopt = G_define_standard_option(G_OPT_V_TYPE);
     typopt->answer = "point,line,boundary,centroid,area,face";
     typopt->options = "point,line,boundary,centroid,area,face";
-    typopt->description = _("Types to be extracted ");
+    typopt->label = _("Types to be extracted");
+    typopt->guisection = _("Query");
 
     fieldopt = G_define_standard_option(G_OPT_V_FIELD);
-    fieldopt->description =
-	_("If -1, all features in all layers of given type " "are extracted");
-
-    newopt = G_define_option();
-    newopt->key = "new";
-    newopt->type = TYPE_INTEGER;
-    newopt->required = NO;
-    newopt->answer = "-1";
-    newopt->label =
-	_("Enter -1 to keep original categories or the desired NEW category value");
-    newopt->description = _("If new >= 0, table is not copied");
-
+    fieldopt->label =
+	_("Layer number (if -1, all features in all layers of given type " "are extracted)");
+    fieldopt->guisection = _("Query");
+    
     listopt = G_define_standard_option(G_OPT_V_CATS);
     listopt->key = "list";
+    listopt->guisection = _("Query");
 
+    whereopt = G_define_standard_option(G_OPT_DB_WHERE);
+    whereopt->guisection = _("Query");
+
     fileopt = G_define_standard_option(G_OPT_F_INPUT);
     fileopt->key = "file";
     fileopt->required = NO;
     fileopt->label =
 	_("Input text file with category numbers/number ranges to be extracted");
     fileopt->description = _("If '-' given reads from standard input");
+    fileopt->guisection = _("Query");
 
     nrandopt = G_define_option();
     nrandopt->key = "random";
@@ -144,9 +143,17 @@
     nrandopt->label =
 	_("Number of random categories matching vector objects to extract");
     nrandopt->description =
-	_("Number must be smaller than unique Cat count in layer");
+	_("Number must be smaller than unique cat count in layer");
+    nrandopt->guisection = _("Query");
 
-    whereopt = G_define_standard_option(G_OPT_DB_WHERE);
+    newopt = G_define_option();
+    newopt->key = "new";
+    newopt->type = TYPE_INTEGER;
+    newopt->required = NO;
+    newopt->answer = "-1";
+    newopt->label =
+	_("Enter -1 to keep original categories or the desired NEW category value");
+    newopt->description = _("If new >= 0, table is not copied");
     
     /* heeeerrrrrre's the   PARSER */
     if (G_parser(argc, argv))



More information about the grass-commit mailing list