elm_entry: remove warning during construct
authorSungtaek Hong <sth253.hong@samsung.com>
Wed, 6 Dec 2017 08:33:50 +0000 (17:33 +0900)
committerSungtaek Hong <sth253.hong@samsung.com>
Fri, 8 Dec 2017 07:02:24 +0000 (16:02 +0900)
Summary:
elm_layout_theme_set calls theme_apply, which means
 some of the components might not be initialized.

Test Plan: Run elementary_test->check no more ERR shown.

Reviewers: jpeg, woohyun

Subscribers: cedric

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

src/lib/elementary/elm_entry.c

index 3d7f23b..b48c4a9 100644 (file)
@@ -3676,6 +3676,8 @@ _elm_entry_efl_canvas_group_group_add(Eo *obj, Elm_Entry_Data *priv)
 {
    ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
 
+   if (!elm_widget_theme_klass_get(obj))
+     elm_widget_theme_klass_set(obj, "entry");
    efl_canvas_group_add(efl_super(obj, MY_CLASS));
    elm_widget_sub_object_parent_add(obj);
 
@@ -3695,7 +3697,10 @@ _elm_entry_efl_canvas_group_group_add(Eo *obj, Elm_Entry_Data *priv)
                        _dnd_pos_cb, NULL,
                        _dnd_drop_cb, NULL);
 
-   if (!elm_layout_theme_set(obj, "entry", "base", elm_widget_style_get(obj)))
+   if (!elm_widget_theme_object_set(obj, wd->resize_obj,
+                                       elm_widget_theme_klass_get(obj),
+                                       elm_widget_theme_element_get(obj),
+                                       elm_widget_theme_style_get(obj)))
      CRI("Failed to set layout!");
 
    priv->hit_rect = evas_object_rectangle_add(evas_object_evas_get(obj));