[gnome-todo] sidebar: Also invalidate when list changes
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] sidebar: Also invalidate when list changes
- Date: Sun, 30 Jun 2019 00:52:41 +0000 (UTC)
commit dec824e0843a6a2335229a208f1b9d8c4644e923
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jun 29 21:43:03 2019 -0300
sidebar: Also invalidate when list changes
For the same reasons that we invalidate when a list is
added or removed.
src/sidebar/gtd-sidebar.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/sidebar/gtd-sidebar.c b/src/sidebar/gtd-sidebar.c
index ac6a210..3f004c0 100644
--- a/src/sidebar/gtd-sidebar.c
+++ b/src/sidebar/gtd-sidebar.c
@@ -478,12 +478,12 @@ on_task_list_changed_cb (GtdManager *manager,
GtdSidebar *self)
{
GtkListBoxRow *row;
+ GtkListBox *listbox;
gboolean archived;
archived = gtd_task_list_get_archived (list);
- row = get_row_for_task_list (self,
- archived ? self->archive_listbox : self->listbox,
- list);
+ listbox = archived ? self->archive_listbox : self->listbox;
+ row = get_row_for_task_list (self, listbox, list);
/*
* The task was either archived or unarchived; remove it and add to
@@ -491,9 +491,8 @@ on_task_list_changed_cb (GtdManager *manager,
*/
if (!row)
{
- row = get_row_for_task_list (self,
- archived ? self->listbox : self->archive_listbox,
- list);
+ listbox = archived ? self->listbox : self->archive_listbox;
+ row = get_row_for_task_list (self, listbox, list);
g_assert (row != NULL);
/* Change to another panel or taklist */
@@ -506,6 +505,8 @@ on_task_list_changed_cb (GtdManager *manager,
/* Add a new row */
add_task_list (self, list);
}
+
+ gtk_list_box_invalidate_filter (listbox);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]