[recipes] shopping: Add an API to get the recipes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] shopping: Add an API to get the recipes
- Date: Sat, 11 Mar 2017 04:32:58 +0000 (UTC)
commit 001df2db4e8466b2522e82c3d5a8bf410b449e39
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Mar 10 23:20:18 2017 -0500
shopping: Add an API to get the recipes
We _can_ get this information from the recipe store
via a search, but it will be more convenient to get it
as a list, synchronously, and the shopping page already
has the information anyway.
src/gr-shopping-page.c | 6 ++++++
src/gr-shopping-page.h | 2 ++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-shopping-page.c b/src/gr-shopping-page.c
index d5bef07..c89151d 100644
--- a/src/gr-shopping-page.c
+++ b/src/gr-shopping-page.c
@@ -869,6 +869,12 @@ gr_shopping_page_populate (GrShoppingPage *self)
gr_recipe_search_set_query (self->search, "is:shopping");
}
+GList *
+gr_shopping_page_get_recipes (GrShoppingPage *self)
+{
+ return get_recipes (self);
+}
+
static void
recipe_removed (GrShoppingPage *page,
GrRecipe *recipe)
diff --git a/src/gr-shopping-page.h b/src/gr-shopping-page.h
index 6992d63..d8fbaac 100644
--- a/src/gr-shopping-page.h
+++ b/src/gr-shopping-page.h
@@ -34,4 +34,6 @@ GtkWidget *gr_shopping_page_new (void);
void gr_shopping_page_populate (GrShoppingPage *self);
+GList *gr_shopping_page_get_recipes (GrShoppingPage *self);
+
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]