nautilus r14891 - in trunk: . data/icons data/icons/16x16 data/icons/22x22 data/icons/24x24 data/icons/32x32 data/icons/scalable src



Author: cosimoc
Date: Wed Jan 28 11:49:20 2009
New Revision: 14891
URL: http://svn.gnome.org/viewvc/nautilus?rev=14891&view=rev

Log:
2009-01-28  Cosimo Cecchi  <cosimoc gnome org>

	* data/icons/*:
	Bring icon handling to the 21th century.
	Add an emblem-note icon, this is copied from g-i-t "stock_note"
	icon right now, but we might change this later.
	* src/nautilus-application.c: (nautilus_application_init):
	add a lookup path for custom themable icons.

	This also fixes bug #569407. Thanks to Lapo Calamandrei for
	the tips on icon naming.


Added:
   trunk/data/icons/hicolor_apps_16x16_nautilus.png   (props changed)
      - copied unchanged from r14888, /trunk/data/icons/16x16/apps/nautilus.png
   trunk/data/icons/hicolor_apps_16x16_nautilus.svg   (props changed)
      - copied unchanged from r14888, /trunk/data/icons/16x16/apps/nautilus.svg
   trunk/data/icons/hicolor_apps_22x22_nautilus.png   (props changed)
      - copied unchanged from r14888, /trunk/data/icons/22x22/apps/nautilus.png
   trunk/data/icons/hicolor_apps_22x22_nautilus.svg   (props changed)
      - copied unchanged from r14888, /trunk/data/icons/22x22/apps/nautilus.svg
   trunk/data/icons/hicolor_apps_24x24_nautilus.png   (props changed)
      - copied unchanged from r14888, /trunk/data/icons/24x24/apps/nautilus.png
   trunk/data/icons/hicolor_apps_32x32_nautilus.png   (props changed)
      - copied unchanged from r14888, /trunk/data/icons/32x32/apps/nautilus.png
   trunk/data/icons/hicolor_apps_32x32_nautilus.svg   (props changed)
      - copied unchanged from r14888, /trunk/data/icons/32x32/apps/nautilus.svg
   trunk/data/icons/hicolor_apps_scalable_nautilus.svg   (props changed)
      - copied unchanged from r14888, /trunk/data/icons/scalable/apps/nautilus.svg
   trunk/data/icons/hicolor_emblems_16x16_emblem-note.png   (contents, props changed)
   trunk/data/icons/hicolor_emblems_24x24_emblem-note.png   (contents, props changed)
   trunk/data/icons/hicolor_emblems_48x48_emblem-note.png   (contents, props changed)
Removed:
   trunk/data/icons/16x16/
   trunk/data/icons/22x22/
   trunk/data/icons/24x24/
   trunk/data/icons/32x32/
   trunk/data/icons/scalable/
Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/data/icons/Makefile.am
   trunk/src/nautilus-application.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Wed Jan 28 11:49:20 2009
@@ -480,16 +480,6 @@
 cut-n-paste-code/libegg/Makefile
 data/Makefile
 data/icons/Makefile
-data/icons/16x16/Makefile
-data/icons/16x16/apps/Makefile
-data/icons/22x22/Makefile
-data/icons/22x22/apps/Makefile
-data/icons/24x24/Makefile
-data/icons/24x24/apps/Makefile
-data/icons/32x32/Makefile
-data/icons/32x32/apps/Makefile
-data/icons/scalable/Makefile
-data/icons/scalable/apps/Makefile
 data/patterns/Makefile
 docs/Makefile
 docs/reference/Makefile

Modified: trunk/data/icons/Makefile.am
==============================================================================
--- trunk/data/icons/Makefile.am	(original)
+++ trunk/data/icons/Makefile.am	Wed Jan 28 11:49:20 2009
@@ -1,14 +1,86 @@
-SUBDIRS = 16x16 22x22 24x24 32x32 scalable
+NULL =
 
-gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+public_icons_themes = \
+	hicolor	\
+	$(NULL)
+
+public_icons = \
+	hicolor_apps_16x16_nautilus.png \
+	hicolor_apps_22x22_nautilus.png \
+	hicolor_apps_24x24_nautilus.png \
+	hicolor_apps_32x32_nautilus.png \
+	hicolor_apps_scalable_nautilus.svg \
+	$(NULL)
+
+private_icons = \
+	hicolor_emblems_16x16_emblem-note.png \
+	hicolor_emblems_24x24_emblem-note.png \
+	hicolor_emblems_48x48_emblem-note.png \
+	$(NULL)
+
+noinst_DATA = \
+	hicolor_apps_16x16_nautilus.svg \
+	hicolor_apps_22x22_nautilus.svg \
+	hicolor_apps_32x32_nautilus.svg \
+	$(NULL)
+
+EXTRA_DIST = \
+	$(public_icons)		\
+	$(private_icons)	\
+	$(noinst_DATA)		\
+	$(NULL)
+
+###############################################################################
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t
 
-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); \
+		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:"; \
-		echo "***   $(gtk_update_icon_cache)"; \
+		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; \
+	for icon in $(private_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)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
+		$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(pkgdatadir)/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; \
+	for icon in $(private_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)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+	done
+
+install-data-local: install-icons update-icon-cache
+
+uninstall-local: uninstall-icons update-icon-cache

Added: trunk/data/icons/hicolor_emblems_16x16_emblem-note.png
==============================================================================
Binary files (empty file) and trunk/data/icons/hicolor_emblems_16x16_emblem-note.png	Wed Jan 28 11:49:20 2009 differ

Added: trunk/data/icons/hicolor_emblems_24x24_emblem-note.png
==============================================================================
Binary files (empty file) and trunk/data/icons/hicolor_emblems_24x24_emblem-note.png	Wed Jan 28 11:49:20 2009 differ

Added: trunk/data/icons/hicolor_emblems_48x48_emblem-note.png
==============================================================================
Binary files (empty file) and trunk/data/icons/hicolor_emblems_48x48_emblem-note.png	Wed Jan 28 11:49:20 2009 differ

Modified: trunk/src/nautilus-application.c
==============================================================================
--- trunk/src/nautilus-application.c	(original)
+++ trunk/src/nautilus-application.c	Wed Jan 28 11:49:20 2009
@@ -310,6 +310,10 @@
 
 	/* register property pages */
 	nautilus_image_properties_page_register ();
+
+	/* initialize search path for custom icons */
+	gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+					   NAUTILUS_DATADIR G_DIR_SEPARATOR_S "icons");
 }
 
 NautilusApplication *



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