[recipes] Use content warnings from GrRecipe in the details page
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Use content warnings from GrRecipe in the details page
- Date: Wed, 14 Dec 2016 16:04:51 +0000 (UTC)
commit ffeb44c28c78dcf396ea3ca6131366984bb4b57f
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 14 11:01:46 2016 -0500
Use content warnings from GrRecipe in the details page
This is what we added the new API for.
src/gr-details-page.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/gr-details-page.c b/src/gr-details-page.c
index 7edb4ef..638c97c 100644
--- a/src/gr-details-page.c
+++ b/src/gr-details-page.c
@@ -597,8 +597,6 @@ populate_ingredients (GrDetailsPage *page,
g_autoptr(GtkSizeGroup) group = NULL;
g_auto(GStrv) ings = NULL;
int i;
- gboolean garlic = FALSE;
- gboolean spicy = TRUE;
group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
container_remove_all (GTK_CONTAINER (page->ingredients_list));
@@ -609,9 +607,6 @@ populate_ingredients (GrDetailsPage *page,
GtkWidget *label;
g_autofree char *s = NULL;
- if (strstr (ings[i], "garlic") || strstr (ings[i], "Garlic")) // FIXME
- garlic = TRUE;
-
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_show (box);
@@ -641,12 +636,12 @@ populate_ingredients (GrDetailsPage *page,
gtk_widget_hide (page->warning_box);
- if (garlic) {
+ if (gr_recipe_contains_garlic (page->recipe)) {
gtk_widget_show (page->warning_box);
gtk_widget_show (page->garlic_warning);
}
- if (spicy) {
+ if (gr_recipe_is_spicy (page->recipe)) {
gtk_widget_show (page->warning_box);
gtk_widget_show (page->spicy_warning);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]