bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/misc/entrance.git/commit/?id=cfb822dbcbb2bfb03bf5a6303c736d85b11705b3

commit cfb822dbcbb2bfb03bf5a6303c736d85b11705b3
Author: Marcel Hollerbach <marcel.hollerb...@stzedn.de>
Date:   Wed Apr 2 12:27:41 2014 +0200

    entrance: Delete the pools if there are new ones !
---
 src/bin/entrance_gui.c | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/src/bin/entrance_gui.c b/src/bin/entrance_gui.c
index c137afd..423f640 100755
--- a/src/bin/entrance_gui.c
+++ b/src/bin/entrance_gui.c
@@ -458,9 +458,28 @@ entrance_gui_xsessions_get(void)
 void
 entrance_gui_conf_set(const Entrance_Conf_Gui_Event *conf)
 {
-   _gui->background_pool = conf->background_pool;
-   _gui->icon_pool = conf->icon_pool;
-   //TODO free the pool if there was one before!
+  if (_gui->background_pool)
+     {
+        Entrance_Image *img;
+        EINA_LIST_FREE(_gui->background_pool, img)
+          {
+             eina_stringshare_del(img->path);
+             eina_stringshare_del(img->group);
+             free(img);
+          }
+        _gui->background_pool = conf->background_pool;
+     }
+   if (_gui->icon_pool)
+     {
+        Entrance_Image *img;
+        EINA_LIST_FREE(_gui->icon_pool, img)
+          {
+             eina_stringshare_del(img->path);
+             eina_stringshare_del(img->group);
+             free(img);
+          }
+        _gui->icon_pool = conf->icon_pool;
+     }
    if (_gui->bg.path != conf->bg.path)
      {
         if ((conf->bg.path) && (*conf->bg.path))

-- 


Reply via email to