[gnome-themes-standard/gnome-3-4] Add hooks for updating gtk icon cache



commit 707830a2215b2d12bc437cd79daed916c0b4cc50
Author: Kalev Lember <kalevlember gmail com>
Date:   Mon May 14 19:01:04 2012 +0300

    Add hooks for updating gtk icon cache
    
    ... and update the existing one in HighContrast to skip cache rebuilding
    when DESTDIR is set.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=675910

 themes/HighContrast/icons/Makefile.am        |   16 ++++++++++++----
 themes/HighContrastInverse/icons/Makefile.am |   14 ++++++++++++++
 themes/LowContrast/icons/Makefile.am         |   14 ++++++++++++++
 3 files changed, 40 insertions(+), 4 deletions(-)
---
diff --git a/themes/HighContrast/icons/Makefile.am b/themes/HighContrast/icons/Makefile.am
index 2de2d0a..76e824d 100644
--- a/themes/HighContrast/icons/Makefile.am
+++ b/themes/HighContrast/icons/Makefile.am
@@ -90,11 +90,19 @@ uninstall-local:
 		done; \
 	done
 
-install-data-hook:
-	$(GTK_UPDATE_ICON_CACHE) -q $(DESTDIR)$(themedir)
+gtk_update_icon_cache = $(GTK_UPDATE_ICON_CACHE) -f -t $(themedir)
 
-uninstall-hook:
-	$(GTK_UPDATE_ICON_CACHE) -q -t $(DESTDIR)$(themedir)
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+
+update-icon-cache:
+	@-if test -z "$(DESTDIR)"; then \
+		echo "Updating Gtk icon cache."; \
+		$(gtk_update_icon_cache); \
+	else \
+		echo "*** Icon cache not updated.  After (un)install, run this:"; \
+		echo "***   $(gtk_update_icon_cache)"; \
+	fi
 
 EXTRA_DIST = \
 	index.theme.in \
diff --git a/themes/HighContrastInverse/icons/Makefile.am b/themes/HighContrastInverse/icons/Makefile.am
index c2d2cd3..c206bfe 100644
--- a/themes/HighContrastInverse/icons/Makefile.am
+++ b/themes/HighContrastInverse/icons/Makefile.am
@@ -4,5 +4,19 @@ theme_DATA = index.theme
 
 SUBDIRS = 48x48
 
+gtk_update_icon_cache = $(GTK_UPDATE_ICON_CACHE) -f -t $(themedir)
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+
+update-icon-cache:
+	@-if test -z "$(DESTDIR)"; then \
+		echo "Updating Gtk icon cache."; \
+		$(gtk_update_icon_cache); \
+	else \
+		echo "*** Icon cache not updated.  After (un)install, run this:"; \
+		echo "***   $(gtk_update_icon_cache)"; \
+	fi
+
 EXTRA_DIST = index.theme
 
diff --git a/themes/LowContrast/icons/Makefile.am b/themes/LowContrast/icons/Makefile.am
index b4742bc..25f9b89 100644
--- a/themes/LowContrast/icons/Makefile.am
+++ b/themes/LowContrast/icons/Makefile.am
@@ -4,5 +4,19 @@ theme_DATA = index.theme
 
 SUBDIRS = 48x48
 
+gtk_update_icon_cache = $(GTK_UPDATE_ICON_CACHE) -f -t $(themedir)
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+
+update-icon-cache:
+	@-if test -z "$(DESTDIR)"; then \
+		echo "Updating Gtk icon cache."; \
+		$(gtk_update_icon_cache); \
+	else \
+		echo "*** Icon cache not updated.  After (un)install, run this:"; \
+		echo "***   $(gtk_update_icon_cache)"; \
+	fi
+
 EXTRA_DIST = index.theme
 



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