diff options
Diffstat (limited to 'calendar/conduits/todo/todo-conduit.c')
-rw-r--r-- | calendar/conduits/todo/todo-conduit.c | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 07fe9f3122..fe50a7869b 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -166,29 +166,23 @@ e_todo_context_destroy (EToDoConduitContext *ctxt) /* Calendar Server routines */ static void -start_calendar_server_cb (GtkWidget *cal_client, - CalClientLoadStatus status, - EToDoConduitContext *ctxt) +start_calendar_server_cb (CalClient *cal_client, + CalClientOpenStatus status, + gpointer data) { - CalClient *client = CAL_CLIENT (cal_client); + EToDoConduitContext *ctxt; + + ctxt = data; - LOG (" entering start_calendar_server_load_cb, tried=%d\n", - ctxt->calendar_load_tried); + LOG (" entering start_calendar_server_cb\n"); - if (status == CAL_CLIENT_LOAD_SUCCESS) { - ctxt->calendar_load_success = TRUE; + if (status == CAL_CLIENT_OPEN_SUCCESS) { + ctxt->calendar_open_success = TRUE; LOG (" success\n"); - gtk_main_quit (); /* end the sub event loop */ - } else { - if (ctxt->calendar_load_tried) { - LOG (" load and create of calendar failed\n"); - gtk_main_quit (); /* end the sub event loop */ - return; - } + } else + LOG (" open of calendar failed\n"); - cal_client_create_calendar (client, ctxt->calendar_file); - ctxt->calendar_load_tried = TRUE; - } + gtk_main_quit (); /* end the sub event loop */ } static int @@ -203,17 +197,17 @@ start_calendar_server (EToDoConduitContext *ctxt) ctxt->calendar_file = g_concat_dir_and_file (g_get_home_dir (), "evolution/local/Tasks/tasks.ics"); - gtk_signal_connect (GTK_OBJECT (ctxt->client), "cal_loaded", + gtk_signal_connect (GTK_OBJECT (ctxt->client), "cal_opened", start_calendar_server_cb, ctxt); - LOG (" calling cal_client_load_calendar\n"); - cal_client_load_calendar (ctxt->client, ctxt->calendar_file); + LOG (" calling cal_client_open_calendar\n"); + cal_client_open_calendar (ctxt->client, ctxt->calendar_file, FALSE); /* run a sub event loop to turn cal-client's async load notification into a synchronous call */ gtk_main (); - if (ctxt->calendar_load_success) + if (ctxt->calendar_open_success) return 0; return -1; |