[epiphany] ephy-embed-shell: make the shell find uninstalled icons



commit 4c45d09f5bc585147ef8013ac6570b12bbb372e0
Author: Xan Lopez <xan igalia com>
Date:   Sun Sep 2 22:53:00 2012 +0200

    ephy-embed-shell: make the shell find uninstalled icons
    
    This is needed for distcheck, which runs tests before installing.

 embed/Makefile.am        |    1 -
 embed/ephy-embed-shell.c |    5 ++---
 lib/ephy-file-helpers.c  |    2 ++
 3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/embed/Makefile.am b/embed/Makefile.am
index b31e166..610a710 100644
--- a/embed/Makefile.am
+++ b/embed/Makefile.am
@@ -76,7 +76,6 @@ endif
 
 libephyembed_la_CFLAGS = \
 	-DSHARE_DIR=\"$(pkgdatadir)\"	\
-	-DICONS_DIR=\"$(pkgdatadir)/icons\" \
 	$(DEPENDENCIES_CFLAGS) 	\
 	$(AM_CFLAGS)
 
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 6929622..2df87b6 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -183,11 +183,10 @@ ephy_embed_shell_get_overview_icon (const char *icon_name)
 {
   GError *error = NULL;
   GdkPixbuf *pixbuf;
-  char *filename;
+  const char *filename;
 
-  filename = g_build_filename (ICONS_DIR, icon_name, NULL);
+  filename = ephy_file (icon_name);
   pixbuf = gdk_pixbuf_new_from_file (filename, &error);
-  g_free (filename);
 
   if (!pixbuf) {
     g_warning ("Couldn't load icon: %s", error->message);
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 189396c..9e9105d 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -231,9 +231,11 @@ ephy_file (const char *filename)
 	{
 #ifdef GNOME_ENABLE_DEBUG
 		TOP_SRC_DATADIR "/",
+		TOP_SRC_DATADIR "/icons/",
 		TOP_SRC_DATADIR "/pages/",
 #endif
 		SHARE_DIR "/",
+		SHARE_DIR "/icons/",
 		SHARE_DIR "/pages/"
 	};
 



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