[recipes] Drop RECIPES_DATA_DIR support



commit eea31234c3550f44f748d4a105fa1477d621322f
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Apr 3 21:40:18 2017 -0400

    Drop RECIPES_DATA_DIR support
    
    I have not used this at all, so it is not worth keeping.

 src/gr-recipe-store.c |   25 ++-----------------------
 1 files changed, 2 insertions(+), 23 deletions(-)
---
diff --git a/src/gr-recipe-store.c b/src/gr-recipe-store.c
index d7f339f..ff80826 100644
--- a/src/gr-recipe-store.c
+++ b/src/gr-recipe-store.c
@@ -502,10 +502,7 @@ save_recipes (GrRecipeStore *self)
 
         keyfile = g_key_file_new ();
 
-        if (g_getenv ("RECIPES_DATA_DIR"))
-                dir = g_getenv ("RECIPES_DATA_DIR");
-        else
-                dir = get_user_data_dir ();
+        dir = get_user_data_dir ();
         path = g_build_filename (dir, "recipes.db", NULL);
 
         g_info ("Save recipe db: %s", path);
@@ -851,10 +848,7 @@ save_chefs (GrRecipeStore *store)
 
         keyfile = g_key_file_new ();
 
-        if (g_getenv ("RECIPES_DATA_DIR"))
-                dir = g_getenv ("RECIPES_DATA_DIR");
-        else
-                dir = get_user_data_dir ();
+        dir = get_user_data_dir ();
         path = g_build_filename (dir, "chefs.db", NULL);
 
         g_info ("Save chefs db: %s", path);
@@ -932,21 +926,6 @@ gr_recipe_store_init (GrRecipeStore *self)
 
         load_user (self, user_dir);
 
-        if (g_getenv ("RECIPES_DATA_DIR")) {
-                const char *dir = g_getenv ("RECIPES_DATA_DIR");
-
-                g_info ("Loading data from RECIPES_DATA_DIR: %s", dir);
-
-                load_recipes (self, dir, FALSE);
-                load_chefs (self, dir, FALSE);
-                load_picks (self, dir);
-
-                g_info ("%d recipes loaded", g_hash_table_size (self->recipes));
-                g_info ("%d chefs loaded", g_hash_table_size (self->chefs));
-
-                return;
-        }
-
         /* First load preinstalled data */
         if (!load_recipes (self, data_dir, TRUE))
                 load_recipes (self, uninstalled_dir, TRUE);


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