diff options
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/gui/e-cal-model.c | 31 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 2 |
2 files changed, 26 insertions, 7 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 5e0c9cc337..9778d3e452 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -2561,11 +2561,32 @@ backend_died_cb (ECalClient *client, gpointer user_data) } static void +cal_model_retrieve_capabilies_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) +{ + ECalClient *client = E_CAL_CLIENT (source_object); + ECalModel *model = user_data; + ECalModelClient *client_data; + gchar *capabilities = NULL; + + g_return_if_fail (client != NULL); + g_return_if_fail (model != NULL); + + e_client_retrieve_capabilities_finish (E_CLIENT (client), result, &capabilities, NULL); + g_free (capabilities); + + e_cal_model_update_status_message (model, NULL, -1.0); + + client_data = find_client_data (model, client); + g_return_if_fail (client_data); + + update_e_cal_view_for_client (model, client_data); +} + +static void client_opened_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) { ECalClient *client = E_CAL_CLIENT (source_object); ECalModel *model = (ECalModel *) user_data; - ECalModelClient *client_data; GError *error = NULL; e_client_open_finish (E_CLIENT (client), result, &error); @@ -2578,12 +2599,8 @@ client_opened_cb (GObject *source_object, GAsyncResult *result, gpointer user_da return; } - e_cal_model_update_status_message (model, NULL, -1.0); - - client_data = find_client_data (model, client); - g_return_if_fail (client_data); - - update_e_cal_view_for_client (model, client_data); + /* to have them ready for later use */ + e_client_retrieve_capabilities (E_CLIENT (client), NULL, cal_model_retrieve_capabilies_cb, model); } static ECalModelClient * diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 47f03a9fa2..2385b9f189 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -3244,6 +3244,7 @@ e_week_view_reshape_event_span (EWeekView *week_view, - E_WEEK_VIEW_EVENT_BORDER_WIDTH - E_WEEK_VIEW_EVENT_EDGE_X_PAD - text_x; } else { + text = NULL; /* Get the width of the text of the event. This is a bit of a hack. It would be better if EText could tell us this. */ @@ -3951,6 +3952,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view, if (!uid) return; + text = NULL; g_object_set (span->text_item, "handle_popup", FALSE, NULL); g_object_get (G_OBJECT (span->text_item), "text", &text, NULL); |