elm: Don't do anything before construction
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 7 Nov 2017 05:26:37 +0000 (14:26 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 7 Nov 2017 05:43:22 +0000 (14:43 +0900)
Obviously ui.win is still the ugly exception.

src/lib/elementary/efl_ui_focus_layer.c
src/lib/elementary/efl_ui_focus_manager_calc.c
src/lib/elementary/efl_ui_focus_manager_sub.c
src/lib/elementary/efl_ui_internal_text_interactive.c
src/lib/elementary/efl_ui_text.c
src/lib/elementary/efl_ui_text_async.eo

index 9f9c9bc..eee2405 100644 (file)
@@ -73,14 +73,12 @@ _efl_ui_focus_layer_elm_widget_focus_state_apply(Eo *obj EINA_UNUSED, Efl_Ui_Foc
 EOLIAN static Efl_Object*
 _efl_ui_focus_layer_efl_object_constructor(Eo *obj, Efl_Ui_Focus_Layer_Data *pd)
 {
+   obj = efl_constructor(efl_super(obj, MY_CLASS));
    pd->manager = efl_ui_widget_focus_manager_create(obj, obj);
-
    efl_composite_attach(obj, pd->manager);
-
    pd->enable_on_visible = EINA_TRUE;
    pd->cycle = EINA_TRUE;
-
-   return efl_constructor(efl_super(obj, MY_CLASS));
+   return obj;
 }
 
 EOLIAN static void
index 334037e..4d54a95 100644 (file)
@@ -909,8 +909,9 @@ _free_node(void *data)
 EOLIAN static Efl_Object *
 _efl_ui_focus_manager_calc_efl_object_constructor(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd)
 {
+   obj = efl_constructor(efl_super(obj, MY_CLASS));
    pd->node_hash = eina_hash_pointer_new(_free_node);
-   return efl_constructor(efl_super(obj, MY_CLASS));
+   return obj;
 }
 
 EOLIAN static Efl_Object *
index 86fdcea..e0ea26f 100644 (file)
@@ -192,11 +192,10 @@ EFL_CALLBACKS_ARRAY_DEFINE(self_manager,
 EOLIAN static Efl_Object*
 _efl_ui_focus_manager_sub_efl_object_constructor(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd EINA_UNUSED)
 {
+   obj = efl_constructor(efl_super(obj, MY_CLASS));
    efl_event_callback_array_add(obj, self_manager(), obj);
-
    _flush_manager(obj, pd);
-
-   return efl_constructor(efl_super(obj, MY_CLASS));
+   return obj;
 }
 
 EOLIAN static void
index fd38f8d..002a4dd 100644 (file)
@@ -1312,9 +1312,10 @@ _mouse_move_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, vo
 EOLIAN static Efl_Object *
 _efl_ui_internal_text_interactive_efl_object_constructor(Eo *obj, Efl_Ui_Internal_Text_Interactive_Data *en)
 {
+   obj = efl_constructor(efl_super(obj, MY_CLASS));
    en->select_allow = EINA_TRUE;
    en->editable = EINA_TRUE;
-   return efl_constructor(efl_super(obj, MY_CLASS));
+   return obj;
 }
 
 EOLIAN static Efl_Object *
index 505181a..c1b9bd7 100644 (file)
@@ -5397,13 +5397,6 @@ ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX)
 
 #include "efl_ui_text.eo.c"
 
-EOLIAN static Eo *
-_efl_ui_text_async_efl_object_constructor(Eo *obj, void *_pd EINA_UNUSED)
-{
-   obj = efl_constructor(efl_super(obj, EFL_UI_TEXT_ASYNC_CLASS));
-   return obj;
-}
-
 EOLIAN static void
 _efl_ui_text_async_efl_canvas_group_group_add(Eo *obj, void *_pd EINA_UNUSED)
 {
index 52061e5..0f57a87 100644 (file)
@@ -6,6 +6,6 @@ class Efl.Ui.Text_Async (Efl.Ui.Text)
    ]]
    data: null;
    implements {
-      Efl.Object.constructor;
+      //Efl.Object.constructor;
    }
 }