aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-model.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-06-27 17:31:32 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:33 +0800
commitf286e88fae02a7da640ab1637130b00d3c366c08 (patch)
treeff984d9a12656e6c4c2b54177b2cb561ecc13cf1 /calendar/gui/e-cal-model.c
parent46c1bea8ee46a4aa3fdf3759b819342413c2cf69 (diff)
downloadgsoc2013-evolution-f286e88fae02a7da640ab1637130b00d3c366c08.tar
gsoc2013-evolution-f286e88fae02a7da640ab1637130b00d3c366c08.tar.gz
gsoc2013-evolution-f286e88fae02a7da640ab1637130b00d3c366c08.tar.bz2
gsoc2013-evolution-f286e88fae02a7da640ab1637130b00d3c366c08.tar.lz
gsoc2013-evolution-f286e88fae02a7da640ab1637130b00d3c366c08.tar.xz
gsoc2013-evolution-f286e88fae02a7da640ab1637130b00d3c366c08.tar.zst
gsoc2013-evolution-f286e88fae02a7da640ab1637130b00d3c366c08.zip
Bug #653154 - Crash when constructing calendar view
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r--calendar/gui/e-cal-model.c31
1 files changed, 24 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 *