elementary/widget,theme - simpler code.

This commit is contained in:
ChunEon Park 2013-02-26 13:46:27 +09:00
parent efe3f7c6b6
commit 74559f5547
3 changed files with 9 additions and 13 deletions

View File

@ -1018,10 +1018,6 @@
* Popup is now a focusable object.
2013-02-15 ChunEon Park (Hermet)
* support naviframe, button, label orientation mode.
2013-02-16 Paulo C. A. Cavalcanti Jr
* Fix elm_config to properly check file type.

View File

@ -230,10 +230,9 @@ _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, con
{
Elm_Theme *th = NULL;
void *test;
int ret;
if (parent) th = elm_widget_theme_get(parent);
ret = _elm_theme_set(th, o, clas, group, style);
if (!_elm_theme_set(th, o, clas, group, style)) return EINA_FALSE;
test = evas_object_data_get(o, "edje,theme,watcher");
if (!test)
@ -242,7 +241,7 @@ _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, con
_elm_theme_reload, NULL);
evas_object_data_set(o, "edje,theme,watcher", (void*) -1);
}
return ret;
return EINA_TRUE;
}
/* only issued by elm_icon.c */

View File

@ -4073,16 +4073,17 @@ _elm_widget_theme_object_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
const char *wstyle = va_arg(*list, const char *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
Elm_Widget_Smart_Data *sd = _pd;
int ret2;
ret2 = _elm_theme_object_set(obj, edj, wname, welement, wstyle);
if (ret2 && (sd->orient_mode != -1))
if (!_elm_theme_object_set(obj, edj, wname, welement, wstyle))
{
if (ret) *ret = EINA_FALSE;
}
if (sd->orient_mode != -1)
{
char buf[128];
snprintf(buf, sizeof(buf), "elm,state,orient,%d", sd->orient_mode);
elm_object_signal_emit(obj, buf, "elm");
if (ret) *ret = EINA_TRUE;
return;
}
if (ret) *ret = EINA_FALSE;
@ -4521,7 +4522,7 @@ _elm_widget_orientation_set(Eo *obj __UNUSED__, void *_pd, va_list *list)
EINA_LIST_FOREACH (sd->subobjs, l, child)
elm_widget_orientation_set(child, orient_mode);
if (sd->orient_mode != -1)
if (orient_mode != -1)
{
char buf[128];
snprintf(buf, sizeof(buf), "elm,state,orient,%d", orient_mode);