entrance: simplify pool code

This commit is contained in:
Michaël Bouchaud (yoz) 2014-05-13 17:35:35 +02:00
parent 6b30bbe629
commit f3bfb371ce
1 changed files with 14 additions and 21 deletions

View File

@ -458,30 +458,23 @@ entrance_gui_xsessions_get(void)
void void
entrance_gui_conf_set(const Entrance_Conf_Gui_Event *conf) entrance_gui_conf_set(const Entrance_Conf_Gui_Event *conf)
{ {
if (_gui->background_pool && conf->background_pool) Entrance_Image *img;
EINA_LIST_FREE(_gui->background_pool, img)
{ {
Entrance_Image *img; eina_stringshare_del(img->path);
EINA_LIST_FREE(_gui->background_pool, img) eina_stringshare_del(img->group);
{ free(img);
eina_stringshare_del(img->path); }
eina_stringshare_del(img->group); _gui->background_pool = conf->background_pool;
free(img);
} EINA_LIST_FREE(_gui->icon_pool, img)
}
if (conf->background_pool)
_gui->background_pool = conf->background_pool;
if (_gui->icon_pool && conf->icon_pool)
{ {
Entrance_Image *img; eina_stringshare_del(img->path);
EINA_LIST_FREE(_gui->icon_pool, img) eina_stringshare_del(img->group);
{ free(img);
eina_stringshare_del(img->path);
eina_stringshare_del(img->group);
free(img);
}
} }
if (conf->icon_pool) _gui->icon_pool = conf->icon_pool;
_gui->icon_pool = conf->icon_pool;
if (_gui->bg.path != conf->bg.path) if (_gui->bg.path != conf->bg.path)
{ {
if ((conf->bg.path) && (*conf->bg.path)) if ((conf->bg.path) && (*conf->bg.path))