aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/gui/e-task-table.c17
-rw-r--r--calendar/gui/e-task-table.h1
-rw-r--r--modules/calendar/e-task-shell-view-private.c18
3 files changed, 12 insertions, 24 deletions
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index f270d1f93f..e014fe117b 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -1843,18 +1843,17 @@ e_task_table_get_current_time (ECellDateEdit *ecde,
}
/**
- * e_task_table_hide_completed_tasks:
+ * e_task_table_process_completed_tasks:
* @table: A calendar table model.
- * @client_list: Clients List
*
- * Hide completed tasks.
+ * Process completed tasks.
*/
void
e_task_table_process_completed_tasks (ETaskTable *task_table,
- GList *clients_list,
gboolean config_changed)
{
ECalModel *model;
+ GList *client_list;
GCancellable *cancellable;
gchar *hide_sexp, *show_sexp;
@@ -1874,20 +1873,24 @@ e_task_table_process_completed_tasks (ETaskTable *task_table,
if (!(hide_sexp && show_sexp))
show_sexp = g_strdup ("(is-completed?)");
- /* Delete rows from model*/
+ client_list = e_cal_model_get_client_list (model);
+
+ /* Delete rows from model */
if (hide_sexp) {
task_table_get_object_list_async (
- clients_list, hide_sexp, cancellable,
+ client_list, hide_sexp, cancellable,
hide_completed_rows_ready, model);
}
/* Insert rows into model */
if (config_changed) {
task_table_get_object_list_async (
- clients_list, show_sexp, cancellable,
+ client_list, show_sexp, cancellable,
show_completed_rows_ready, model);
}
+ g_list_free (client_list);
+
g_free (hide_sexp);
g_free (show_sexp);
}
diff --git a/calendar/gui/e-task-table.h b/calendar/gui/e-task-table.h
index 617679c76b..cfe08b29dd 100644
--- a/calendar/gui/e-task-table.h
+++ b/calendar/gui/e-task-table.h
@@ -104,7 +104,6 @@ void e_task_table_hide_completed_tasks
gboolean config_changed);
void e_task_table_process_completed_tasks
(ETaskTable *table,
- GList *clients_list,
gboolean config_changed);
G_END_DECLS
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c
index 1ee793146c..a9af8227d5 100644
--- a/modules/calendar/e-task-shell-view-private.c
+++ b/modules/calendar/e-task-shell-view-private.c
@@ -48,26 +48,19 @@ static gboolean
task_shell_view_process_completed_tasks (ETaskShellView *task_shell_view)
{
ETaskShellContent *task_shell_content;
- ETaskShellSidebar *task_shell_sidebar;
ETaskTable *task_table;
- GList *clients;
task_shell_view->priv->update_completed_timeout = 0;
task_shell_content = task_shell_view->priv->task_shell_content;
task_table = e_task_shell_content_get_task_table (task_shell_content);
- task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
- clients = e_task_shell_sidebar_get_clients (task_shell_sidebar);
-
- e_task_table_process_completed_tasks (task_table, clients, TRUE);
+ e_task_table_process_completed_tasks (task_table, TRUE);
/* Search query takes whether to show completed tasks into account,
* so if the preference has changed we need to update the query. */
e_shell_view_execute_search (E_SHELL_VIEW (task_shell_view));
- g_list_free (clients);
-
return FALSE;
}
@@ -145,23 +138,16 @@ static gboolean
task_shell_view_update_timeout_cb (ETaskShellView *task_shell_view)
{
ETaskShellContent *task_shell_content;
- ETaskShellSidebar *task_shell_sidebar;
ETaskTable *task_table;
ECalModel *model;
- GList *clients;
task_shell_content = task_shell_view->priv->task_shell_content;
task_table = e_task_shell_content_get_task_table (task_shell_content);
model = e_task_table_get_model (task_table);
- task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
- clients = e_task_shell_sidebar_get_clients (task_shell_sidebar);
-
- e_task_table_process_completed_tasks (task_table, clients, FALSE);
+ e_task_table_process_completed_tasks (task_table, FALSE);
e_cal_model_tasks_update_due_tasks (E_CAL_MODEL_TASKS (model));
- g_list_free (clients);
-
return TRUE;
}