widget: add _elm_widget_style_set_internal function to internal usage.
authorJinYong Park <j4939.park@samsung.com>
Fri, 23 Dec 2016 06:45:50 +0000 (15:45 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 05:37:11 +0000 (14:37 +0900)
For some composite widgets, using "elm_widget_style_set" function
check its subobject theme apply result and it cause problem which can't set theme excatly.
To avoid this problem, internal style set function don't check sub objects theme apply result.

Change-Id: I84588263aa2936c7d1696fbfc46d3d509e5d8189
Signed-off-by: Jinyong Park <j4939.park@samsung.com>
src/lib/elm_priv.h
src/lib/elm_widget.c

index eae5ffa17162e55c0dbadfb746fbe8fad9f50f20..ec9c50ef1301e73d7c0289f3b21922ede277ba47 100644 (file)
@@ -399,6 +399,13 @@ void                 _elm_win_focus_reconfigure(void);
 
 Ecore_X_Window       _elm_ee_xwin_get(const Ecore_Evas *ee);
 
+/* TIZEN_ONLY(20161223): add widget style set furnction for internal usage
+                         this function is same with elm_widget_style_set
+                         but it doesn't apply sub object's theme */
+Elm_Theme_Apply      _elm_widget_style_set_internal(Evas_Object *obj,
+                                                    const char *style);
+/* END */
+
 //TIZEN_ONLY(20161108): add layout theme set function to get fallback state for internal usage
 Elm_Theme_Apply      _elm_layout_theme_set_internal(Evas_Object *obj,
                                                     const char *klass,
index 0c0205a436739975651f587ead66bda8031ca635..14219f225937fde5103784c7978321fdf01b8d91 100644 (file)
@@ -3906,6 +3906,38 @@ _elm_widget_style_set(Eo *obj, Elm_Widget_Smart_Data *sd, const char *style)
    return ELM_THEME_APPLY_SUCCESS;
 }
 
+/* TIZEN_ONLY(20161223): add widget style set furnction for internal usage
+                         this function is same with elm_widget_style_set
+                         but it doesn't apply sub object's theme */
+Elm_Theme_Apply
+_elm_widget_style_set_internal(Evas_Object *obj, const char *style)
+{
+   Elm_Theme_Apply ret = ELM_THEME_APPLY_SUCCESS;
+
+   API_ENTRY return ELM_THEME_APPLY_FAILED;
+
+   if (eina_stringshare_replace(&sd->style, style))
+     {
+        const Eina_List *l;
+        Elm_Tooltip *tt;
+        Elm_Cursor *cur;
+
+        if (sd->hover_obj) ret &= elm_widget_theme(sd->hover_obj);
+
+        EINA_LIST_FOREACH(sd->tooltips, l, tt)
+          elm_tooltip_theme(tt);
+        EINA_LIST_FOREACH(sd->cursors, l, cur)
+          elm_cursor_theme(cur);
+
+        Elm_Theme_Apply ret2 = ELM_THEME_APPLY_FAILED;
+        eo_do(obj, ret2 = elm_obj_widget_theme_apply());
+        ret &= ret2;
+     }
+
+   return ret;
+}
+/* END */
+
 EOLIAN static const char*
 _elm_widget_style_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
 {