empathy r596 - in trunk: . libempathy libempathy-gtk
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r596 - in trunk: . libempathy libempathy-gtk
- Date: Wed, 23 Jan 2008 00:02:03 +0000 (GMT)
Author: xclaesse
Date: Wed Jan 23 00:02:03 2008
New Revision: 596
URL: http://svn.gnome.org/viewvc/empathy?rev=596&view=rev
Log:
Try to load dtd and glade files from the srcdir first to aboid having to install them each time we change them.
Modified:
trunk/configure.ac
trunk/libempathy-gtk/empathy-ui-utils.c
trunk/libempathy/empathy-utils.c
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Wed Jan 23 00:02:03 2008
@@ -286,6 +286,13 @@
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([
Modified: trunk/libempathy-gtk/empathy-ui-utils.c
==============================================================================
--- trunk/libempathy-gtk/empathy-ui-utils.c (original)
+++ trunk/libempathy-gtk/empathy-ui-utils.c Wed Jan 23 00:02:03 2008
@@ -28,6 +28,8 @@
* Jeroen Zwartepoorte
*/
+#include <config.h>
+
#include <string.h>
#include <X11/Xatom.h>
#include <gdk/gdkx.h>
@@ -63,7 +65,13 @@
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);
Modified: trunk/libempathy/empathy-utils.c
==============================================================================
--- trunk/libempathy/empathy-utils.c (original)
+++ trunk/libempathy/empathy-utils.c Wed Jan 23 00:02:03 2008
@@ -208,11 +208,15 @@
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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]