[GRASS-SVN] r57801 - in grass/trunk: display/d.barscale gui/images gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Sep 22 01:54:41 PDT 2013


Author: martinl
Date: 2013-09-22 01:54:41 -0700 (Sun, 22 Sep 2013)
New Revision: 57801

Added:
   grass/trunk/display/d.barscale/thumbnails/
Removed:
   grass/trunk/gui/images/barscales/
Modified:
   grass/trunk/display/d.barscale/Makefile
   grass/trunk/gui/images/Makefile
   grass/trunk/gui/wxpython/gui_core/widgets.py
Log:
barscale thumbnails: gui/images/barscales moved to display/d.barscale/thumbnails

Modified: grass/trunk/display/d.barscale/Makefile
===================================================================
--- grass/trunk/display/d.barscale/Makefile	2013-09-22 08:52:18 UTC (rev 57800)
+++ grass/trunk/display/d.barscale/Makefile	2013-09-22 08:54:41 UTC (rev 57801)
@@ -7,12 +7,22 @@
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 
-default: cmd
+# thumbnail previews
+IMGSRC := $(wildcard thumbnails/*.png)
+IMGDST := $(patsubst thumbnails/%,$(HTMLDIR)/barscales/%,$(IMGSRC))
 
+default: cmd $(IMGDST)
+
+$(HTMLDIR)/barscales/%.png: thumbnails/%.png | $(HTMLDIR)/barscales
+	$(INSTALL_DATA) $< $@
+
+$(HTMLDIR)/barscales: $(HTMLDIR)
+	$(MKDIR) $@
+
 # 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"
+	sed 's!^<dd><b>\([a-z0-9._]*\)</b>:!<dd><img width="80" height="12" src="$(HTMLDIR)/barscales/\1.png"> <b>\1</b>:!' "$@" > "$@.tmp"
 	mv -f "$@.tmp" "$@"
 
 .INTERMEDIATE: $(PGM).tmp.html

Modified: grass/trunk/gui/images/Makefile
===================================================================
--- grass/trunk/gui/images/Makefile	2013-09-22 08:52:18 UTC (rev 57800)
+++ grass/trunk/gui/images/Makefile	2013-09-22 08:54:41 UTC (rev 57801)
@@ -8,16 +8,12 @@
 IMGSRC := $(wildcard *.png)
 IMGDST := $(patsubst %,$(ETCDIR)/%,$(IMGSRC))
 
-# barscales
-BSCSRC := $(wildcard barscales/*.png)
-BSCDST := $(patsubst barscales/%,$(ETCDIR)/barscales/%,$(BSCSRC))
-
 # symbols
 CATEGORIES = basic demo extra geology n_arrows
 SYMSRC := $(foreach dir,$(CATEGORIES),$(wildcard symbols/$(dir)/*.png))
 SYMDST := $(patsubst symbols/%,$(ETCDIR)/symbols/%,$(SYMSRC))
 
-default: $(IMGDST) $(SYMDST) $(BSCDST)
+default: $(IMGDST) $(SYMDST)
 
 define symbols_rule
 $(ETCDIR)/symbols/$(1)/%.png: symbols/$(1)/%.png | $(ETCDIR)/symbols/$(1)
@@ -29,9 +25,6 @@
 
 $(foreach category,$(CATEGORIES),$(eval $(call symbols_rule,$(category))))
 
-$(ETCDIR)/barscales/%.png: barscales/%.png | $(ETCDIR)/barscales
-	$(INSTALL_DATA) $< $@
-
 $(ETCDIR)/%.png: %.png | $(ETCDIR)
 	$(INSTALL_DATA) $< $@
 
@@ -40,6 +33,3 @@
 
 $(ETCDIR)/symbols: $(ETCDIR)
 	$(MKDIR) $@
-
-$(ETCDIR)/barscales: $(ETCDIR)
-	$(MKDIR) $@

Modified: grass/trunk/gui/wxpython/gui_core/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/widgets.py	2013-09-22 08:52:18 UTC (rev 57800)
+++ grass/trunk/gui/wxpython/gui_core/widgets.py	2013-09-22 08:54:41 UTC (rev 57801)
@@ -1253,7 +1253,7 @@
 class BarscalesComboBox(PictureComboBox):
     """!ComboBox with barscales for d.barscale."""
     def _getPath(self, name):
-        return os.path.join(os.getenv("GISBASE"), "etc", "gui", "images", "barscales", name + '.png')
+        return os.path.join(os.getenv("GISBASE"), "docs", "html", "barscales", name + '.png')
 
 
 class NArrowsComboBox(PictureComboBox):



More information about the grass-commit mailing list