[recipes] window: Fix header updates
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] window: Fix header updates
- Date: Tue, 27 Jun 2017 03:35:24 +0000 (UTC)
commit ae996fc6b7457cd352909e1d13a7f1a32936961b
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 26 23:34:40 2017 -0400
window: Fix header updates
Ensure that we get back to the right end header when
we go back to one of the main pages.
src/gr-window.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-window.c b/src/gr-window.c
index 6402b07..9dd5d04 100644
--- a/src/gr-window.c
+++ b/src/gr-window.c
@@ -361,6 +361,7 @@ visible_page_changed (GrWindow *window)
g_signal_handlers_block_by_func (window->search_bar, search_changed, window);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (window->search_button), FALSE);
g_signal_handlers_unblock_by_func (window->search_bar, search_changed, window);
+ gtk_stack_set_visible_child_name (GTK_STACK (window->header_end_stack), "list");
}
if (strcmp (visible, "edit") != 0) {
@@ -385,12 +386,14 @@ visible_page_changed (GrWindow *window)
gr_recipes_page_refresh (GR_RECIPES_PAGE (window->recipes_page));
gr_recipes_page_unexpand (GR_RECIPES_PAGE (window->recipes_page));
gtk_header_bar_set_title (GTK_HEADER_BAR (window->header), _("Recipes"));
+ gtk_stack_set_visible_child_name (GTK_STACK (window->header_end_stack), "main");
}
if (strcmp (visible, "cuisines") == 0) {
gr_cuisines_page_refresh (GR_CUISINES_PAGE (window->cuisines_page));
gr_cuisines_page_unexpand (GR_CUISINES_PAGE (window->cuisines_page));
gtk_header_bar_set_title (GTK_HEADER_BAR (window->header), _("Cuisines"));
+ gtk_stack_set_visible_child_name (GTK_STACK (window->header_end_stack), "main");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]