Initialize EGdbusTemplates main thread in book/calendar factories
authorMilan Crha <mcrha@redhat.com>
Thu, 23 Feb 2012 12:41:48 +0000 (13:41 +0100)
committerMilan Crha <mcrha@redhat.com>
Thu, 23 Feb 2012 12:41:48 +0000 (13:41 +0100)
This is needed for 'contacts' calendar backend, to not call main
context iteration when it is run in a dedicated thread, but call
it in both factories, just in case.

services/evolution-addressbook-factory/evolution-addressbook-factory.c
services/evolution-calendar-factory/evolution-calendar-factory.c

index 477a31e..20b9dd4 100644 (file)
@@ -37,6 +37,7 @@
 #endif
 
 #include <libedata-book/e-data-book-factory.h>
+#include <libedataserver/e-gdbus-templates.h>
 
 static gboolean opt_keep_running = FALSE;
 static gboolean opt_wait_for_client = FALSE;
@@ -116,6 +117,8 @@ main (gint argc,
        /* Migrate user data from ~/.evolution to XDG base directories. */
        evolution_addressbook_factory_migrate_basedir ();
 
+       e_gdbus_templates_init_main_thread ();
+
        server = e_data_book_factory_new (NULL, &error);
 
        if (error != NULL) {
index 86648bc..eca2915 100644 (file)
@@ -41,6 +41,7 @@
 #endif
 
 #include <libedata-cal/e-data-cal-factory.h>
+#include <libedataserver/e-gdbus-templates.h>
 
 static gboolean opt_keep_running = FALSE;
 static gboolean opt_wait_for_client = FALSE;
@@ -124,6 +125,8 @@ main (gint argc,
        /* Migrate user data from ~/.evolution to XDG base directories. */
        evolution_calendar_factory_migrate_basedir ();
 
+       e_gdbus_templates_init_main_thread ();
+
        server = e_data_cal_factory_new (NULL, &error);
 
        if (error != NULL) {