efl_ui_layout: Eina_Error type has been modified to work correctly. 25/202025/1
authorTaehyub Kim <taehyub.kim@samsung.com>
Fri, 22 Mar 2019 03:38:44 +0000 (12:38 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Fri, 22 Mar 2019 03:44:50 +0000 (12:44 +0900)
Summary:
fix Eina_Error type calculation in _efl_ui_layout_base_efl_ui_widget_theme_apply() to behave as before.

@fix

Test Plan: run elementary_test for all widgets

Reviewers: #reviewers, Jaehyun_Cho, Hermet

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8443

Change-Id: Icce083a8785842972ac549519128775c880e292f

src/lib/elementary/efl_ui_layout.c

index 066c65d..7fd57c8 100644 (file)
@@ -554,13 +554,20 @@ _efl_ui_layout_theme_internal(Eo *obj, Efl_Ui_Layout_Data *sd)
 EOLIAN static Eina_Error
 _efl_ui_layout_base_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Layout_Data *sd)
 {
-   Eina_Error theme_apply_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
+   Eina_Error theme_apply_ret, theme_apply_internal_ret;
 
    theme_apply_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
    if (theme_apply_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
 
-   theme_apply_ret &= _efl_ui_layout_theme_internal(obj, sd);
-   return theme_apply_ret;
+   theme_apply_internal_ret = _efl_ui_layout_theme_internal(obj, sd);
+   if (theme_apply_internal_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC)
+     return EFL_UI_THEME_APPLY_ERROR_GENERIC;
+
+   if ((theme_apply_ret == EFL_UI_THEME_APPLY_ERROR_DEFAULT) ||
+       (theme_apply_internal_ret == EFL_UI_THEME_APPLY_ERROR_DEFAULT))
+     return EFL_UI_THEME_APPLY_ERROR_DEFAULT;
+
+   return EFL_UI_THEME_APPLY_ERROR_NONE;
 }
 
 EOLIAN static Eina_Bool