[recipes/shopping-list: 9/10] window: Add api to show the shopping	list
- From: Matthias Clasen <matthiasc src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [recipes/shopping-list: 9/10] window: Add api to show the shopping	list
 
- Date: Sun,  8 Jan 2017 14:27:03 +0000 (UTC)
 
commit b63006dd27e2834fff7de6f0ca4987c3de52ca35
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 8 09:21:53 2017 -0500
    window: Add api to show the shopping list
    
    This is entirely parallel to the APIs for showing categories.
 src/gr-window.c |   16 ++++++++++++++++
 src/gr-window.h |    1 +
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-window.c b/src/gr-window.c
index 6bae31a..7b74f3c 100644
--- a/src/gr-window.c
+++ b/src/gr-window.c
@@ -556,6 +556,22 @@ gr_window_show_favorites (GrWindow *window)
 }
 
 void
+gr_window_show_shopping (GrWindow *window)
+{
+        save_back_entry (window);
+
+        gr_list_page_populate_from_shopping (GR_LIST_PAGE (window->list_page));
+
+        gtk_header_bar_set_title (GTK_HEADER_BAR (window->header), _("Shopping list"));
+
+        gtk_stack_set_visible_child_name (GTK_STACK (window->header_start_stack), "back");
+        gtk_stack_set_visible_child_name (GTK_STACK (window->header_title_stack), "title");
+        gtk_stack_set_visible_child_name (GTK_STACK (window->header_end_stack), "list");
+
+        gtk_stack_set_visible_child_name (GTK_STACK (window->main_stack), "list");
+}
+
+void
 gr_window_show_myself (GrWindow *window)
 {
         const char *name;
diff --git a/src/gr-window.h b/src/gr-window.h
index 7bf49db..87d6346 100644
--- a/src/gr-window.h
+++ b/src/gr-window.h
@@ -48,6 +48,7 @@ void            gr_window_show_chef                  (GrWindow   *window,
                                                       GrChef     *chef);
 void            gr_window_show_myself                (GrWindow   *window);
 void            gr_window_show_favorites             (GrWindow   *window);
+void            gr_window_show_shopping              (GrWindow   *window);
 void            gr_window_show_cuisine               (GrWindow   *window,
                                                       const char *cuisine,
                                                       const char *title);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]