[GRASS-SVN] r62248 - in grass/trunk/general: g.list g.remove

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 13 18:39:11 PDT 2014


Author: wenzeslaus
Date: 2014-10-13 18:39:11 -0700 (Mon, 13 Oct 2014)
New Revision: 62248

Modified:
   grass/trunk/general/g.list/main.c
   grass/trunk/general/g.remove/main.c
Log:
g.list and g.remove: make guisections consistent and put related things together

 * group print options together (move from optional)
 * group pattern flags together (move from optional)
 * remove raster (contained just one flag)
 * move names group to be first (not perfect, names and ignore have different usages, related in implementation, not for user)


Modified: grass/trunk/general/g.list/main.c
===================================================================
--- grass/trunk/general/g.list/main.c	2014-10-13 15:28:21 UTC (rev 62247)
+++ grass/trunk/general/g.list/main.c	2014-10-14 01:39:11 UTC (rev 62248)
@@ -114,6 +114,7 @@
 	_("'.' for current mapset; '*' for all mapsets in location");
     opt.separator = G_define_standard_option(G_OPT_F_SEP);
     opt.separator->answer = "newline";
+    opt.separator->guisection = _("Print");
 
     opt.region = G_define_standard_option(G_OPT_M_REGION);
     opt.region->label = _("Name of saved region for map search (default: not restricted)");
@@ -124,6 +125,7 @@
     opt.output->required = NO;
     opt.output->label = _("Name for output file");
     opt.output->description = _("If not given or '-' then standard output");
+    opt.output->guisection = _("Print");
 
     flag.regex = G_define_flag();
     flag.regex->key = 'r';

Modified: grass/trunk/general/g.remove/main.c
===================================================================
--- grass/trunk/general/g.remove/main.c	2014-10-13 15:28:21 UTC (rev 62247)
+++ grass/trunk/general/g.remove/main.c	2014-10-14 01:39:11 UTC (rev 62248)
@@ -80,18 +80,6 @@
     opt.type->descriptions = M_get_option_desc(TRUE);
     opt.type->guidependency = "pattern,exclude,names,ignore";
 
-    opt.pattern = G_define_option();
-    opt.pattern->key = "pattern";
-    opt.pattern->type = TYPE_STRING;
-    opt.pattern->description = _("File name search pattern");
-    opt.pattern->guisection = _("Pattern");
-
-    opt.exclude = G_define_option();
-    opt.exclude->key = "exclude";
-    opt.exclude->type = TYPE_STRING;
-    opt.exclude->description = _("File name exclusion pattern (default: none)");
-    opt.exclude->guisection = _("Pattern");
-
     opt.names = G_define_option();
     opt.names->key = "names";
     opt.names->type = TYPE_STRING;
@@ -109,15 +97,29 @@
 	_("File names to ignore separated by a comma (default: none)");
     opt.ignore->guisection = _("Names");
 
+    opt.pattern = G_define_option();
+    opt.pattern->key = "pattern";
+    opt.pattern->type = TYPE_STRING;
+    opt.pattern->description = _("File name search pattern");
+    opt.pattern->guisection = _("Pattern");
+
+    opt.exclude = G_define_option();
+    opt.exclude->key = "exclude";
+    opt.exclude->type = TYPE_STRING;
+    opt.exclude->description = _("File name exclusion pattern (default: none)");
+    opt.exclude->guisection = _("Pattern");
+
     flag.regex = G_define_flag();
     flag.regex->key = 'r';
     flag.regex->description =
 	_("Use basic regular expressions instead of wildcards");
+    flag.regex->guisection = _("Pattern");
 
     flag.extended = G_define_flag();
     flag.extended->key = 'e';
     flag.extended->description =
 	_("Use extended regular expressions instead of wildcards");
+    flag.extended->guisection = _("Pattern");
 
     flag.force = G_define_flag();
     flag.force->key = 'f';
@@ -127,8 +129,7 @@
     flag.basemap = G_define_flag();
     flag.basemap->key = 'b';
     flag.basemap->description = _("Remove base raster maps");
-    flag.basemap->guisection = _("Raster");
-    
+
     G_option_exclusive(flag.regex, flag.extended, NULL);
     G_option_exclusive(opt.pattern, opt.names, NULL);
     G_option_exclusive(opt.exclude, opt.ignore, NULL);



More information about the grass-commit mailing list