瀏覽代碼

d.vect: add color opt description, wxGUI menuform fixed
(merge from devbr6, https://trac.osgeo.org/grass/changeset/32837)


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

Martin Landa 16 年之前
父節點
當前提交
157f7aa4fe
共有 2 個文件被更改,包括 15 次插入6 次删除
  1. 14 5
      display/d.vect/main.c
  2. 1 1
      gui/wxpython/gui_modules/menuform.py

+ 14 - 5
display/d.vect/main.c

@@ -159,17 +159,21 @@ int main(int argc, char **argv)
     color_opt->key = "color";
     color_opt->type = TYPE_STRING;
     color_opt->answer = DEFAULT_FG_COLOR;
-    color_opt->description = _("Line color");
+    color_opt->label = _("Line color");
     color_opt->guisection = _("Colors");
     color_opt->gisprompt = GISPROMPT_COLOR;
+    color_opt->description =
+	_("Either a standard GRASS color, R:G:B triplet, or \"none\"");
 
     fcolor_opt = G_define_option();
     fcolor_opt->key = "fcolor";
     fcolor_opt->type = TYPE_STRING;
     fcolor_opt->answer = "200:200:200";
-    fcolor_opt->description = _("Area fill color");
+    fcolor_opt->label = _("Area fill color");
     fcolor_opt->guisection = _("Colors");
     fcolor_opt->gisprompt = GISPROMPT_COLOR;
+    fcolor_opt->description =
+	_("Either a standard GRASS color, R:G:B triplet, or \"none\"");
 
     rgbcol_opt = G_define_standard_option(G_OPT_COLUMN);
     rgbcol_opt->key = "rgb_column";
@@ -244,25 +248,30 @@ int main(int argc, char **argv)
     lcolor_opt->key = "lcolor";
     lcolor_opt->type = TYPE_STRING;
     lcolor_opt->answer = "red";
-    lcolor_opt->description = _("Label color");
+    lcolor_opt->label = _("Label color");
     lcolor_opt->guisection = _("Labels");
     lcolor_opt->gisprompt = GISPROMPT_COLOR;
+    lcolor_opt->description = _("Either a standard color name or R:G:B triplet");
 
     bgcolor_opt = G_define_option();
     bgcolor_opt->key = "bgcolor";
     bgcolor_opt->type = TYPE_STRING;
     bgcolor_opt->answer = "none";
     bgcolor_opt->guisection = _("Labels");
-    bgcolor_opt->description = _("Label background color");
+    bgcolor_opt->label = _("Label background color");
     bgcolor_opt->gisprompt = GISPROMPT_COLOR;
+    bgcolor_opt->description =
+	_("Either a standard GRASS color, R:G:B triplet, or \"none\"");
 
     bcolor_opt = G_define_option();
     bcolor_opt->key = "bcolor";
     bcolor_opt->type = TYPE_STRING;
     bcolor_opt->answer = "none";
     bcolor_opt->guisection = _("Labels");
-    bcolor_opt->description = _("Label border color");
+    bcolor_opt->label = _("Label border color");
     bcolor_opt->gisprompt = GISPROMPT_COLOR;
+    bcolor_opt->description =
+	_("Either a standard GRASS color, R:G:B triplet, or \"none\"");
 
     lsize_opt = G_define_option();
     lsize_opt->key = "lsize";

+ 1 - 1
gui/wxpython/gui_modules/menuform.py

@@ -1145,7 +1145,7 @@ class cmdPanel(wx.Panel):
                 # color entry
                 elif p.get('prompt','') == 'color':
                     # Heuristic way of finding whether transparent is allowed
-                    handle_transparency =  'none' in title
+                    handle_transparency =  'none' in p.get('description', '')
                     default_color = (200,200,200)
                     label_color = _("Select Color")
                     if p.get('default','') != '':