[recipes] Remove remnants of dark text support



commit 0dff9bc4f8af5e649da155fd199ecde1cffa48aa
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Feb 18 19:36:49 2017 -0500

    Remove remnants of dark text support
    
    This field is not used anymore, so drop the leftovers in
    the importer and exporter code.

 src/gr-recipe-exporter.c |    2 --
 src/gr-recipe-importer.c |   19 +------------------
 2 files changed, 1 insertions(+), 20 deletions(-)
---
diff --git a/src/gr-recipe-exporter.c b/src/gr-recipe-exporter.c
index db004c0..a07e619 100644
--- a/src/gr-recipe-exporter.c
+++ b/src/gr-recipe-exporter.c
@@ -208,7 +208,6 @@ export_one_recipe (GrRecipeExporter  *exporter,
         g_autoptr(GrChef) chef = NULL;
         g_autoptr(GArray) images = NULL;
         g_auto(GStrv) paths = NULL;
-        g_autofree gboolean *dark = NULL;
         int i, j;
 
         key = gr_recipe_get_id (recipe);
@@ -230,7 +229,6 @@ export_one_recipe (GrRecipeExporter  *exporter,
 
         g_object_get (recipe, "images", &images, NULL);
         paths = g_new0 (char *, images->len + 1);
-        dark = g_new0 (gboolean, images->len + 1);
         for (i = 0, j = 0; i < images->len; i++) {
                 GrImage *ri = &g_array_index (images, GrImage, i);
                 g_autoptr(GFile) source = NULL;
diff --git a/src/gr-recipe-importer.c b/src/gr-recipe-importer.c
index 3c0a83c..89c31a1 100644
--- a/src/gr-recipe-importer.c
+++ b/src/gr-recipe-importer.c
@@ -80,7 +80,6 @@ struct _GrRecipeImporter
         char *recipe_instructions;
         char *recipe_notes;
         char **recipe_paths;
-        gboolean *recipe_dark;
         int recipe_serves;
         GrDiets recipe_diets;
         GDateTime *recipe_ctime;
@@ -128,7 +127,6 @@ gr_recipe_importer_finalize (GObject *object)
         g_free (importer->recipe_instructions);
         g_free (importer->recipe_notes);
         g_strfreev (importer->recipe_paths);
-        g_free (importer->recipe_dark);
         g_clear_pointer (&importer->recipe_ctime, g_date_time_unref);
         g_clear_pointer (&importer->recipe_mtime, g_date_time_unref);
         g_list_free_full (importer->recipes, g_object_unref);
@@ -213,7 +211,6 @@ cleanup_import (GrRecipeImporter *importer)
         g_clear_pointer (&importer->recipe_instructions, g_free);
         g_clear_pointer (&importer->recipe_notes, g_free);
         g_clear_pointer (&importer->recipe_paths, g_strfreev);
-        g_clear_pointer (&importer->recipe_dark, g_free);
         g_clear_pointer (&importer->recipe_ctime, g_date_time_unref);
         g_clear_pointer (&importer->recipe_mtime, g_date_time_unref);
 
@@ -428,7 +425,7 @@ import_next_recipe (GrRecipeImporter *importer)
         char *tmp;
         GrRecipeStore *store;
         g_autoptr(GrRecipe) recipe = NULL;
-        gsize length2, length3;
+        gsize length2;
         g_autoptr(GError) error = NULL;
         const char *id;
 
@@ -489,20 +486,6 @@ next:
         }
         importer->recipe_paths = g_key_file_get_string_list (importer->recipes_keyfile, id, "Images", 
&length2, &error);
         handle_or_clear_error (error);
-        if (length2 != length3) {
-                g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                             _("Failed to load recipe: Images and Angles length mismatch"));
-                error_cb (importer->extractor, error, importer);
-                return FALSE;
-        }
-        importer->recipe_dark = g_key_file_get_boolean_list (importer->recipes_keyfile, id, "DarkText", 
&length3, &error);
-        handle_or_clear_error (error);
-        if (length2 != length3) {
-                g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                             _("Failed to load recipe: Images and DarkText length mismatch"));
-                error_cb (importer->extractor, error, importer);
-                return FALSE;
-        }
 
         recipe = gr_recipe_store_get_recipe (store, importer->recipe_id);
         if (!recipe) {


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