rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=9b1b8701c00aec252aba4e39dee43b2515f40ce1

commit 9b1b8701c00aec252aba4e39dee43b2515f40ce1
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Wed Feb 3 16:22:18 2016 +0000

    tab_home_open: delete recent if it is not found in filesystem
    
    delete on start and after adding new project
---
 src/bin/config/config.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/bin/config/config.c b/src/bin/config/config.c
index a42b42d..ecca51e 100644
--- a/src/bin/config/config.c
+++ b/src/bin/config/config.c
@@ -75,8 +75,12 @@ config_recent_add(const char *name, const char *path)
    assert(path != NULL);
 
    EINA_LIST_FOREACH_SAFE(config->recents, l, l_n, r)
-      if (!strcmp(path, r->path))
-        config->recents = eina_list_remove_list(config->recents, l);
+     {
+        if (!strcmp(path, r->path))
+          config->recents = eina_list_remove_list(config->recents, l);
+        if (!ecore_file_exists(r->path))
+          config->recents = eina_list_remove(config->recents, r);
+     }
 
    if (eina_list_count(config->recents) > 9)
      config->recents = eina_list_remove_list(config->recents, 
eina_list_last(config->recents));
@@ -401,6 +405,19 @@ _config_default_new(void)
    return conf;
 }
 
+static void
+_update_recents(Config *conf)
+{
+   Recent *r;
+   Eina_List *l, *l_n;
+
+   EINA_LIST_FOREACH_SAFE(conf->recents, l, l_n, r)
+     {
+        if (!ecore_file_exists(r->path))
+          conf->recents = eina_list_remove(conf->recents, r);
+     }
+}
+
 void
 config_load(void)
 {
@@ -420,6 +437,8 @@ config_load(void)
 
    profile_load(config->profile);
 
+   _update_recents(config);
+
    shortcuts_profile_load(profile_get());
 #ifdef HAVE_ENVENTOR
    enventor_object_profile_load(ap.enventor, profile_get());

-- 


Reply via email to