[recipes/list-all: 7/8] Add API to switch the window to an all-recipes list
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes/list-all: 7/8] Add API to switch the window to an all-recipes list
- Date: Tue, 21 Feb 2017 02:30:06 +0000 (UTC)
commit bd9f6d96d697a75cf9d324f1bc1eae9527ecf06d
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Feb 20 21:28:14 2017 -0500
Add API to switch the window to an all-recipes list
This uses the just-introduced list page API.
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 627e92c..4d693b1 100644
--- a/src/gr-window.c
+++ b/src/gr-window.c
@@ -916,6 +916,22 @@ gr_window_show_favorites (GrWindow *window)
}
void
+gr_window_show_all (GrWindow *window)
+{
+ save_back_entry (window);
+
+ gr_list_page_populate_from_all (GR_LIST_PAGE (window->list_page));
+
+ gtk_header_bar_set_title (GTK_HEADER_BAR (window->header), _("All recipes"));
+
+ 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_list (GrWindow *window,
const char *title,
GList *recipes)
diff --git a/src/gr-window.h b/src/gr-window.h
index e0d895c..11e89d6 100644
--- a/src/gr-window.h
+++ b/src/gr-window.h
@@ -51,6 +51,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_all (GrWindow *window);
void gr_window_show_list (GrWindow *window,
const char *title,
GList *recipes);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]