Bug #659756 - Initialize dbus-glib threading for GConf
authorMilan Crha <mcrha@redhat.com>
Fri, 16 Mar 2012 15:12:34 +0000 (16:12 +0100)
committerMilan Crha <mcrha@redhat.com>
Fri, 16 Mar 2012 15:12:34 +0000 (16:12 +0100)
configure.ac
services/evolution-addressbook-factory/Makefile.am
services/evolution-addressbook-factory/evolution-addressbook-factory.c
services/evolution-calendar-factory/Makefile.am
services/evolution-calendar-factory/evolution-calendar-factory.c

index dd99bcb..94e1c1f 100644 (file)
@@ -348,6 +348,15 @@ if test x$os_win32 = xno; then
        PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
 fi
 
+dnl ******************************
+dnl DBus-glib stuff, to initialize thread for GConf, which is using it
+dnl this is returned back only temporarily and wil lbe removed as soon
+dnl as eds will stop using GConf completely
+dnl ******************************
+PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.6)
+AC_SUBST(DBUS_GLIB_CFLAGS)
+AC_SUBST(DBUS_GLIB_LIBS)
+
 dnl *******************************
 dnl Check for GNOME Online Accounts
 dnl *******************************
index ff2416f..99d2d61 100644 (file)
@@ -20,6 +20,7 @@ evolution_addressbook_factory_CPPFLAGS = \
        -I$(top_builddir)/addressbook \
        $(EVOLUTION_ADDRESSBOOK_CFLAGS) \
        $(FACTORY_GTK_CFLAGS) \
+       $(DBUS_GLIB_CFLAGS) \
        $(GOA_CFLAGS) \
        $(NULL)
 
@@ -34,6 +35,7 @@ evolution_addressbook_factory_LDADD = \
        $(top_builddir)/libedataserver/libedataserver-1.2.la \
        $(EVOLUTION_ADDRESSBOOK_LIBS) \
        $(FACTORY_GTK_LIBS) \
+       $(DBUS_GLIB_LIBS) \
        $(GOA_LIBS) \
        $(NULL)
 
index 20b9dd4..aa1080d 100644 (file)
@@ -21,6 +21,8 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 
+#include <dbus/dbus-glib.h>
+
 #ifdef ENABLE_MAINTAINER_MODE
 #include <gtk/gtk.h>
 #endif
@@ -104,6 +106,9 @@ main (gint argc,
        g_type_init ();
 #endif
 
+       /* this is to initialize threading for dbus-glib used by GConf */
+       dbus_g_thread_init ();
+
        context = g_option_context_new (NULL);
        g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
        g_option_context_parse (context, &argc, &argv, &error);
index 39bd5e4..cff7f70 100644 (file)
@@ -20,6 +20,7 @@ evolution_calendar_factory_CPPFLAGS = \
        -I$(top_builddir)/calendar \
        $(EVOLUTION_CALENDAR_CFLAGS) \
        $(FACTORY_GTK_CFLAGS) \
+       $(DBUS_GLIB_CFLAGS) \
        $(NULL)
 
 evolution_calendar_factory_SOURCES = \
@@ -33,6 +34,7 @@ evolution_calendar_factory_LDADD = \
        $(top_builddir)/libedataserver/libedataserver-1.2.la \
        $(EVOLUTION_CALENDAR_LIBS) \
        $(FACTORY_GTK_LIBS) \
+       $(DBUS_GLIB_LIBS) \
        $(NULL)
 
 -include $(top_srcdir)/git.mk
index eca2915..a044e62 100644 (file)
@@ -21,6 +21,8 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 
+#include <dbus/dbus-glib.h>
+
 #ifdef ENABLE_MAINTAINER_MODE
 #include <gtk/gtk.h>
 #endif
@@ -108,6 +110,9 @@ main (gint argc,
        g_type_init ();
 #endif
 
+       /* this is to initialize threading for dbus-glib used by GConf */
+       dbus_g_thread_init ();
+
        context = g_option_context_new (NULL);
        g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
        g_option_context_parse (context, &argc, &argv, &error);