aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-11-12 01:03:36 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-11-12 01:03:36 +0800
commit4ea4ea5d280f641bb5f3b6b3d1a8c05960e59bea (patch)
tree7daeb47d2bda5e78b0454ea4640d802d6c2662e2
parentf7cc8f7cbd3e7b83c33fe85b2311895b8d5ee242 (diff)
downloadgsoc2013-evolution-4ea4ea5d280f641bb5f3b6b3d1a8c05960e59bea.tar
gsoc2013-evolution-4ea4ea5d280f641bb5f3b6b3d1a8c05960e59bea.tar.gz
gsoc2013-evolution-4ea4ea5d280f641bb5f3b6b3d1a8c05960e59bea.tar.bz2
gsoc2013-evolution-4ea4ea5d280f641bb5f3b6b3d1a8c05960e59bea.tar.lz
gsoc2013-evolution-4ea4ea5d280f641bb5f3b6b3d1a8c05960e59bea.tar.xz
gsoc2013-evolution-4ea4ea5d280f641bb5f3b6b3d1a8c05960e59bea.tar.zst
gsoc2013-evolution-4ea4ea5d280f641bb5f3b6b3d1a8c05960e59bea.zip
load the calendar synchronously
2003-11-11 JP Rosevear <jpr@ximian.com> * conduits/todo/todo-conduit.c (start_calendar_server): load the calendar synchronously * conduits/calendar/calendar-conduit.c (start_calendar_server): ditto svn path=/trunk/; revision=23285
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c31
-rw-r--r--calendar/conduits/todo/todo-conduit.c32
3 files changed, 9 insertions, 61 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 8e1636c18e..ae02718643 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2003-11-11 JP Rosevear <jpr@ximian.com>
+
+ * conduits/todo/todo-conduit.c (start_calendar_server): load the
+ calendar synchronously
+
+ * conduits/calendar/calendar-conduit.c (start_calendar_server): ditto
+
2003-11-10 JP Rosevear <jpr@ximian.com>
* importers/icalendar-importer.c (update_single_object): return
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index d028fee56c..47b3755ea5 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -386,29 +386,10 @@ static char *print_remote (GnomePilotRecord *remote)
return buff;
}
-/* Calendar Server routines */
-static void
-start_calendar_server_cb (ECal *e_cal,
- ECalOpenStatus status,
- gpointer data)
-{
- gboolean *success = data;
-
- if (status == E_CAL_OPEN_SUCCESS) {
- *success = TRUE;
- } else {
- *success = FALSE;
- WARN ("Failed to open calendar!\n");
- }
-
- gtk_main_quit (); /* end the sub event loop */
-}
-
static int
start_calendar_server (ECalConduitContext *ctxt)
{
char *uri;
- gboolean success = FALSE;
g_return_val_if_fail (ctxt != NULL, -2);
@@ -420,21 +401,11 @@ start_calendar_server (ECalConduitContext *ctxt)
if (!ctxt->client)
return -1;
-
- g_signal_connect (ctxt->client, "cal_opened",
- G_CALLBACK (start_calendar_server_cb), &success);
if (!e_cal_open (ctxt->client, FALSE, NULL))
return -1;
- /* run a sub event loop to turn cal-client's async load
- notification into a synchronous call */
- gtk_main ();
-
- if (success)
- return 0;
-
- return -1;
+ return 0;
}
/* Utility routines */
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index 61a0598a75..fe5684252b 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -392,30 +392,10 @@ static char *print_remote (GnomePilotRecord *remote)
return buff;
}
-
-/* Calendar Server routines */
-static void
-start_calendar_server_cb (ECal *e_cal,
- ECalOpenStatus status,
- gpointer data)
-{
- gboolean *success = data;
-
- if (status == E_CAL_OPEN_SUCCESS) {
- *success = TRUE;
- } else {
- *success = FALSE;
- WARN ("Failed to open calendar!\n");
- }
-
- gtk_main_quit (); /* end the sub event loop */
-}
-
static int
start_calendar_server (EToDoConduitContext *ctxt)
{
char *uri;
- gboolean success = FALSE;
g_return_val_if_fail (ctxt != NULL, -2);
@@ -428,20 +408,10 @@ start_calendar_server (EToDoConduitContext *ctxt)
if (!ctxt->client)
return -1;
- g_signal_connect (ctxt->client, "cal_opened",
- G_CALLBACK (start_calendar_server_cb), &success);
-
if (!e_cal_open (ctxt->client, FALSE, NULL))
return -1;
- /* run a sub event loop to turn cal-client's async load
- notification into a synchronous call */
- gtk_main ();
-
- if (success)
- return 0;
-
- return -1;
+ return 0;
}
/* Utility routines */