diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/calendar/e-cal-shell-view-private.c | 15 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view-private.c | 10 |
2 files changed, 12 insertions, 13 deletions
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c index b8a5583b37..366af1b57d 100644 --- a/modules/calendar/e-cal-shell-view-private.c +++ b/modules/calendar/e-cal-shell-view-private.c @@ -1462,7 +1462,7 @@ static void cal_iterate_searching (ECalShellView *cal_shell_view) { ECalShellViewPrivate *priv; - GList *clients, *iter; + GList *list, *link; ECalModel *model; time_t new_time, range1, range2; icaltimezone *timezone; @@ -1547,9 +1547,9 @@ cal_iterate_searching (ECalShellView *cal_shell_view) model = gnome_calendar_get_model ( e_cal_shell_content_get_calendar ( cal_shell_view->priv->cal_shell_content)); - clients = e_cal_model_get_client_list (model); + list = e_cal_model_list_clients (model); - if (!clients) { + if (list == NULL) { e_activity_set_state ( priv->searching_activity, E_ACTIVITY_COMPLETED); g_object_unref (priv->searching_activity); @@ -1590,19 +1590,18 @@ cal_iterate_searching (ECalShellView *cal_shell_view) g_free (end); cancellable = e_activity_get_cancellable (priv->searching_activity); - g_list_foreach (clients, (GFunc) g_object_ref, NULL); - priv->search_pending_count = g_list_length (clients); + priv->search_pending_count = g_list_length (list); priv->search_time = new_time; - for (iter = clients; iter; iter = iter->next) { - ECalClient *client = iter->data; + for (link = list; link != NULL; link = g_list_next (link)) { + ECalClient *client = E_CAL_CLIENT (link); e_cal_client_get_object_list ( client, sexp, cancellable, cal_search_get_object_list_cb, cal_shell_view); } - g_list_free_full (clients, g_object_unref); + g_list_free_full (list, (GDestroyNotify) g_object_unref); g_free (sexp); } diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c index 87a843d622..4da3fbd8b1 100644 --- a/modules/calendar/e-task-shell-view-private.c +++ b/modules/calendar/e-task-shell-view-private.c @@ -510,7 +510,7 @@ e_task_shell_view_delete_completed (ETaskShellView *task_shell_view) { ETaskShellContent *task_shell_content; ECalModel *model; - GList *list, *iter; + GList *list, *link; const gchar *sexp; g_return_if_fail (E_IS_TASK_SHELL_VIEW (task_shell_view)); @@ -523,10 +523,10 @@ e_task_shell_view_delete_completed (ETaskShellView *task_shell_view) e_task_shell_view_set_status_message ( task_shell_view, _("Expunging"), -1.0); - list = e_cal_model_get_client_list (model); + list = e_cal_model_list_clients (model); - for (iter = list; iter != NULL; iter = iter->next) { - ECalClient *client = E_CAL_CLIENT (iter->data); + for (link = list; link != NULL; link = g_list_next (link)) { + ECalClient *client = E_CAL_CLIENT (link->data); GSList *objects, *obj; GError *error = NULL; @@ -565,7 +565,7 @@ e_task_shell_view_delete_completed (ETaskShellView *task_shell_view) e_cal_client_free_icalcomp_slist (objects); } - g_list_free (list); + g_list_free_full (list, (GDestroyNotify) g_object_unref); e_task_shell_view_set_status_message (task_shell_view, NULL, -1.0); } |