forked from enlightenment/efl
elm_theme.c: ELM_SAFE_FREE adoption.
I splited ELM_SAFE_FREE refactoring patches. One commit per each file as recommended. For the detail, please refer 3072dab12f12fe83fb5a628d15efd5cded11787f.
This commit is contained in:
parent
c2747996da
commit
90f4afc682
|
@ -23,21 +23,10 @@ _elm_theme_clear(Elm_Theme *th)
|
||||||
eina_stringshare_del(p);
|
eina_stringshare_del(p);
|
||||||
EINA_LIST_FREE(th->extension, p)
|
EINA_LIST_FREE(th->extension, p)
|
||||||
eina_stringshare_del(p);
|
eina_stringshare_del(p);
|
||||||
if (th->cache)
|
|
||||||
{
|
ELM_SAFE_FREE(th->cache, eina_hash_free);
|
||||||
eina_hash_free(th->cache);
|
ELM_SAFE_FREE(th->cache_data, eina_hash_free);
|
||||||
th->cache = NULL;
|
ELM_SAFE_FREE(th->theme, eina_stringshare_del);
|
||||||
}
|
|
||||||
if (th->cache_data)
|
|
||||||
{
|
|
||||||
eina_hash_free(th->cache_data);
|
|
||||||
th->cache_data = NULL;
|
|
||||||
}
|
|
||||||
if (th->theme)
|
|
||||||
{
|
|
||||||
eina_stringshare_del(th->theme);
|
|
||||||
th->theme = NULL;
|
|
||||||
}
|
|
||||||
if (th->ref_theme)
|
if (th->ref_theme)
|
||||||
{
|
{
|
||||||
th->ref_theme->referrers =
|
th->ref_theme->referrers =
|
||||||
|
@ -555,11 +544,7 @@ elm_theme_set(Elm_Theme *th, const char *theme)
|
||||||
{
|
{
|
||||||
if (!th) th = &(theme_default);
|
if (!th) th = &(theme_default);
|
||||||
_elm_theme_parse(th, theme);
|
_elm_theme_parse(th, theme);
|
||||||
if (th->theme)
|
ELM_SAFE_FREE(th->theme, eina_stringshare_del);
|
||||||
{
|
|
||||||
eina_stringshare_del(th->theme);
|
|
||||||
th->theme = NULL;
|
|
||||||
}
|
|
||||||
elm_theme_flush(th);
|
elm_theme_flush(th);
|
||||||
if (th == &(theme_default))
|
if (th == &(theme_default))
|
||||||
eina_stringshare_replace(&_elm_config->theme, theme);
|
eina_stringshare_replace(&_elm_config->theme, theme);
|
||||||
|
|
Loading…
Reference in New Issue