diff --git a/display/d.barscale/main.c b/display/d.barscale/main.c index 197e8008929..2c6ae6dd8bf 100644 --- a/display/d.barscale/main.c +++ b/display/d.barscale/main.c @@ -108,11 +108,13 @@ int main(int argc, char **argv) _("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"); diff --git a/display/d.colortable/main.c b/display/d.colortable/main.c index b3705652c47..30c2e127ca4 100644 --- a/display/d.colortable/main.c +++ b/display/d.colortable/main.c @@ -66,7 +66,7 @@ int main(int argc, char **argv) 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"); diff --git a/display/d.erase/main.c b/display/d.erase/main.c index a0c8f48d4c6..b3a15dd78c2 100644 --- a/display/d.erase/main.c +++ b/display/d.erase/main.c @@ -32,7 +32,10 @@ int main(int argc, char *argv[]) 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'; diff --git a/display/d.geodesic/main.c b/display/d.geodesic/main.c index 8f0cf7db836..735ebc6b1e7 100644 --- a/display/d.geodesic/main.c +++ b/display/d.geodesic/main.c @@ -52,13 +52,13 @@ int main(int argc, char *argv[]) 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)) diff --git a/display/d.grid/main.c b/display/d.grid/main.c index 707822809db..e1201283c13 100644 --- a/display/d.grid/main.c +++ b/display/d.grid/main.c @@ -86,17 +86,17 @@ int main(int argc, char **argv) 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"); diff --git a/display/d.histogram/main.c b/display/d.histogram/main.c index 2f137f4a6e7..8c568abde74 100644 --- a/display/d.histogram/main.c +++ b/display/d.histogram/main.c @@ -100,10 +100,13 @@ int main(int argc, char **argv) /* 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(); diff --git a/display/d.legend/main.c b/display/d.legend/main.c index 5092498b3ec..6cf95225647 100644 --- a/display/d.legend/main.c +++ b/display/d.legend/main.c @@ -156,7 +156,7 @@ int main(int argc, char **argv) _("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"); diff --git a/display/d.mon/main.c b/display/d.mon/main.c index 202e36474ca..a35241d63ec 100644 --- a/display/d.mon/main.c +++ b/display/d.mon/main.c @@ -85,7 +85,10 @@ int main(int argc, char *argv[]) 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); diff --git a/display/d.northarrow/main.c b/display/d.northarrow/main.c index 5cc202a46b5..c37955c3386 100644 --- a/display/d.northarrow/main.c +++ b/display/d.northarrow/main.c @@ -61,11 +61,11 @@ int main(int argc, char **argv) _("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"); diff --git a/display/d.rast.arrow/main.c b/display/d.rast.arrow/main.c index 539474ee4eb..683c1c8a4a0 100644 --- a/display/d.rast.arrow/main.c +++ b/display/d.rast.arrow/main.c @@ -110,25 +110,25 @@ int main(int argc, char **argv) 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)"); diff --git a/display/d.rast.num/main.c b/display/d.rast.num/main.c index ebca9784882..d7347008e81 100644 --- a/display/d.rast.num/main.c +++ b/display/d.rast.num/main.c @@ -83,18 +83,15 @@ int main(int argc, char **argv) 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(); diff --git a/display/d.rast/main.c b/display/d.rast/main.c index bca9e5fa914..8d1919ae9ea 100644 --- a/display/d.rast/main.c +++ b/display/d.rast/main.c @@ -69,11 +69,11 @@ int main(int argc, char **argv) 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(); diff --git a/display/d.rhumbline/main.c b/display/d.rhumbline/main.c index ed63f10caff..53e4c1c5425 100644 --- a/display/d.rhumbline/main.c +++ b/display/d.rhumbline/main.c @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) 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"); diff --git a/display/d.thematic.area/main.c b/display/d.thematic.area/main.c index 2b0d973eee4..4884d7b2c08 100644 --- a/display/d.thematic.area/main.c +++ b/display/d.thematic.area/main.c @@ -142,7 +142,7 @@ int main(int argc, char **argv) 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"); diff --git a/display/d.vect.chart/main.c b/display/d.vect.chart/main.c index 8842e9ca089..5fe0334fe6d 100644 --- a/display/d.vect.chart/main.c +++ b/display/d.vect.chart/main.c @@ -111,16 +111,15 @@ int main(int argc, char **argv) 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(); diff --git a/display/d.vect/main.c b/display/d.vect/main.c index 52237af2182..1989db88c01 100644 --- a/display/d.vect/main.c +++ b/display/d.vect/main.c @@ -112,11 +112,11 @@ int main(int argc, char **argv) /* 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 @@ int main(int argc, char **argv) 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"; diff --git a/general/g.cairocomp/main.c b/general/g.cairocomp/main.c index adff5df1b16..504a8574b55 100644 --- a/general/g.cairocomp/main.c +++ b/general/g.cairocomp/main.c @@ -235,7 +235,8 @@ int main(int argc, char *argv[]) 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; diff --git a/general/g.parser/standard_option.c b/general/g.parser/standard_option.c index c75db181945..f8b03d24f00 100644 --- a/general/g.parser/standard_option.c +++ b/general/g.parser/standard_option.c @@ -51,8 +51,8 @@ static char* STD_OPT_STRINGS[] = {"G_OPT_UNDEFINED", "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", diff --git a/general/g.pnmcomp/main.c b/general/g.pnmcomp/main.c index 911fd689ef4..d4746eb1107 100644 --- a/general/g.pnmcomp/main.c +++ b/general/g.pnmcomp/main.c @@ -320,7 +320,9 @@ int main(int argc, char *argv[]) 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)) diff --git a/include/gis.h b/include/gis.h index e8af642ea07..8002031a91c 100644 --- a/include/gis.h +++ b/include/gis.h @@ -258,8 +258,8 @@ typedef enum 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 */ diff --git a/lib/gis/parser_standard_options.c b/lib/gis/parser_standard_options.c index da7f53761ea..ae49565c4ec 100644 --- a/lib/gis/parser_standard_options.c +++ b/lib/gis/parser_standard_options.c @@ -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 @@ struct Option *G_define_standard_option(int opt) 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 @@ struct Option *G_define_standard_option(int opt) 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; diff --git a/misc/m.nviz.image/args.c b/misc/m.nviz.image/args.c index 5cf4121bf5d..8d7d4fbd13a 100644 --- a/misc/m.nviz.image/args.c +++ b/misc/m.nviz.image/args.c @@ -65,7 +65,10 @@ void parse_command(int argc, char *argv[], struct GParams *params) /*** 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 @@ void args_surface(struct GParams *params) 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 @@ void args_surface(struct GParams *params) 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 @@ void args_vline(struct GParams *params) 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 @@ void args_vpoint(struct GParams *params) 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 @@ void args_volume(struct GParams *params) 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 @@ void args_lighting(struct GParams *params) 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 @@ void args_fringe(struct GParams *params) 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 @@ void args_arrow(struct GParams *params) _("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; diff --git a/raster/r.his/main.c b/raster/r.his/main.c index c003857e0f5..ea27caa02e8 100644 --- a/raster/r.his/main.c +++ b/raster/r.his/main.c @@ -116,7 +116,8 @@ int main(int argc, char **argv) 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; diff --git a/vector/v.label/main.c b/vector/v.label/main.c index 2e918f0dc49..102ca6ef385 100644 --- a/vector/v.label/main.c +++ b/vector/v.label/main.c @@ -147,7 +147,7 @@ int main(int argc, char **argv) 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 @@ int main(int argc, char **argv) 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 @@ int main(int argc, char **argv) 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"; diff --git a/vector/v.lrs/v.lrs.label/main.c b/vector/v.lrs/v.lrs.label/main.c index e9225e9d5c3..c6737fb198c 100644 --- a/vector/v.lrs/v.lrs.label/main.c +++ b/vector/v.lrs/v.lrs.label/main.c @@ -189,14 +189,8 @@ int main(int argc, char **argv) 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 @@ int main(int argc, char **argv) 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 @@ int main(int argc, char **argv) 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";