]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-ui-utils.c
Try to load dtd and glade files from the srcdir first to aboid having to install...
[empathy.git] / libempathy-gtk / empathy-ui-utils.c
index 2989ce2ac497f81b8beae1d7c6f84b7df129af07..22a5fc2f739ac04eaef2abd8db6cf6f66bb66e2b 100644 (file)
@@ -28,6 +28,8 @@
  *          Jeroen Zwartepoorte
  */
 
+#include <config.h>
+
 #include <string.h>
 #include <X11/Xatom.h>
 #include <gdk/gdkx.h>
@@ -63,7 +65,13 @@ get_glade_file (const gchar *filename,
        const char *name;
        GtkWidget **widget_ptr;
 
-       path = g_build_filename (DATADIR, "empathy", filename, NULL);
+       path = g_build_filename (UNINSTALLED_GLADE_DIR, filename, NULL);
+       if (!g_file_test (path, G_FILE_TEST_EXISTS)) {
+               g_free (path);
+               path = g_build_filename (DATADIR, "empathy", filename, NULL);
+       }
+       empathy_debug (DEBUG_DOMAIN, "Loading glade file %s", path);
+
        gui = glade_xml_new (path, root, domain);
        g_free (path);