diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-04-13 02:21:48 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-04-13 06:35:11 +0800 |
commit | 1141e231478410ecd83c78507612e57f58f2ccf1 (patch) | |
tree | fe34c86bab52d1cbf624cde02464c12e06b18742 /calendar/gui/e-cal-model.c | |
parent | ebef28545a2a74d675142afd6921f5e0e65b4b76 (diff) | |
download | gsoc2013-evolution-1141e231478410ecd83c78507612e57f58f2ccf1.tar gsoc2013-evolution-1141e231478410ecd83c78507612e57f58f2ccf1.tar.gz gsoc2013-evolution-1141e231478410ecd83c78507612e57f58f2ccf1.tar.bz2 gsoc2013-evolution-1141e231478410ecd83c78507612e57f58f2ccf1.tar.lz gsoc2013-evolution-1141e231478410ecd83c78507612e57f58f2ccf1.tar.xz gsoc2013-evolution-1141e231478410ecd83c78507612e57f58f2ccf1.tar.zst gsoc2013-evolution-1141e231478410ecd83c78507612e57f58f2ccf1.zip |
Add e_cal_model_list_clients().
Replaces e_cal_model_get_client_list().
Does the same thing, except the returned ECalClient instances are
referenced for thread-safety.
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r-- | calendar/gui/e-cal-model.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 1ed0720bec..d990bdbaf0 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -2621,7 +2621,7 @@ e_cal_model_set_default_client (ECalModel *model, } GList * -e_cal_model_get_client_list (ECalModel *model) +e_cal_model_list_clients (ECalModel *model) { GQueue results = G_QUEUE_INIT; GList *list, *link; @@ -2635,14 +2635,17 @@ e_cal_model_get_client_list (ECalModel *model) for (link = list; link != NULL; link = g_list_next (link)) { ClientData *client_data = link->data; + ECalClient *client; + + client = client_data->client; /* Exclude the default client if we're not querying it. */ - if (client_data->client == default_client) { + if (client == default_client) { if (!client_data->do_query) continue; } - g_queue_push_tail (&results, client_data->client); + g_queue_push_tail (&results, g_object_ref (client)); } g_list_free_full (list, (GDestroyNotify) client_data_unref); |