aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-03-16 23:17:27 +0800
committerMilan Crha <mcrha@redhat.com>2012-03-16 23:17:27 +0800
commitea6e3bd0d5b1f4aadb71719d96ec9c88c8520ac9 (patch)
tree89134d1f924a3a523d7e52a8efb4e360fd96edec
parent60f3e852e7246e3107b80cfa72a76e0c50753ede (diff)
downloadgsoc2013-evolution-ea6e3bd0d5b1f4aadb71719d96ec9c88c8520ac9.tar.gz
gsoc2013-evolution-ea6e3bd0d5b1f4aadb71719d96ec9c88c8520ac9.tar.zst
gsoc2013-evolution-ea6e3bd0d5b1f4aadb71719d96ec9c88c8520ac9.zip
Bug #659756 - Initialize dbus-glib threading for GConf
-rw-r--r--calendar/alarm-notify/Makefile.am2
-rw-r--r--calendar/alarm-notify/notify-main.c5
-rw-r--r--configure.ac9
-rw-r--r--shell/Makefile.am2
-rw-r--r--shell/main.c5
5 files changed, 23 insertions, 0 deletions
diff --git a/calendar/alarm-notify/Makefile.am b/calendar/alarm-notify/Makefile.am
index 5647c39254..6de36d0c67 100644
--- a/calendar/alarm-notify/Makefile.am
+++ b/calendar/alarm-notify/Makefile.am
@@ -21,6 +21,7 @@ evolution_alarm_notify_CPPFLAGS = \
$(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
$(LIBNOTIFY_CFLAGS) \
+ $(DBUS_GLIB_CFLAGS) \
$(CANBERRA_CFLAGS)
ui_DATA = \
@@ -49,6 +50,7 @@ evolution_alarm_notify_LDADD = \
$(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS) \
$(LIBNOTIFY_LIBS) \
+ $(DBUS_GLIB_LIBS) \
$(CANBERRA_LIBS) \
$(EVOLUTIONALARMNOTIFYICON)
diff --git a/calendar/alarm-notify/notify-main.c b/calendar/alarm-notify/notify-main.c
index a6d9d53fc5..c0d8d725ab 100644
--- a/calendar/alarm-notify/notify-main.c
+++ b/calendar/alarm-notify/notify-main.c
@@ -30,6 +30,8 @@
#include <stdlib.h>
#include <glib/gi18n.h>
+#include <dbus/dbus-glib.h>
+
#include <libedataserver/e-gdbus-templates.h>
#include "alarm-notify.h"
@@ -84,6 +86,9 @@ main (gint argc,
gtk_init (&argc, &argv);
+ /* this is to initialize threading for dbus-glib used by GConf */
+ dbus_g_thread_init ();
+
e_gdbus_templates_init_main_thread ();
#ifdef G_OS_WIN32
diff --git a/configure.ac b/configure.ac
index 1dc8125aeb..feede83427 100644
--- a/configure.ac
+++ b/configure.ac
@@ -266,6 +266,15 @@ AC_SUBST(EVOLUTION_DATA_SERVER_CFLAGS)
AC_SUBST(EVOLUTION_DATA_SERVER_LIBS)
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 Canberra / Canberra-GTK Sound
dnl ******************************
AC_ARG_ENABLE([canberra],
diff --git a/shell/Makefile.am b/shell/Makefile.am
index ca722fc00b..3ebf5dcfb1 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -62,6 +62,7 @@ libeshell_la_CPPFLAGS = \
$(GNOME_PLATFORM_CFLAGS) \
$(EGG_SMCLIENT_CFLAGS) \
$(GTKHTML_CFLAGS) \
+ $(DBUS_GLIB_CFLAGS) \
$(CLUTTER_CFLAGS)
libeshell_la_SOURCES = \
@@ -100,6 +101,7 @@ libeshell_la_LIBADD = \
$(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS) \
$(EGG_SMCLIENT_LIBS) \
+ $(DBUS_GLIB_LIBS) \
$(CLUTTER_LIBS)
# Evolution executable
diff --git a/shell/main.c b/shell/main.c
index 8ba2a9836f..4aa6425b86 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -30,6 +30,8 @@
#include <glib-unix.h>
#endif
+#include <dbus/dbus-glib.h>
+
#if HAVE_CLUTTER
#include <clutter-gtk/clutter-gtk.h>
#include <mx/mx.h>
@@ -497,6 +499,9 @@ main (gint argc,
g_type_init ();
+ /* this is to initialize threading for dbus-glib used by GConf */
+ dbus_g_thread_init ();
+
/* do not require Gtk+ for --force-shutdown */
if (argc == 2 && argv[1] && g_str_equal (argv[1], "--force-shutdown")) {
shell_force_shutdown ();