[gnome-todo] task-list-view: Minor cleanups
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] task-list-view: Minor cleanups
- Date: Fri, 9 Mar 2018 03:42:01 +0000 (UTC)
commit beec801719765ef00b7cc0c0703d1a07f7a03e6a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Mar 9 00:32:32 2018 -0300
task-list-view: Minor cleanups
src/gtd-task-list-view.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/gtd-task-list-view.c b/src/gtd-task-list-view.c
index adea0f9..a920367 100644
--- a/src/gtd-task-list-view.c
+++ b/src/gtd-task-list-view.c
@@ -366,7 +366,7 @@ update_done_label (GtdTaskListView *view)
g_autofree gchar *new_label = NULL;
GList *l;
- g_return_if_fail (GTD_IS_TASK_LIST_VIEW (view));
+ g_assert (GTD_IS_TASK_LIST_VIEW (view));
/* Update the completed tasks counter */
view->priv->complete_tasks = 0;
@@ -391,7 +391,7 @@ update_empty_state (GtdTaskListView *view)
GList *tasks;
GList *l;
- g_return_if_fail (GTD_IS_TASK_LIST_VIEW (view));
+ g_assert (GTD_IS_TASK_LIST_VIEW (view));
priv = view->priv;
is_empty = TRUE;
@@ -812,13 +812,9 @@ static void
on_task_list_task_removed_cb (GtdTaskListView *view,
GtdTask *task)
{
- /* Remove the correspondent row */
remove_task_row (view, task);
- /* Update the "Done" label */
update_done_label (view);
-
- /* Check if it should show the empty state */
update_empty_state (view);
}
@@ -1043,8 +1039,8 @@ on_task_completed_cb (GtdTask *task,
iterate_subtasks (self, task, func);
}
- update_empty_state (self);
update_done_label (self);
+ update_empty_state (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]