[recipes] Partially generate ingredients lists
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Partially generate ingredients lists
- Date: Sat, 31 Dec 2016 02:06:17 +0000 (UTC)
commit e7eef2321fdaac767d4b422b3326b9ed277522c5
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 30 14:14:42 2016 -0500
Partially generate ingredients lists
This will make it easier to expand the list later on.
data/Makefile.am | 2 +
data/ingredients.list | 52 +++++++++++++++++++++++++++
src/Makefile.am | 8 ++++
src/gr-ingredient.c | 94 +-----------------------------------------------
4 files changed, 64 insertions(+), 92 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index d6f2468..7e6c9ed 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,6 +3,8 @@
EXTRA_DIST =
CLEANFILES =
+EXTRA_DIST += ingredients.list
+
desktopdir = $(datadir)/applications
desktop_in_files = org.gnome.Recipes.desktop.in
diff --git a/data/ingredients.list b/data/ingredients.list
new file mode 100644
index 0000000..3e31f59
--- /dev/null
+++ b/data/ingredients.list
@@ -0,0 +1,52 @@
+Almond
+Amaretti
+Apple
+Apricot
+Anchovis
+Artichoke
+Asparagus
+Aubergine
+Bacon
+Banana
+Baked Beans
+Basil
+Beans
+Bagel
+Basmati rice
+Bay leaf
+Beef mince
+Berry
+Beetroot
+Biscotti
+Beef sausage
+Beef stock
+Bilberry
+Butter
+Carrot
+Couscous
+Date
+Egg
+Fig
+Flour
+Garlic
+Ground beef
+Honey
+Lemon
+Mayonnaise
+Milk
+Mustard
+Onion
+Orange
+Parsley
+Pepper
+Potato
+Salt
+Silantro
+Squash
+Tangerine
+Tomato
+Vinegar
+Wine
+Yeast
+Yoghurt
+Zinfandel
diff --git a/src/Makefile.am b/src/Makefile.am
index 48a1d23..98af4da 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -116,6 +116,8 @@ recipes_SOURCES = \
BUILT_SOURCES = \
resources-ui.c \
resources-images.c \
+ ingredients.c \
+ no-ingredients.c \
types.h \
types.c \
gr-shell-search-provider-dbus.h \
@@ -129,6 +131,12 @@ MAINTAINERCLEANFILES = \
gr-shell-search-provider-dbus.h \
gr-shell-search-provider-dbus.c
+ingredients.c: $(top_srcdir)/data/ingredients.list
+ $(AM_V_GEN) $(SED) -e 's/^\(.*\)$$/ N_("\1"),/' $^ > $@
+
+no-ingredients.c: $(top_srcdir)/data/ingredients.list
+ $(AM_V_GEN) $(SED) -e 's/^\(.*\)$$/ N_("no \1"),/' $^ > $@
+
resource_ui_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/recipes-ui.gresource.xml)
resources-ui.c: recipes-ui.gresource.xml $(resource_ui_files)
diff --git a/src/gr-ingredient.c b/src/gr-ingredient.c
index a08ec0a..fb9d21a 100644
--- a/src/gr-ingredient.c
+++ b/src/gr-ingredient.c
@@ -28,102 +28,12 @@
static const char *names_[] = {
- N_("Almond"),
- N_("Amaretti"),
- N_("Apple"),
- N_("Apricot"),
- N_("Anchovis"),
- N_("Artichoke"),
- N_("Asparagus"),
- N_("Aubergine"),
- N_("Bacon"),
- N_("Banana"),
- N_("Baked Beans"),
- N_("Basil"),
- N_("Beans"),
- N_("Bagel"),
- N_("Basmati rice"),
- N_("Bay leaf"),
- N_("Beef mince"),
- N_("Berry"),
- N_("Beetroot"),
- N_("Biscotti"),
- N_("Beef sausage"),
- N_("Beef stock"),
- N_("Bilberry"),
- N_("Carrot"),
- N_("Couscous"),
- N_("Date"),
- N_("Egg"),
- N_("Fig"),
- N_("Garlic"),
- N_("Honey"),
- N_("Lemon"),
- N_("Mayonnaise"),
- N_("Mustard"),
- N_("Onion"),
- N_("Orange"),
- N_("Parsley"),
- N_("Pepper"),
- N_("Potato"),
- N_("Silantro"),
- N_("Squash"),
- N_("Tangerine"),
- N_("Tomato"),
- N_("Vinegar"),
- N_("Wine"),
- N_("Yoghurt"),
- N_("Zinfandel"),
+#include "ingredients.c"
NULL
};
static const char *negations[] = {
- N_("no Almond"),
- N_("no Amaretti"),
- N_("no Apple"),
- N_("no Apricot"),
- N_("no Anchovis"),
- N_("no Artichoke"),
- N_("no Asparagus"),
- N_("no Aubergine"),
- N_("no Bacon"),
- N_("no Banana"),
- N_("no Baked Beans"),
- N_("no Basil"),
- N_("no Beans"),
- N_("no Bagel"),
- N_("no Basmati rice"),
- N_("no Bay leaf"),
- N_("no Beef mince"),
- N_("no Berry"),
- N_("no Beetroot"),
- N_("no Biscotti"),
- N_("no Beef sausage"),
- N_("no Beef stock"),
- N_("no Bilberry"),
- N_("no Carrot"),
- N_("no Couscous"),
- N_("no Date"),
- N_("no Egg"),
- N_("no Fig"),
- N_("no Garlic"),
- N_("no Honey"),
- N_("no Lemon"),
- N_("no Mayonnaise"),
- N_("no Mustard"),
- N_("no Onion"),
- N_("no Orange"),
- N_("no Parsley"),
- N_("no Pepper"),
- N_("no Potatoe"),
- N_("no Silantro"),
- N_("no Squash"),
- N_("no Tangerine"),
- N_("no Tomato"),
- N_("no Vinegar"),
- N_("no Wine"),
- N_("no Yoghurt"),
- N_("no Zinfandel"),
+#include "no-ingredients.c"
NULL
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]