diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-04-13 02:54:15 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-04-13 07:12:25 +0800 |
commit | 6172096d30099361bd5e94891ac84f3155525584 (patch) | |
tree | 5af44901e62581d36292699ddd3bf0a2e4a39498 /calendar/gui | |
parent | e093e2600240243f7d6112894767cf9a827280fa (diff) | |
download | gsoc2013-evolution-6172096d30099361bd5e94891ac84f3155525584.tar gsoc2013-evolution-6172096d30099361bd5e94891ac84f3155525584.tar.gz gsoc2013-evolution-6172096d30099361bd5e94891ac84f3155525584.tar.bz2 gsoc2013-evolution-6172096d30099361bd5e94891ac84f3155525584.tar.lz gsoc2013-evolution-6172096d30099361bd5e94891ac84f3155525584.tar.xz gsoc2013-evolution-6172096d30099361bd5e94891ac84f3155525584.tar.zst gsoc2013-evolution-6172096d30099361bd5e94891ac84f3155525584.zip |
Remove e_cal_model_get_client_for_source().
Was not thread-safe because it did not reference the return value.
The function was only used to implement the Refresh action on the
sidebar menu. e_client_selector_ref_cached_client() works better
for this anyway.
(cherry picked from commit 1df4952769b3211b90aecb3a359d8ae484fd1363)
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-cal-model.c | 36 | ||||
-rw-r--r-- | calendar/gui/e-cal-model.h | 3 |
2 files changed, 0 insertions, 39 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 982337cc51..8c410550ab 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -2351,42 +2351,6 @@ e_cal_model_list_clients (ECalModel *model) return g_queue_peek_head_link (&results); } -/** - * e_cal_model_get_client_for_source: - * @model: an #ECalModel - * @source: an #ESource - */ -ECalClient * -e_cal_model_get_client_for_source (ECalModel *model, - ESource *source) -{ - ECalClient *match = NULL; - GList *list, *link; - - g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL); - g_return_val_if_fail (E_IS_SOURCE (source), NULL); - - list = cal_model_clients_list (model); - - for (link = list; link != NULL; link = g_list_next (link)) { - ClientData *client_data = link->data; - ESource *client_source; - EClient *client; - - client = E_CLIENT (client_data->client); - client_source = e_client_get_source (client); - - if (e_source_equal (source, client_source)) { - match = client_data->client; - break; - } - } - - g_list_free_full (list, (GDestroyNotify) client_data_unref); - - return match; -} - static ECalModelComponent * search_by_id_and_client (ECalModelPrivate *priv, ECalClient *client, diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h index 58d1613d74..d3a4fcc0f5 100644 --- a/calendar/gui/e-cal-model.h +++ b/calendar/gui/e-cal-model.h @@ -247,9 +247,6 @@ ECalClient * e_cal_model_get_default_client (ECalModel *model); void e_cal_model_set_default_client (ECalModel *model, ECalClient *client); GList * e_cal_model_list_clients (ECalModel *model); -ECalClient * e_cal_model_get_client_for_source - (ECalModel *model, - ESource *source); void e_cal_model_add_client (ECalModel *model, ECalClient *cal_client); void e_cal_model_remove_client (ECalModel *model, |