瀏覽代碼

d.barscale: fix color options
(merge from devbr6, https://trac.osgeo.org/grass/changeset/35130)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@35131 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 年之前
父節點
當前提交
c36fc94b09
共有 1 個文件被更改,包括 5 次插入16 次删除
  1. 5 16
      display/d.barscale/main.c

+ 5 - 16
display/d.barscale/main.c

@@ -73,24 +73,13 @@ int main(int argc, char **argv)
     scalebar->key = 's';
     scalebar->description = _("Draw a scale bar only");
 
-    opt1 = G_define_option();
+    opt1 = G_define_standard_option(G_OPT_C_BG);
     opt1->key = "bcolor";
-    opt1->type = TYPE_STRING;
-    opt1->answer = DEFAULT_BG_COLOR;
-    opt1->required = NO;
-    opt1->description =
-	_("Background color, either a standard GRASS color, R:G:B triplet, or \"none\"");
-    opt1->gisprompt = GISPROMPT_COLOR;
-
-    opt2 = G_define_option();
-    opt2->key = "tcolor";
-    opt2->type = TYPE_STRING;
-    opt2->answer = DEFAULT_FG_COLOR;
-    opt2->required = NO;
-    opt2->description =
-	_("Text color, either a standard GRASS color or R:G:B triplet");
-    opt2->gisprompt = GISPROMPT_COLOR;
 
+    opt2 = G_define_standard_option(G_OPT_C_FG);
+    opt2->key = "tcolor";
+    opt2->label = _("Text color");
+    
     opt3 = G_define_option();
     opt3->key = "at";
     opt3->key_desc = "x,y";