[empathy] empathy_gtk_init: add local copy of icons to the search path (#616159)



commit 66055e1a24adf38251805022bcf3509ccc5a757a
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Mon Apr 19 12:59:55 2010 +0200

    empathy_gtk_init: add local copy of icons to the search path (#616159)

 libempathy-gtk/empathy-ui-utils.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index f3761e5..d462403 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -64,6 +64,19 @@ empathy_gtk_init (void)
 	gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
 					   PKGDATADIR G_DIR_SEPARATOR_S "icons");
 
+	/* Add icons from source dir if available */
+	if (g_getenv ("EMPATHY_SRCDIR") != NULL) {
+		gchar *path;
+
+		path = g_build_filename (g_getenv ("EMPATHY_SRCDIR"), "data",
+				"icons", "local-copy", NULL);
+		if (g_file_test (path, G_FILE_TEST_EXISTS)) {
+			gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), path);
+		}
+
+		g_free (path);
+	}
+
 	initialized = TRUE;
 }
 



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