[anjal] Make the icon themable.



commit 80638dbfceb2f008288c477339ec56763dbb97a5
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Wed Jul 15 00:34:32 2009 +0530

    Make the icon themable.

 art/Makefile.am                                    |   41 +++++++++++++++++++-
 ...w.png => hicolor_apps_16x16_anjal-mail-new.png} |  Bin 841 -> 841 bytes
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/art/Makefile.am b/art/Makefile.am
index 744ee7b..84c5430 100644
--- a/art/Makefile.am
+++ b/art/Makefile.am
@@ -1,8 +1,47 @@
 images_DATA = \
-	anjal-mail-new.png		\
 	arrow-left.png			\
 	arrow-right.png			\
 	unread.png
 
+public_icons = \
+	hicolor_apps_16x16_anjal-mail-new.png \
+	$(NULL)
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t
+
+update-icon-cache:
+	@-if test -z "$(DESTDIR)"; then \
+		echo "Updating Gtk icon cache."; \
+		$(gtk_update_icon_cache) $(datadir)/icons/hicolor; \
+	else \
+		echo "*** Icon cache not updated.  After (un)install, run this:"; \
+		echo "***   $(gtk_update_icon_cache) $(datadir)/icons/hicolor"; \
+	fi
+
+install-icons:
+	for icon in $(public_icons); do \
+		THEME=`echo $$icon | cut -d_ -f1`; \
+		CONTEXT=`echo $$icon | cut -d_ -f2`; \
+		SIZE=`echo $$icon | cut -d_ -f3`; \
+		ICONFILE=`echo $$icon | cut -d_ -f4`; \
+		mkdir -p $(DESTDIR)$(datadir)/anjal/icons/$$THEME/$$SIZE/$$CONTEXT; \
+		$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/anjal/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+	done; 
+
+uninstall-icons:
+	-for icon in $(public_icons); do \
+		THEME=`echo $$icon | cut -d_ -f1`; \
+		CONTEXT=`echo $$icon | cut -d_ -f2`; \
+		SIZE=`echo $$icon | cut -d_ -f3`; \
+		ICONFILE=`echo $$icon | cut -d_ -f4`; \
+		rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+	done;
+
+install-data-local: install-icons update-icon-cache
+
+uninstall-local: uninstall-icons update-icon-cache
+
+
 EXTRA_DIST = 				\
+	$(public_icons)		\					
 	$(images_DATA)
diff --git a/art/anjal-mail-new.png b/art/hicolor_apps_16x16_anjal-mail-new.png
similarity index 100%
rename from art/anjal-mail-new.png
rename to art/hicolor_apps_16x16_anjal-mail-new.png



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]