aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac7
-rw-r--r--libempathy-gtk/empathy-ui-utils.c10
-rw-r--r--libempathy/empathy-utils.c8
3 files changed, 22 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 46effc72e..1d0c5b13e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -286,6 +286,13 @@ fi
AM_CONDITIONAL(HAVE_VOIP, test "x$enable_voip" = "xyes")
+
+# -----------------------------------------------------------
+# Misc
+# -----------------------------------------------------------
+AC_DEFINE_UNQUOTED([UNINSTALLED_GLADE_DIR], ["`pwd`/libempathy-gtk"], [path to glade files])
+AC_DEFINE_UNQUOTED([UNINSTALLED_DTD_DIR], ["`pwd`/libempathy"], [path to dtd files])
+
# -----------------------------------------------------------
AC_OUTPUT([
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 2989ce2ac..22a5fc2f7 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -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);
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 0e2c4b588..4050f4673 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -208,11 +208,15 @@ empathy_xml_validate (xmlDoc *doc,
xmlDtd *dtd;
gboolean ret;
- path = g_build_filename (DATADIR, "empathy", dtd_filename, NULL);
+ path = g_build_filename (UNINSTALLED_DTD_DIR, dtd_filename, NULL);
+ if (!g_file_test (path, G_FILE_TEST_EXISTS)) {
+ g_free (path);
+ path = g_build_filename (DATADIR, "empathy", dtd_filename, NULL);
+ }
+ empathy_debug (DEBUG_DOMAIN, "Loading dtd file %s", path);
/* The list of valid chars is taken from libxml. */
escaped = xmlURIEscapeStr (path, ":@&=+$,/?;");
-
g_free (path);
memset (&cvp, 0, sizeof (cvp));