]> git.0d.be Git - empathy.git/commitdiff
empathy_gtk_init: add local copy of icons to the search path (#616159)
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 19 Apr 2010 10:59:55 +0000 (12:59 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 8 Mar 2012 12:09:09 +0000 (13:09 +0100)
libempathy-gtk/empathy-ui-utils.c

index f3761e5cdf989db13cc4ace95b5760779c5151a5..d462403ff7c7d6143813707a436a762ffaa296a2 100644 (file)
@@ -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;
 }