Commit 6ea5ee4b authored by Cosimo Cecchi's avatar Cosimo Cecchi Committed by Cosimo Cecchi

Bring icon handling to the 21th century. Add an emblem-note icon, this is

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.

svn path=/trunk/; revision=14891
parent 7063d9c2
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.
2009-01-27 Cosimo Cecchi <cosimoc@gnome.org>
* nautilus.desktop.in.in: set X-GNOME-AutoRestart=true, to make
......
......@@ -480,16 +480,6 @@ cut-n-paste-code/Makefile
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
......
NULL =
themedir = $(datadir)/icons/hicolor
size = 16x16
context = apps
iconsdir = $(themedir)/$(size)/$(context)
icons_DATA = \
nautilus.png \
$(NULL)
icons_SOURCE = \
nautilus.svg \
$(NULL)
EXTRA_DIST = \
$(icons_DATA) \
$(icons_SOURCE)
NULL =
themedir = $(datadir)/icons/hicolor
size = 22x22
context = apps
iconsdir = $(themedir)/$(size)/$(context)
icons_DATA = \
nautilus.png \
$(NULL)
icons_SOURCE = \
nautilus.svg \
$(NULL)
EXTRA_DIST = \
$(icons_DATA) \
$(icons_SOURCE)
NULL =
themedir = $(datadir)/icons/hicolor
size = 24x24
context = apps
iconsdir = $(themedir)/$(size)/$(context)
icons_DATA = \
nautilus.png \
$(NULL)
EXTRA_DIST = \
$(icons_DATA)
NULL =
themedir = $(datadir)/icons/hicolor
size = 32x32
context = apps
iconsdir = $(themedir)/$(size)/$(context)
icons_DATA = \
nautilus.png \
$(NULL)
icons_SOURCE = \
nautilus.svg \
$(NULL)
EXTRA_DIST = \
$(icons_DATA) \
$(icons_SOURCE)
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
NULL =
themedir = $(datadir)/icons/hicolor
size = scalable
context = apps
iconsdir = $(themedir)/$(size)/$(context)
icons_DATA = \
nautilus.svg \
$(NULL)
EXTRA_DIST = \
$(icons_DATA)
......@@ -310,6 +310,10 @@ nautilus_application_init (NautilusApplication *application)
/* 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 *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment