[gnome-todo] task-list-view: hide edit pane when task is completed



commit ba3fc45d4f6b87e0dcd99101a89699622d235922
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sun Jul 5 19:47:23 2015 -0300

    task-list-view: hide edit pane when task is completed
    
    When the task is completed and we're editing it on edit pane,
    hide the edit pane and clear the task.

 src/gtd-task-list-view.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gtd-task-list-view.c b/src/gtd-task-list-view.c
index 6b80039..c1f9560 100644
--- a/src/gtd-task-list-view.c
+++ b/src/gtd-task-list-view.c
@@ -473,6 +473,17 @@ gtd_task_list_view__task_completed (GObject    *object,
   else
     priv->complete_tasks--;
 
+  /*
+   * If we're editing the task and it get completed, hide the edit
+   * pane and the task.
+   */
+  if (task_complete &&
+      task == gtd_edit_pane_get_task (priv->edit_pane))
+    {
+      gtk_revealer_set_reveal_child (priv->edit_revealer, FALSE);
+      gtd_edit_pane_set_task (priv->edit_pane, NULL);
+    }
+
   gtd_task_list_view__update_done_label (GTD_TASK_LIST_VIEW (user_data));
   gtk_revealer_set_reveal_child (priv->revealer, priv->complete_tasks > 0);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]