and handle null/default theme stuff

SVN revision: 56045
This commit is contained in:
Carsten Haitzler 2011-01-11 09:40:03 +00:00
parent bbb3cea0ef
commit 1dd7415d72
1 changed files with 6 additions and 4 deletions

View File

@ -482,20 +482,22 @@ elm_widget_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force)
Elm_Theme *th2, *thdef;
API_ENTRY return;
thdef = elm_theme_default_get();
if (!th) th = thdef;
if (!force)
{
th2 = sd->theme;
thdef = elm_theme_default_get();
if (!th2) th2 = thdef;
while (th2)
{
if (th2 == th)
{
force = EINA_TRUE;
break;
force = EINA_TRUE;
break;
}
th2 = th->ref_theme;
if (th2 == thdef) break;
th2 = th2->ref_theme;
if (!th2) th2 = thdef;
}
}
if (!force) return;