[GRASS-SVN] r63811 - in grass/branches/releasebranch_7_0: . 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
Mon Dec 29 04:37:47 PST 2014


Author: annakrat
Date: 2014-12-29 04:37:46 -0800 (Mon, 29 Dec 2014)
New Revision: 63811

Modified:
   grass/branches/releasebranch_7_0/
   grass/branches/releasebranch_7_0/display/d.barscale/main.c
   grass/branches/releasebranch_7_0/display/d.colortable/main.c
   grass/branches/releasebranch_7_0/display/d.erase/main.c
   grass/branches/releasebranch_7_0/display/d.geodesic/main.c
   grass/branches/releasebranch_7_0/display/d.grid/main.c
   grass/branches/releasebranch_7_0/display/d.histogram/main.c
   grass/branches/releasebranch_7_0/display/d.legend/main.c
   grass/branches/releasebranch_7_0/display/d.mon/main.c
   grass/branches/releasebranch_7_0/display/d.northarrow/main.c
   grass/branches/releasebranch_7_0/display/d.rast.arrow/main.c
   grass/branches/releasebranch_7_0/display/d.rast.num/main.c
   grass/branches/releasebranch_7_0/display/d.rast/main.c
   grass/branches/releasebranch_7_0/display/d.rhumbline/main.c
   grass/branches/releasebranch_7_0/display/d.thematic.area/main.c
   grass/branches/releasebranch_7_0/display/d.vect.chart/main.c
   grass/branches/releasebranch_7_0/display/d.vect/main.c
   grass/branches/releasebranch_7_0/general/g.cairocomp/main.c
   grass/branches/releasebranch_7_0/general/g.parser/standard_option.c
   grass/branches/releasebranch_7_0/general/g.pnmcomp/main.c
   grass/branches/releasebranch_7_0/include/gis.h
   grass/branches/releasebranch_7_0/lib/gis/parser_standard_options.c
   grass/branches/releasebranch_7_0/misc/m.nviz.image/args.c
   grass/branches/releasebranch_7_0/raster/r.his/main.c
   grass/branches/releasebranch_7_0/vector/v.label/main.c
   grass/branches/releasebranch_7_0/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 (merge from trunk, r63797)


Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
   - /grass/trunk:60817,61096,61141,61994,62105,62179-62180,62182,62190,62403,62422,62424,62437,62466,62469,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750-62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822,62824,62828,62831,62838,62845,62847,62850,62856,62879,62881,62886,62904,62907-62908,62910,62912,62914,62916,62918,62920,62925,62932-62933,62935,62940,62942,62944-62946,62949,62955-62956,62958,62960,62962,62964,62966-62968,62970,62973,62975,62977,62981,62983,62985,62987,62989,62991,62993,62995,62997,62999-63000,63003,63005,63007,63009,63011,63013,63015,63017,63020,63022,63024,63026,63028-63031,63033,63035,63037,63040,63043-63044,63047,63049,63051,63053,63055,63057,63060,63062-63064,63066,63068,63070-63071,63074,
 63076,63079,63081,63083,63085,63087,63089,63091,63093,63095,63098,63100,63102,63105,63107,63109,63111,63113-63114,63116,63119,63121,63123,63125,63130,63132-63133,63135,63137,63140,63143,63145,63147,63149,63151,63153-63154,63157,63160,63165,63170,63173,63175,63187,63192-63193,63196,63199-63200,63202,63209,63216,63220-63221,63224,63227,63240,63246,63250,63255,63259,63261,63275-63276,63279,63281,63283,63287,63290,63292,63297,63302,63304-63307,63315,63319,63327,63330,63332,63339,63342,63345,63361-63363,63367,63379,63389,63391,63393,63402,63408-63409,63416-63417,63425,63427,63429,63431,63433,63448,63451,63453,63457,63459,63464-63470,63473,63482,63497,63505,63508,63510,63515,63521-63524,63526,63536-63537,63551-63552,63554,63556,63558-63559,63562,63570,63576,63582,63589-63593,63602,63604,63608-63609,63616,63618,63624,63626,63628,63630,63634,63639,63642,63644,63650,63652,63656,63679,63685,63689,63691,63693,63695,63698,63700-63702,63704,63706-63707,63709,63711,63713,63715,63717-63718
 ,63721-63727,63731,63733,63740-63742,63744,63747-63749,63751-63752,63756,63758,63761,63767,63783,63787,63793,63798,63801,63803,63807-63808
   + /grass/trunk:60817,61096,61141,61994,62105,62179-62180,62182,62190,62403,62422,62424,62437,62466,62469,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750-62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822,62824,62828,62831,62838,62845,62847,62850,62856,62879,62881,62886,62904,62907-62908,62910,62912,62914,62916,62918,62920,62925,62932-62933,62935,62940,62942,62944-62946,62949,62955-62956,62958,62960,62962,62964,62966-62968,62970,62973,62975,62977,62981,62983,62985,62987,62989,62991,62993,62995,62997,62999-63000,63003,63005,63007,63009,63011,63013,63015,63017,63020,63022,63024,63026,63028-63031,63033,63035,63037,63040,63043-63044,63047,63049,63051,63053,63055,63057,63060,63062-63064,63066,63068,63070-63071,63074,
 63076,63079,63081,63083,63085,63087,63089,63091,63093,63095,63098,63100,63102,63105,63107,63109,63111,63113-63114,63116,63119,63121,63123,63125,63130,63132-63133,63135,63137,63140,63143,63145,63147,63149,63151,63153-63154,63157,63160,63165,63170,63173,63175,63187,63192-63193,63196,63199-63200,63202,63209,63216,63220-63221,63224,63227,63240,63246,63250,63255,63259,63261,63275-63276,63279,63281,63283,63287,63290,63292,63297,63302,63304-63307,63315,63319,63327,63330,63332,63339,63342,63345,63361-63363,63367,63379,63389,63391,63393,63402,63408-63409,63416-63417,63425,63427,63429,63431,63433,63448,63451,63453,63457,63459,63464-63470,63473,63482,63497,63505,63508,63510,63515,63521-63524,63526,63536-63537,63551-63552,63554,63556,63558-63559,63562,63570,63576,63582,63589-63593,63602,63604,63608-63609,63616,63618,63624,63626,63628,63630,63634,63639,63642,63644,63650,63652,63656,63679,63685,63689,63691,63693,63695,63698,63700-63702,63704,63706-63707,63709,63711,63713,63715,63717-63718
 ,63721-63727,63731,63733,63740-63742,63744,63747-63749,63751-63752,63756,63758,63761,63767,63783,63787,63793,63797-63798,63801,63803,63807-63808

Modified: grass/branches/releasebranch_7_0/display/d.barscale/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.barscale/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.barscale/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.colortable/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.colortable/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.colortable/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.erase/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.erase/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.erase/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.geodesic/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.geodesic/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.geodesic/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -57,13 +57,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;
 
     parm.units = G_define_standard_option(G_OPT_M_UNITS);

Modified: grass/branches/releasebranch_7_0/display/d.grid/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.grid/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.grid/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.histogram/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.histogram/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.histogram/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.legend/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.legend/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.legend/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.mon/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.mon/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.mon/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.northarrow/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.northarrow/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.northarrow/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.rast/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.rast/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.rast/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.rast.arrow/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.rast.arrow/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.rast.arrow/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.rast.num/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.rast.num/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.rast.num/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -82,18 +82,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/branches/releasebranch_7_0/display/d.rhumbline/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.rhumbline/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.rhumbline/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -52,7 +52,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/branches/releasebranch_7_0/display/d.thematic.area/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.thematic.area/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.thematic.area/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.vect/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.vect/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.vect/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/display/d.vect.chart/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.vect.chart/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/display/d.vect.chart/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/general/g.cairocomp/main.c
===================================================================
--- grass/branches/releasebranch_7_0/general/g.cairocomp/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/general/g.cairocomp/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/general/g.parser/standard_option.c
===================================================================
--- grass/branches/releasebranch_7_0/general/g.parser/standard_option.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/general/g.parser/standard_option.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/general/g.pnmcomp/main.c
===================================================================
--- grass/branches/releasebranch_7_0/general/g.pnmcomp/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/general/g.pnmcomp/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/include/gis.h
===================================================================
--- grass/branches/releasebranch_7_0/include/gis.h	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/include/gis.h	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/lib/gis/parser_standard_options.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/parser_standard_options.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/lib/gis/parser_standard_options.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/misc/m.nviz.image/args.c
===================================================================
--- grass/branches/releasebranch_7_0/misc/m.nviz.image/args.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/misc/m.nviz.image/args.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/raster/r.his/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.his/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/raster/r.his/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/vector/v.label/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.label/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/vector/v.label/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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/branches/releasebranch_7_0/vector/v.lrs/v.lrs.label/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.label/main.c	2014-12-29 12:16:00 UTC (rev 63810)
+++ grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.label/main.c	2014-12-29 12:37:46 UTC (rev 63811)
@@ -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