[recipes] Make sure to export all recipe data
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Make sure to export all recipe data
- Date: Thu, 9 Mar 2017 17:03:52 +0000 (UTC)
commit 7b361e5abd88f2dbe4f2f3419e08db643e6af753
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Mar 9 11:50:07 2017 -0500
Make sure to export all recipe data
We were not exporting spiciness and the default image.
Thanks to Adelia for uncovering this bug.
src/gr-recipe-exporter.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-recipe-exporter.c b/src/gr-recipe-exporter.c
index 2664a47..a6a5095 100644
--- a/src/gr-recipe-exporter.c
+++ b/src/gr-recipe-exporter.c
@@ -268,6 +268,8 @@ export_one_recipe (GrRecipeExporter *exporter,
const char *instructions;
const char *notes;
int serves;
+ int default_image;
+ int spiciness;
GrDiets diets;
GDateTime *ctime;
GDateTime *mtime;
@@ -292,6 +294,8 @@ export_one_recipe (GrRecipeExporter *exporter,
notes = gr_recipe_get_notes (recipe);
ctime = gr_recipe_get_ctime (recipe);
mtime = gr_recipe_get_mtime (recipe);
+ default_image = gr_recipe_get_default_image (recipe);
+ spiciness = gr_recipe_get_spiciness (recipe);
g_object_get (recipe, "images", &images, NULL);
@@ -331,7 +335,9 @@ export_one_recipe (GrRecipeExporter *exporter,
g_key_file_set_string (keyfile, key, "Instructions", instructions ? instructions : "");
g_key_file_set_string (keyfile, key, "Notes", notes ? notes : "");
g_key_file_set_integer (keyfile, key, "Serves", serves);
+ g_key_file_set_integer (keyfile, key, "Spiciness", spiciness);
g_key_file_set_integer (keyfile, key, "Diets", diets);
+ g_key_file_set_integer (keyfile, key, "DefaultImage", default_image);
g_key_file_set_string_list (keyfile, key, "Images", (const char * const *)paths, g_strv_length
(paths));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]