[recipes] Import all recipe fields as well



commit acd019d00d251d575ebf847fd29fe19b41669c32
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Mar 9 11:59:40 2017 -0500

    Import all recipe fields as well
    
    Same error as the previous commit, on the import side.

 src/gr-recipe-importer.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-recipe-importer.c b/src/gr-recipe-importer.c
index fb0b551..e669747 100644
--- a/src/gr-recipe-importer.c
+++ b/src/gr-recipe-importer.c
@@ -83,6 +83,8 @@ struct _GrRecipeImporter
         char *recipe_notes;
         char **recipe_paths;
         int recipe_serves;
+        int recipe_spiciness;
+        int recipe_default_image;
         GrDiets recipe_diets;
         GDateTime *recipe_ctime;
         GDateTime *recipe_mtime;
@@ -322,6 +324,8 @@ import_recipe (GrRecipeImporter *importer)
                       "instructions", importer->recipe_instructions,
                       "notes", importer->recipe_notes,
                       "serves", importer->recipe_serves,
+                      "spiciness", importer->recipe_spiciness,
+                      "default-image", importer->recipe_default_image,
                       "diets", importer->recipe_diets,
                       "images", images,
                       "ctime", importer->recipe_ctime,
@@ -461,6 +465,8 @@ next:
         importer->recipe_instructions = key_file_get_string (importer->recipes_keyfile, id, "Instructions");
         importer->recipe_notes = key_file_get_string (importer->recipes_keyfile, id, "Notes");
         importer->recipe_serves = g_key_file_get_integer (importer->recipes_keyfile, id, "Serves", &error);
+        importer->recipe_spiciness = g_key_file_get_integer (importer->recipes_keyfile, id, "Spiciness", 
&error);
+        importer->recipe_default_image = g_key_file_get_integer (importer->recipes_keyfile, id, 
"DefaultImage", &error);
         handle_or_clear_error (error);
         importer->recipe_diets = g_key_file_get_integer (importer->recipes_keyfile, id, "Diets", &error);
         handle_or_clear_error (error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]