[GRASS-SVN] r63797 - in grass/trunk: display/d.barscale display/d.colortable display/d.erase display/d.geodesic display/d.grid display/d.histogram display/d.legend display/d.mon display/d.northarrow display/d.rast display/d.rast.arrow display/d.rast.num display/d.rhumbline display/d.thematic.area display/d.vect display/d.vect.chart general/g.cairocomp general/g.parser general/g.pnmcomp include lib/gis misc/m.nviz.image raster/r.his vector/v.label vector/v.lrs/v.lrs.label

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 27 20:35:23 PST 2014


Author: annakrat
Date: 2014-12-27 20:35:23 -0800 (Sat, 27 Dec 2014)
New Revision: 63797

Modified:
   grass/trunk/display/d.barscale/main.c
   grass/trunk/display/d.colortable/main.c
   grass/trunk/display/d.erase/main.c
   grass/trunk/display/d.geodesic/main.c
   grass/trunk/display/d.grid/main.c
   grass/trunk/display/d.histogram/main.c
   grass/trunk/display/d.legend/main.c
   grass/trunk/display/d.mon/main.c
   grass/trunk/display/d.northarrow/main.c
   grass/trunk/display/d.rast.arrow/main.c
   grass/trunk/display/d.rast.num/main.c
   grass/trunk/display/d.rast/main.c
   grass/trunk/display/d.rhumbline/main.c
   grass/trunk/display/d.thematic.area/main.c
   grass/trunk/display/d.vect.chart/main.c
   grass/trunk/display/d.vect/main.c
   grass/trunk/general/g.cairocomp/main.c
   grass/trunk/general/g.parser/standard_option.c
   grass/trunk/general/g.pnmcomp/main.c
   grass/trunk/include/gis.h
   grass/trunk/lib/gis/parser_standard_options.c
   grass/trunk/misc/m.nviz.image/args.c
   grass/trunk/raster/r.his/main.c
   grass/trunk/vector/v.label/main.c
   grass/trunk/vector/v.lrs/v.lrs.label/main.c
Log:
change color standard options to differentiate between allowing and not allowing none as color instead of bg/fg color, apply the change in modules and in this way fix several modules with incorrect options

Modified: grass/trunk/display/d.barscale/main.c
===================================================================
--- grass/trunk/display/d.barscale/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.barscale/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -108,11 +108,13 @@
 	_("Screen coordinates of the rectangle's top-left corner");
     coords->description = _("(0,0) is lower-left of the display frame");
 
-    fg_color_opt = G_define_standard_option(G_OPT_C_FG);
+    fg_color_opt = G_define_standard_option(G_OPT_C);
     fg_color_opt->label = _("Bar scale and text color");
     fg_color_opt->guisection = _("Colors");
 
-    bg_color_opt = G_define_standard_option(G_OPT_C_BG);
+    bg_color_opt = G_define_standard_option(G_OPT_CN);
+    bg_color_opt->key = "bgcolor";
+    bg_color_opt->answer = DEFAULT_BG_COLOR;
     bg_color_opt->label = _("Background color (drawn behind the bar)");
     bg_color_opt->guisection = _("Colors");
 

Modified: grass/trunk/display/d.colortable/main.c
===================================================================
--- grass/trunk/display/d.colortable/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.colortable/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -66,7 +66,7 @@
     opt1->description =
 	_("Name of raster map whose color table is to be displayed");
 
-    opt2 = G_define_standard_option(G_OPT_C_FG);
+    opt2 = G_define_standard_option(G_OPT_C);
     opt2->answer = DEFAULT_BG_COLOR;
     opt2->label =
 	_("Color of lines separating the colors of the color table");

Modified: grass/trunk/display/d.erase/main.c
===================================================================
--- grass/trunk/display/d.erase/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.erase/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -32,7 +32,10 @@
     module->description =
 	_("Erases the contents of the active graphics display frame with user defined color.");
 
-    color = G_define_standard_option(G_OPT_C_BG);
+    color = G_define_standard_option(G_OPT_C);
+    color->key = "bgcolor";
+    color->label = _("Background color");
+    color->answer = DEFAULT_BG_COLOR;
     
     eraseframe = G_define_flag();
     eraseframe->key = 'f';

Modified: grass/trunk/display/d.geodesic/main.c
===================================================================
--- grass/trunk/display/d.geodesic/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.geodesic/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -52,13 +52,13 @@
     parm.coor->required = YES;
     parm.coor->description = _("Starting and ending coordinates");
 
-    parm.lcolor = G_define_standard_option(G_OPT_C_FG);
+    parm.lcolor = G_define_standard_option(G_OPT_C);
     parm.lcolor->key = "line_color";
     parm.lcolor->label = _("Line color");
 
-    parm.tcolor = G_define_standard_option(G_OPT_C_FG);
+    parm.tcolor = G_define_standard_option(G_OPT_C);
     parm.tcolor->key = "text_color";
-    parm.tcolor->label = _("Text color or \"none\"");
+    parm.tcolor->label = _("Text color");
     parm.tcolor->answer = NULL;
     
     if (G_parser(argc, argv))

Modified: grass/trunk/display/d.grid/main.c
===================================================================
--- grass/trunk/display/d.grid/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.grid/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -86,17 +86,17 @@
     lwidth->required = NO;
     lwidth->description = _("Grid line width");
 
-    opt1 = G_define_standard_option(G_OPT_C_FG);
+    opt1 = G_define_standard_option(G_OPT_C);
     opt1->answer = "gray";
     opt1->label = _("Grid color");
     opt1->guisection = _("Color");
 
-    opt4 = G_define_standard_option(G_OPT_C_FG);
+    opt4 = G_define_standard_option(G_OPT_C);
     opt4->key = "border_color";
     opt4->label = _("Border color");
     opt4->guisection = _("Color");
 
-    tcolor = G_define_standard_option(G_OPT_C_FG);
+    tcolor = G_define_standard_option(G_OPT_C);
     tcolor->key = "text_color";
     tcolor->answer = "gray";
     tcolor->label = _("Text color");

Modified: grass/trunk/display/d.histogram/main.c
===================================================================
--- grass/trunk/display/d.histogram/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.histogram/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -100,10 +100,13 @@
 
     /* The color option specifies the color for the labels, tic-marks,
      * and borders of the chart. */
-    opt2 = G_define_standard_option(G_OPT_C_FG);
+    opt2 = G_define_standard_option(G_OPT_C);
     opt2->label = _("Color for text and axes");
 
-    bg_opt = G_define_standard_option(G_OPT_C_BG);
+    bg_opt = G_define_standard_option(G_OPT_CN);
+    bg_opt->key = "bgcolor";
+    bg_opt->label = _("Background color");
+    bg_opt->answer = DEFAULT_BG_COLOR;
 
 #ifdef CAN_DO_AREAS
     opt3 = G_define_option();

Modified: grass/trunk/display/d.legend/main.c
===================================================================
--- grass/trunk/display/d.legend/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.legend/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -156,7 +156,7 @@
 	_("Use a subset of the map range for the legend (min,max)");
     opt_range->guisection = _("Subset");
 
-    opt_color = G_define_standard_option(G_OPT_C_FG);
+    opt_color = G_define_standard_option(G_OPT_C);
     opt_color->label = _("Text color");
     opt_color->guisection = _("Font settings");
 

Modified: grass/trunk/display/d.mon/main.c
===================================================================
--- grass/trunk/display/d.mon/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.mon/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -85,7 +85,10 @@
     res_opt->key_desc = "value";
     res_opt->guisection = _("Settings");
 
-    bgcolor_opt = G_define_standard_option(G_OPT_C_BG);
+    bgcolor_opt = G_define_standard_option(G_OPT_CN);
+    bgcolor_opt->key = "bgcolor";
+    bgcolor_opt->label = _("Background color");
+    bgcolor_opt->answer = DEFAULT_BG_COLOR;
     bgcolor_opt->guisection = _("Settings");
 
     output_opt = G_define_standard_option(G_OPT_F_OUTPUT);

Modified: grass/trunk/display/d.northarrow/main.c
===================================================================
--- grass/trunk/display/d.northarrow/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.northarrow/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -61,11 +61,11 @@
 	_("Screen coordinates of the rectangle's top-left corner");
     coords->description = _("(0,0) is lower-left of the display frame");
 
-    fg_color_opt = G_define_standard_option(G_OPT_C_FG);
+    fg_color_opt = G_define_standard_option(G_OPT_C);
     fg_color_opt->label = _("Line color");
     fg_color_opt->guisection = _("Colors");
 
-    bg_color_opt = G_define_standard_option(G_OPT_C_BG);
+    bg_color_opt = G_define_standard_option(G_OPT_CN);
     bg_color_opt->key = "fill_color";
     bg_color_opt->label = _("Fill color");
     bg_color_opt->answer = _("black");

Modified: grass/trunk/display/d.rast/main.c
===================================================================
--- grass/trunk/display/d.rast/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.rast/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -69,11 +69,11 @@
     vallist->description = _("List of categories or values to be displayed");
     vallist->guisection = _("Selection");
 
-    bg = G_define_standard_option(G_OPT_C_BG);
+    bg = G_define_standard_option(G_OPT_C);
+    bg->key = "bgcolor";
     bg->key_desc = "color";
-    bg->gisprompt = "old_color,color,color";
+    bg->answer = DEFAULT_BG_COLOR;
     bg->label = _("Background color (for null)");
-    bg->description = _("Either a standard color name or R:G:B triplet");
     bg->guisection = _("Null cells");
 
     flag_n = G_define_flag();

Modified: grass/trunk/display/d.rast.arrow/main.c
===================================================================
--- grass/trunk/display/d.rast.arrow/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.rast.arrow/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -110,25 +110,25 @@
     opt2->options = "grass,compass,agnps,answers";
     opt2->description = _("Type of existing raster aspect map");
 
-    opt3 = G_define_standard_option(G_OPT_C_FG);
+    opt3 = G_define_standard_option(G_OPT_C);
     opt3->key = "color";
     opt3->answer = "green";
     opt3->label = _("Color for drawing arrows");
     opt3->guisection = _("Colors");
     
-    opt4 = G_define_standard_option(G_OPT_C_BG);
+    opt4 = G_define_standard_option(G_OPT_CN);
     opt4->key = "grid_color";
     opt4->answer = "gray";
     opt4->label = _("Color for drawing drawing grid");
     opt4->guisection = _("Colors");
 
-    opt5 = G_define_standard_option(G_OPT_C_BG);
+    opt5 = G_define_standard_option(G_OPT_CN);
     opt5->key = "null_color";
     opt5->answer = DEFAULT_FG_COLOR;
     opt5->label = _("Color for drawing null values (X symbol)");
     opt5->guisection = _("Colors");
 
-    opt6 = G_define_standard_option(G_OPT_C_BG);
+    opt6 = G_define_standard_option(G_OPT_CN);
     opt6->key = "unknown_color";
     opt6->answer = "red";
     opt6->label = _("Color for showing unknown information (? symbol)");

Modified: grass/trunk/display/d.rast.num/main.c
===================================================================
--- grass/trunk/display/d.rast.num/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.rast.num/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -83,18 +83,15 @@
 
     opt.map = G_define_standard_option(G_OPT_R_MAP);
 
-    opt.text_color = G_define_standard_option(G_OPT_C_FG);
+    opt.text_color = G_define_standard_option(G_OPT_C);
     opt.text_color->key = "text_color";
     opt.text_color->label = _("Text color");
-    opt.text_color->description = _("Color in GRASS format for drawing text");
     opt.text_color->guisection = _("Colors");
 
-    /* using G_OPT_C_BG because it gives none but semantically it is not BG */
-    opt.grid_color = G_define_standard_option(G_OPT_C_BG);
+    opt.grid_color = G_define_standard_option(G_OPT_CN);
     opt.grid_color->key = "grid_color";
     opt.grid_color->answer = "gray";
     opt.grid_color->label = _("Grid color");
-    opt.grid_color->description = _("Color in GRASS format for drawing grid, or \"none\"");
     opt.grid_color->guisection = _("Colors");
 
     opt.prec = G_define_option();

Modified: grass/trunk/display/d.rhumbline/main.c
===================================================================
--- grass/trunk/display/d.rhumbline/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.rhumbline/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -51,7 +51,7 @@
     parm.coor->required = YES;
     parm.coor->description = _("Starting and ending coordinates");
 
-    parm.lcolor = G_define_standard_option(G_OPT_C_FG);
+    parm.lcolor = G_define_standard_option(G_OPT_C);
     parm.lcolor->key = "line_color";
     parm.lcolor->label = _("Line color");
 

Modified: grass/trunk/display/d.thematic.area/main.c
===================================================================
--- grass/trunk/display/d.thematic.area/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.thematic.area/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -142,7 +142,7 @@
     bwidth_opt->guisection = _("Boundaries");
     bwidth_opt->description = _("Boundary width");
 
-    bcolor_opt = G_define_standard_option(G_OPT_C_FG);
+    bcolor_opt = G_define_standard_option(G_OPT_C);
     bcolor_opt->key = "boundary_color";
     bcolor_opt->label = _("Boundary color");
     bcolor_opt->guisection = _("Boundaries");

Modified: grass/trunk/display/d.vect/main.c
===================================================================
--- grass/trunk/display/d.vect/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.vect/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -112,11 +112,11 @@
 
 
     /* Colors */
-    color_opt = G_define_standard_option(G_OPT_C_FG);
+    color_opt = G_define_standard_option(G_OPT_CN);
     color_opt->label = _("Feature color");
     color_opt->guisection = _("Colors");
     
-    fcolor_opt = G_define_standard_option(G_OPT_C_BG);
+    fcolor_opt = G_define_standard_option(G_OPT_CN);
     fcolor_opt->key = "fill_color";
     fcolor_opt->answer = "200:200:200";
     fcolor_opt->label = _("Area fill color");
@@ -203,19 +203,19 @@
     attrcol_opt->guisection = _("Labels");
     attrcol_opt->description = _("Name of column to be displayed as a label");
 
-    lcolor_opt = G_define_standard_option(G_OPT_C_FG);
+    lcolor_opt = G_define_standard_option(G_OPT_C);
     lcolor_opt->key = "label_color";
     lcolor_opt->answer = "red";
     lcolor_opt->label = _("Label color");
     lcolor_opt->guisection = _("Labels");
 
-    bgcolor_opt = G_define_standard_option(G_OPT_C_BG);
+    bgcolor_opt = G_define_standard_option(G_OPT_CN);
     bgcolor_opt->key = "label_bgcolor";
     bgcolor_opt->answer = "none";
     bgcolor_opt->guisection = _("Labels");
     bgcolor_opt->label = _("Label background color");
 
-    bcolor_opt = G_define_standard_option(G_OPT_C_BG);
+    bcolor_opt = G_define_standard_option(G_OPT_CN);
     bcolor_opt->key = "label_bcolor";
     bcolor_opt->type = TYPE_STRING;
     bcolor_opt->answer = "none";

Modified: grass/trunk/display/d.vect.chart/main.c
===================================================================
--- grass/trunk/display/d.vect.chart/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/display/d.vect.chart/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -111,16 +111,15 @@
     scale_opt->description = _("Scale for size (to get size in pixels)");
     scale_opt->guisection = _("Chart properties");
 
-    ocolor_opt = G_define_standard_option(G_OPT_C_FG);
+    ocolor_opt = G_define_standard_option(G_OPT_C);
     ocolor_opt->key = "outline_color";
     ocolor_opt->label = _("Outline color");
     ocolor_opt->guisection = _("Chart properties");
 
-    colors_opt = G_define_standard_option(G_OPT_C_FG);
+    colors_opt = G_define_standard_option(G_OPT_C);
     colors_opt->key = "colors";
     colors_opt->multiple = YES;
     colors_opt->label = _("Colors used to fill charts");
-    colors_opt->gisprompt = "old_color,color,color";
     colors_opt->guisection = _("Chart properties");
 
     y_center_flag = G_define_flag();

Modified: grass/trunk/general/g.cairocomp/main.c
===================================================================
--- grass/trunk/general/g.cairocomp/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/general/g.cairocomp/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -235,7 +235,8 @@
     opt.height->required = YES;
     opt.height->description = _("Image height");
 
-    opt.bg = G_define_standard_option(G_OPT_C_BG);
+    opt.bg = G_define_standard_option(G_OPT_C);
+    opt.bg->key = "bgcolor";
     opt.bg->label = _("Background color (R:G:B:A)");
     opt.bg->answer = NULL;
 

Modified: grass/trunk/general/g.parser/standard_option.c
===================================================================
--- grass/trunk/general/g.parser/standard_option.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/general/g.parser/standard_option.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -51,8 +51,8 @@
                                   "G_OPT_F_BIN_INPUT",                                  
                                   "G_OPT_F_OUTPUT",
                                   "G_OPT_F_SEP",
-                                  "G_OPT_C_FG",
-                                  "G_OPT_C_BG",
+                                  "G_OPT_C",
+                                  "G_OPT_CN",
                                   "G_OPT_M_UNITS",
                                   "G_OPT_M_DATATYPE",
                                   "G_OPT_M_MAPSET",

Modified: grass/trunk/general/g.pnmcomp/main.c
===================================================================
--- grass/trunk/general/g.pnmcomp/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/general/g.pnmcomp/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -320,7 +320,9 @@
     opt.height->required = YES;
     opt.height->description = _("Image height");
 
-    opt.bg = G_define_standard_option(G_OPT_C_BG);
+    opt.bg = G_define_standard_option(G_OPT_C);
+    opt.bg->key = "bgcolor";
+    opt.bg->label = _("Background color");
     opt.bg->answer = NULL;
     
     if (G_parser(argc, argv))

Modified: grass/trunk/include/gis.h
===================================================================
--- grass/trunk/include/gis.h	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/include/gis.h	2014-12-28 04:35:23 UTC (rev 63797)
@@ -258,8 +258,8 @@
     G_OPT_F_OUTPUT,		/*!< new output file */
     G_OPT_F_SEP,		/*!< data field separator */
 
-    G_OPT_C_FG,			/*!< foreground color */
-    G_OPT_C_BG,			/*!< background color */
+    G_OPT_C,			/*!< color */
+    G_OPT_CN,			/*!< color or none */
 
     G_OPT_M_UNITS,              /*!< units */
     G_OPT_M_DATATYPE,           /*!< datatype */

Modified: grass/trunk/lib/gis/parser_standard_options.c
===================================================================
--- grass/trunk/lib/gis/parser_standard_options.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/lib/gis/parser_standard_options.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -92,8 +92,8 @@
    - G_OPT_F_SEP
    
   - colors
-   - G_OPT_C_FG
-   - G_OPT_C_BG
+   - G_OPT_C
+   - G_OPT_CN
 
   - misc
    - G_OPT_M_DIR
@@ -590,7 +590,7 @@
 	break;
 
 	/* colors */
-    case G_OPT_C_FG:
+    case G_OPT_C:
 	Opt->key = "color";
 	Opt->type = TYPE_STRING;
 	Opt->key_desc = "name";
@@ -599,16 +599,16 @@
 	Opt->gisprompt = "old,color,color";
 	Opt->label = _("Color");
 	Opt->description =
-	    _("Either a standard color name, R:G:B triplet, or \"none\"");
+	    _("Either a standard color name or R:G:B triplet");
 	break;
-    case G_OPT_C_BG:
-	Opt->key = "bgcolor";
+    case G_OPT_CN:
+	Opt->key = "color";
 	Opt->type = TYPE_STRING;
 	Opt->key_desc = "name";
 	Opt->required = NO;
-	Opt->answer = DEFAULT_BG_COLOR;
+	Opt->answer = DEFAULT_FG_COLOR;
 	Opt->gisprompt = "old,color_none,color";
-	Opt->label = _("Background color");
+	Opt->label = _("Color");
 	Opt->description =
 	    _("Either a standard color name, R:G:B triplet, or \"none\"");
 	break;

Modified: grass/trunk/misc/m.nviz.image/args.c
===================================================================
--- grass/trunk/misc/m.nviz.image/args.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/misc/m.nviz.image/args.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -65,7 +65,10 @@
 
     /*** misc ***/
     /* background color */
-    params->bgcolor = G_define_standard_option(G_OPT_C_BG);
+    params->bgcolor = G_define_standard_option(G_OPT_C);
+    params->bgcolor->key = "bgcolor";
+    params->bgcolor->label = _("Background color");
+    params->bgcolor->answer = DEFAULT_BG_COLOR;
 
     /*** viewpoint ***/
     args_viewpoint(params);
@@ -147,7 +150,7 @@
     params->color_map->guisection = _("Surfaces");
     params->color_map->key = "color_map";
 
-    params->color_const = G_define_standard_option(G_OPT_C_FG);
+    params->color_const = G_define_standard_option(G_OPT_C);
     params->color_const->multiple = YES;
     params->color_const->label = _("Color value(s)");
     params->color_const->guisection = _("Surfaces");
@@ -276,7 +279,7 @@
     params->shade->guisection = _("Draw");
 
     /* wire color */
-    params->wire_color = G_define_standard_option(G_OPT_C_FG);
+    params->wire_color = G_define_standard_option(G_OPT_C);
     params->wire_color->multiple = YES;
     params->wire_color->required = NO;
     params->wire_color->label = _("Wire color");
@@ -336,7 +339,7 @@
     params->vline_width_column->guisection = _("Vector lines");
 
     /* line color */
-    params->vline_color = G_define_standard_option(G_OPT_C_FG);
+    params->vline_color = G_define_standard_option(G_OPT_C);
     params->vline_color->multiple = YES;
     params->vline_color->required = NO;
     params->vline_color->label = _("Vector line color");
@@ -448,7 +451,7 @@
     params->vpoint_width_column->guisection = _("Vector points");
 
     /* point color */
-    params->vpoint_color = G_define_standard_option(G_OPT_C_FG);
+    params->vpoint_color = G_define_standard_option(G_OPT_C);
     params->vpoint_color->multiple = YES;
     params->vpoint_color->required = NO;
     params->vpoint_color->label = _("Icon color");
@@ -658,7 +661,7 @@
     params->isosurf_color_map->guisection = _("Volumes");
 
     /* isosurface color value */
-    params->isosurf_color_const = G_define_standard_option(G_OPT_C_FG);
+    params->isosurf_color_const = G_define_standard_option(G_OPT_C);
     params->isosurf_color_const->key = "isosurf_color_value";
     params->isosurf_color_const->required = NO;
     params->isosurf_color_const->multiple = YES;
@@ -769,7 +772,7 @@
     params->light_pos->guisection = _("Lighting");
     params->light_pos->answer = "0.68,-0.68,0.80";
 
-    params->light_color = G_define_standard_option(G_OPT_C_FG);
+    params->light_color = G_define_standard_option(G_OPT_C);
     params->light_color->key = "light_color";
     params->light_color->label = _("Light color");
     params->light_color->guisection = _("Lighting");
@@ -872,7 +875,7 @@
     params->fringe->guisection = _("Fringe");
     params->fringe->multiple = YES;
 
-    params->fringe_color = G_define_standard_option(G_OPT_C_FG);
+    params->fringe_color = G_define_standard_option(G_OPT_C);
     params->fringe_color->key = "fringe_color";
     params->fringe_color->label = _("Fringe color");
     params->fringe_color->guisection = _("Fringe");
@@ -911,7 +914,7 @@
 	_("North arrow size (in map units)");
     params->north_arrow_size->guisection = _("Decoration");
 
-    params->north_arrow_color = G_define_standard_option(G_OPT_C_FG);
+    params->north_arrow_color = G_define_standard_option(G_OPT_C);
     params->north_arrow_color->key = "arrow_color";
     params->north_arrow_color->required = NO;
     params->north_arrow_color->multiple = NO;

Modified: grass/trunk/raster/r.his/main.c
===================================================================
--- grass/trunk/raster/r.his/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/raster/r.his/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -116,7 +116,8 @@
     opt_b->gisprompt = "new,cell,raster";
     opt_b->description = _("Name of output layer to be used for blue");
 
-    bgcolor = G_define_standard_option(G_OPT_C_BG);
+    bgcolor = G_define_standard_option(G_OPT_CN);
+    bgcolor->key = "bgcolor";
     bgcolor->label = _("Color to use instead of NULL values");
     bgcolor->answer = NULL;
 

Modified: grass/trunk/vector/v.label/main.c
===================================================================
--- grass/trunk/vector/v.label/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/vector/v.label/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -147,7 +147,7 @@
     FontSize->options = "1-1000";
     FontSize->guisection = _("Font");
 
-    Color = G_define_standard_option(G_OPT_C_FG);
+    Color = G_define_standard_option(G_OPT_C);
     Color->label = _("Text color");
     Color->guisection = _("Colors");
 
@@ -169,7 +169,7 @@
     Width->options = "0-25";
     Width->guisection = _("Effects");
 
-    Hcolor = G_define_standard_option(G_OPT_C_BG);
+    Hcolor = G_define_standard_option(G_OPT_CN);
     Hcolor->key = "hcolor";
     Hcolor->label = _("Highlight color for text");
     Hcolor->answer = "none";
@@ -182,11 +182,13 @@
     Hwidth->answer = "0";
     Hwidth->guisection = _("Effects");
 
-    Bcolor = G_define_standard_option(G_OPT_C_BG);
+    Bcolor = G_define_standard_option(G_OPT_CN);
+    Bcolor->key = "bgcolor";
+    Bcolor->label = _("Background color");
     Bcolor->answer = "none";
     Bcolor->guisection = _("Colors");
 
-    Border = G_define_standard_option(G_OPT_C_BG);
+    Border = G_define_standard_option(G_OPT_CN);
     Border->key = "border";
     Border->label = _("Border color");
     Border->answer = "none";

Modified: grass/trunk/vector/v.lrs/v.lrs.label/main.c
===================================================================
--- grass/trunk/vector/v.lrs/v.lrs.label/main.c	2014-12-28 04:24:39 UTC (rev 63796)
+++ grass/trunk/vector/v.lrs/v.lrs.label/main.c	2014-12-28 04:35:23 UTC (rev 63797)
@@ -189,14 +189,8 @@
     Size->answer = "100";
     Size->options = "1-1000";
 
-    Color = G_define_option();
-    Color->key = "color";
-    Color->description = _("Text color");
-    Color->type = TYPE_STRING;
-    Color->answer = "black";
-    Color->options =
-	"aqua,black,blue,brown,cyan,gray,green,grey,indigo,magenta,"
-	"orange,purple,red,violet,white,yellow";
+    Color = G_define_standard_option(G_OPT_C);
+    Color->label = _("Text color");
 
     Width = G_define_option();
     Width->key = "width";
@@ -206,15 +200,10 @@
     Width->answer = "1";
     Width->options = "1-100";
 
-    Hcolor = G_define_option();
+    Hcolor = G_define_standard_option(G_OPT_CN);
     Hcolor->key = "hcolor";
     Hcolor->label = _("Highlight color for text");
-    Hcolor->description = _("Only for d.label output");
-    Hcolor->type = TYPE_STRING;
     Hcolor->answer = "none";
-    Hcolor->options =
-	"none,aqua,black,blue,brown,cyan,gray,green,grey,indigo,magenta,"
-	"orange,purple,red,violet,white,yellow";
 
     Hwidth = G_define_option();
     Hwidth->key = "hwidth";
@@ -224,20 +213,15 @@
     Hwidth->answer = "0";
     Hwidth->options = "0-100";
 
-    Bcolor = G_define_standard_option(G_OPT_C_BG);
+    Bcolor = G_define_standard_option(G_OPT_CN);
+    Bcolor->key = "bgcolor";
+    Bcolor->label = _("Background color");
     Bcolor->answer = "none";
-    Bcolor->options =
-	"none,aqua,black,blue,brown,cyan,gray,green,grey,indigo,magenta,"
-	"orange,purple,red,violet,white,yellow";
 
-    Border = G_define_option();
+    Border = G_define_standard_option(G_OPT_CN);
     Border->key = "border";
-    Border->description = _("Border color");
-    Border->type = TYPE_STRING;
+    Border->label = _("Border color");
     Border->answer = "none";
-    Border->options =
-	"none,aqua,black,blue,brown,cyan,gray,green,grey,indigo,magenta,"
-	"orange,purple,red,violet,white,yellow";
 
     Opaque = G_define_option();
     Opaque->key = "opaque";



More information about the grass-commit mailing list