[GRASS-SVN] r68938 - grass/branches/releasebranch_7_2/display/d.text

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jul 10 09:07:26 PDT 2016


Author: annakrat
Date: 2016-07-10 09:07:26 -0700 (Sun, 10 Jul 2016)
New Revision: 68938

Modified:
   grass/branches/releasebranch_7_2/display/d.text/main.c
Log:
d.text: reorganize options in gui, author Adam Laza (merge from trunk, r68711)

Modified: grass/branches/releasebranch_7_2/display/d.text/main.c
===================================================================
--- grass/branches/releasebranch_7_2/display/d.text/main.c	2016-07-10 16:00:16 UTC (rev 68937)
+++ grass/branches/releasebranch_7_2/display/d.text/main.c	2016-07-10 16:07:26 UTC (rev 68938)
@@ -145,15 +145,12 @@
     opt.text->type = TYPE_STRING;
     opt.text->required = NO;
     opt.text->description = _("Text to display");
+    opt.text->guisection = _("Input");
 
-    opt.size = G_define_option();
-    opt.size->key = "size";
-    opt.size->type = TYPE_DOUBLE;
-    opt.size->required = NO;
-    opt.size->answer = "5";
-    opt.size->options = "0-100";
-    opt.size->description =
-	_("Height of letters in percentage of available frame height");
+    opt.input = G_define_standard_option(G_OPT_F_INPUT);
+    opt.input->required = NO;
+    opt.input->description = _("Input file");
+    opt.input->guisection = _("Input");
 
     opt.fgcolor = G_define_option();
     opt.fgcolor->key = "color";
@@ -163,6 +160,7 @@
     opt.fgcolor->description =
 	_("Text color, either a standard GRASS color or R:G:B triplet");
     opt.fgcolor->gisprompt = "old_color,color,color";
+    opt.fgcolor->guisection = _("Text");
 
     opt.bgcolor = G_define_option();
     opt.bgcolor->key = "bgcolor";
@@ -171,15 +169,25 @@
     opt.bgcolor->description =
         _("Text background color, either a standard GRASS color or R:G:B triplet");
     opt.bgcolor->gisprompt = "old_color,color,color";
+    opt.bgcolor->guisection = _("Text");
 
-    opt.line = G_define_option();
-    opt.line->key = "line";
-    opt.line->required = NO;
-    opt.line->type = TYPE_INTEGER;
-    opt.line->options = "1-1000";
-    opt.line->description =
-	_("The screen line number on which text will begin to be drawn");
+    opt.rotation = G_define_option();
+    opt.rotation->key = "rotation";
+    opt.rotation->type = TYPE_DOUBLE;
+    opt.rotation->required = NO;
+    opt.rotation->answer = "0";
+    opt.rotation->description =
+    _("Rotation angle in degrees (counter-clockwise)");
+    opt.rotation->guisection = _("Text");
 
+    opt.linespacing = G_define_option();
+    opt.linespacing->key = "linespacing";
+    opt.linespacing->type = TYPE_DOUBLE;
+    opt.linespacing->required = NO;
+    opt.linespacing->answer = "1.25";
+    opt.linespacing->description = _("Line spacing");
+    opt.linespacing->guisection = _("Text");
+
     opt.at = G_define_option();
     opt.at->key = "at";
     opt.at->key_desc = "x,y";
@@ -187,7 +195,17 @@
     opt.at->required = NO;
     opt.at->description =
 	_("Screen position at which text will begin to be drawn (percentage, [0,0] is lower left)");
+    opt.at->guisection = _("Position");
 
+    opt.line = G_define_option();
+    opt.line->key = "line";
+    opt.line->required = NO;
+    opt.line->type = TYPE_INTEGER;
+    opt.line->options = "1-1000";
+    opt.line->description =
+	_("The screen line number on which text will begin to be drawn");
+    opt.line->guisection = _("Position");
+
     opt.align = G_define_option();
     opt.align->key = "align";
     opt.align->type = TYPE_STRING;
@@ -195,33 +213,31 @@
     opt.align->answer = "ll";
     opt.align->options = "ll,lc,lr,cl,cc,cr,ul,uc,ur";
     opt.align->description = _("Text alignment");
+    opt.align->guisection = _("Position");
 
-    opt.rotation = G_define_option();
-    opt.rotation->key = "rotation";
-    opt.rotation->type = TYPE_DOUBLE;
-    opt.rotation->required = NO;
-    opt.rotation->answer = "0";
-    opt.rotation->description =
-	_("Rotation angle in degrees (counter-clockwise)");
-
-    opt.linespacing = G_define_option();
-    opt.linespacing->key = "linespacing";
-    opt.linespacing->type = TYPE_DOUBLE;
-    opt.linespacing->required = NO;
-    opt.linespacing->answer = "1.25";
-    opt.linespacing->description = _("Line spacing");
-
     opt.font = G_define_option();
     opt.font->key = "font";
     opt.font->type = TYPE_STRING;
     opt.font->required = NO;
     opt.font->description = _("Font name");
+    opt.font->guisection = _("Font settings");
 
+    opt.size = G_define_option();
+    opt.size->key = "size";
+    opt.size->type = TYPE_DOUBLE;
+    opt.size->required = NO;
+    opt.size->answer = "5";
+    opt.size->options = "0-100";
+    opt.size->description =
+    _("Height of letters in percentage of available frame height");
+    opt.size->guisection = _("Font settings");
+
     opt.path = G_define_standard_option(G_OPT_F_INPUT);
     opt.path->key = "path";
     opt.path->required = NO;
     opt.path->description = _("Path to font file");
     opt.path->gisprompt = "old,font,file";
+    opt.path->guisection = _("Font settings");
 
     opt.charset = G_define_option();
     opt.charset->key = "charset";
@@ -229,30 +245,32 @@
     opt.charset->required = NO;
     opt.charset->description =
 	_("Text encoding (only applicable to TrueType fonts)");
+    opt.charset->guisection = _("Font settings");
 
-    opt.input = G_define_standard_option(G_OPT_F_INPUT);
-    opt.input->required = NO;
-    opt.input->description = _("Input file");
-
     flag.p = G_define_flag();
     flag.p->key = 'p';
     flag.p->description = _("Screen position in pixels ([0,0] is top left)");
+    flag.p->guisection = _("Position");
 
     flag.g = G_define_flag();
     flag.g->key = 'g';
     flag.g->description = _("Screen position in geographic coordinates");
+    flag.g->guisection = _("Position");
 
     flag.b = G_define_flag();
     flag.b->key = 'b';
     flag.b->description = _("Use bold text");
+    flag.b->guisection = _("Text");
 
     flag.r = G_define_flag();
     flag.r->key = 'r';
     flag.r->description = _("Use radians instead of degrees for rotation");
+    flag.r->guisection = _("Text");
 
     flag.s = G_define_flag();
     flag.s->key = 's';
     flag.s->description = _("Font size is height in pixels");
+    flag.s->guisection = _("Font settings");
 
 
     /* check command line */



More information about the grass-commit mailing list