[GRASS-SVN] r57735 - grass/trunk/display/d.barscale

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 18 06:43:28 PDT 2013


Author: martinl
Date: 2013-09-18 06:43:27 -0700 (Wed, 18 Sep 2013)
New Revision: 57735

Modified:
   grass/trunk/display/d.barscale/Makefile
   grass/trunk/display/d.barscale/main.c
Log:
d.barscale: add priviews to the manual


Modified: grass/trunk/display/d.barscale/Makefile
===================================================================
--- grass/trunk/display/d.barscale/Makefile	2013-09-18 08:57:08 UTC (rev 57734)
+++ grass/trunk/display/d.barscale/Makefile	2013-09-18 13:43:27 UTC (rev 57735)
@@ -8,3 +8,11 @@
 include $(MODULE_TOPDIR)/include/Make/Module.make
 
 default: cmd
+
+# insert thumbnail previews
+$(PGM).tmp.html: $(BIN)/$(PGM)$(EXE)
+	$(call htmldesc,$<,$@)
+	sed 's!^<dd><b>\([a-z0-9._]*\)</b>:!<dd><img width="80" height="12" src="$(ETC)/gui/images/barscales/\1.png"> <b>\1</b>:!' "$@" > "$@.tmp"
+	mv -f "$@.tmp" "$@"
+
+.INTERMEDIATE: $(PGM).tmp.html

Modified: grass/trunk/display/d.barscale/main.c
===================================================================
--- grass/trunk/display/d.barscale/main.c	2013-09-18 08:57:08 UTC (rev 57734)
+++ grass/trunk/display/d.barscale/main.c	2013-09-18 13:43:27 UTC (rev 57735)
@@ -71,6 +71,31 @@
 	"classic,line,solid,hollow,full_checker,part_checker,mixed_checker,tail_checker,up_ticks,down_ticks,both_ticks,arrow_ends";
     barstyle->answer = "classic";
     barstyle->guisection = _("Style");
+    G_asprintf((char **) &(barstyle->descriptions), 
+               "classic;%s;"
+               "line;%s;"
+               "solid;%s;"
+               "hollow;%s;"
+               "full_checker;%s;"
+               "part_checker;%s;"
+               "mixed_checker;%s;"
+               "tail_checker;%s;"
+               "up_ticks;%s;"
+               "down_ticks;%s;"
+               "both_ticks;%s;"
+               "arrow_ends;%s",
+               _("Classic style"),
+               _("Line style"),
+               _("Solid style"),
+               _("Hollow style"),
+               _("Full checker style"),
+               _("Part checker style"),
+               _("Mixed checker style"),
+               _("Tail checker style"),
+               _("Up ticks style"),
+               _("Down ticks style"),
+               _("Both ticks style"),
+               _("Arrow ends style"));
 
     coords = G_define_option();
     coords->key = "at";



More information about the grass-commit mailing list