[GRASS-SVN] r57807 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Sep 22 04:03:32 PDT 2013
Author: martinl
Date: 2013-09-22 04:03:32 -0700 (Sun, 22 Sep 2013)
New Revision: 57807
Modified:
grass/trunk/lib/gis/parser_html.c
Log:
libgis: G_usage_html(): add support for barscale thumbnails
Modified: grass/trunk/lib/gis/parser_html.c
===================================================================
--- grass/trunk/lib/gis/parser_html.c 2013-09-22 10:47:53 UTC (rev 57806)
+++ grass/trunk/lib/gis/parser_html.c 2013-09-22 11:03:32 UTC (rev 57807)
@@ -239,11 +239,20 @@
while (opt->opts[i]) {
if (opt->descs[i]) {
fprintf(stdout, "<dd><b>");
- if (opt->gisprompt && strcmp(opt->gisprompt,
- "old,colortable,colortable") == 0) {
- fprintf(stdout, "<img width=\"80\" height=\"12\" "
- "src=\"colortables/%s.png\" alt=\"%s\">",
- opt->opts[i], opt->opts[i]);
+ if (opt->gisprompt) {
+ char *thumbnails = NULL;
+
+ if (strcmp(opt->gisprompt,
+ "old,colortable,colortable") == 0)
+ thumbnails = "colortables";
+ else if (strcmp(opt->gisprompt,
+ "old,barscale,barscale") == 0)
+ thumbnails = "barscales";
+
+ if (thumbnails)
+ fprintf(stdout, "<img width=\"80\" height=\"12\" "
+ "src=\"%s/%s.png\" alt=\"%s\">",
+ thumbnails, opt->opts[i], opt->opts[i]);
}
print_escaped_for_html(stdout, opt->opts[i]);
fprintf(stdout, "</b>: ");
More information about the grass-commit
mailing list