[ghex] Move icons to a flat directory structure
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex] Move icons to a flat directory structure
- Date: Wed, 16 Jan 2013 01:23:58 +0000 (UTC)
commit 53337cff4276cc070e8c3dad4f7d29a5ace8ecf2
Author: Kalev Lember <kalevlember gmail com>
Date: Tue Jan 15 22:33:19 2013 +0100
Move icons to a flat directory structure
... to make it easier to add HC icons.
configure.ac | 5 --
icons/16x16/Makefile.am | 12 ----
icons/22x22/Makefile.am | 12 ----
icons/24x24/Makefile.am | 12 ----
icons/32x32/Makefile.am | 12 ----
icons/48x48/Makefile.am | 18 -----
icons/Makefile.am | 66 +++++++++++++++++++-
.../ghex.png => hicolor_apps_16x16_ghex.png} | Bin 690 -> 690 bytes
.../ghex.svg => hicolor_apps_16x16_ghex.svg} | 0
.../ghex.png => hicolor_apps_22x22_ghex.png} | Bin 1252 -> 1252 bytes
.../ghex.svg => hicolor_apps_22x22_ghex.svg} | 0
.../ghex.png => hicolor_apps_24x24_ghex.png} | Bin 1266 -> 1266 bytes
.../ghex.png => hicolor_apps_32x32_ghex.png} | Bin 2057 -> 2057 bytes
.../ghex.svg => hicolor_apps_32x32_ghex.svg} | 0
.../ghex.png => hicolor_apps_48x48_ghex.png} | Bin 2974 -> 2974 bytes
.../ghex.svg => hicolor_apps_scalable_ghex.svg} | 0
16 files changed, 65 insertions(+), 72 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f29e6f4..6327035 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,10 +83,5 @@ po/Makefile.in
src/Makefile
help/Makefile
icons/Makefile
-icons/16x16/Makefile
-icons/22x22/Makefile
-icons/24x24/Makefile
-icons/32x32/Makefile
-icons/48x48/Makefile
data/gtkhex-3.pc])
AC_OUTPUT
diff --git a/icons/Makefile.am b/icons/Makefile.am
index 2e06247..9e5e427 100644
--- a/icons/Makefile.am
+++ b/icons/Makefile.am
@@ -1,3 +1,67 @@
-SUBDIRS = 16x16 22x22 24x24 32x32 48x48
+NULL =
+
+public_icons_themes = \
+ hicolor \
+ $(NULL)
+
+public_icons = \
+ hicolor_apps_16x16_ghex.png \
+ hicolor_apps_22x22_ghex.png \
+ hicolor_apps_24x24_ghex.png \
+ hicolor_apps_32x32_ghex.png \
+ hicolor_apps_48x48_ghex.png \
+ hicolor_apps_scalable_ghex.svg \
+ $(NULL)
+
+noinst_DATA = \
+ hicolor_apps_16x16_ghex.svg \
+ hicolor_apps_22x22_ghex.svg \
+ hicolor_apps_32x32_ghex.svg \
+ $(NULL)
+
+EXTRA_DIST = \
+ $(public_icons) \
+ $(noinst_DATA) \
+ $(NULL)
+
+###############################################################################
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t
+
+update-icon-cache:
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ for theme in $(public_icons_themes); do \
+ $(gtk_update_icon_cache) $(datadir)/icons/$$theme; \
+ done; \
+ else \
+ echo "*** Icon cache not updated. After (un)install, run this:"; \
+ for theme in $(public_icons_themes); do \
+ echo "*** $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \
+ done; \
+ 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)/icons/$$THEME/$$SIZE/$$CONTEXT; \
+ $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/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
-include $(top_srcdir)/git.mk
diff --git a/icons/16x16/ghex.png b/icons/hicolor_apps_16x16_ghex.png
similarity index 100%
rename from icons/16x16/ghex.png
rename to icons/hicolor_apps_16x16_ghex.png
diff --git a/icons/16x16/ghex.svg b/icons/hicolor_apps_16x16_ghex.svg
similarity index 100%
rename from icons/16x16/ghex.svg
rename to icons/hicolor_apps_16x16_ghex.svg
diff --git a/icons/22x22/ghex.png b/icons/hicolor_apps_22x22_ghex.png
similarity index 100%
rename from icons/22x22/ghex.png
rename to icons/hicolor_apps_22x22_ghex.png
diff --git a/icons/22x22/ghex.svg b/icons/hicolor_apps_22x22_ghex.svg
similarity index 100%
rename from icons/22x22/ghex.svg
rename to icons/hicolor_apps_22x22_ghex.svg
diff --git a/icons/24x24/ghex.png b/icons/hicolor_apps_24x24_ghex.png
similarity index 100%
rename from icons/24x24/ghex.png
rename to icons/hicolor_apps_24x24_ghex.png
diff --git a/icons/32x32/ghex.png b/icons/hicolor_apps_32x32_ghex.png
similarity index 100%
rename from icons/32x32/ghex.png
rename to icons/hicolor_apps_32x32_ghex.png
diff --git a/icons/32x32/ghex.svg b/icons/hicolor_apps_32x32_ghex.svg
similarity index 100%
rename from icons/32x32/ghex.svg
rename to icons/hicolor_apps_32x32_ghex.svg
diff --git a/icons/48x48/ghex.png b/icons/hicolor_apps_48x48_ghex.png
similarity index 100%
rename from icons/48x48/ghex.png
rename to icons/hicolor_apps_48x48_ghex.png
diff --git a/icons/48x48/ghex.svg b/icons/hicolor_apps_scalable_ghex.svg
similarity index 100%
rename from icons/48x48/ghex.svg
rename to icons/hicolor_apps_scalable_ghex.svg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]