elm: print the error message inside elm_widget_sub_object_add().

1. Do not need to print the same error message from all the widget codes.
2. Even though elm_widget_sub_object_add() can be used internally, there should be no error message at all.
   Elm devs should fix it beforehand.
   So it looks ok to print the error message in elm_widget_sub_object_add() to force elm devs to fix it.
3. Got additional code cleanups.
This commit is contained in:
Daniel Juyung Seo 2013-04-03 11:28:53 +09:00
parent 615d05bfe5
commit 74b3eed5fd
66 changed files with 73 additions and 183 deletions

View File

@ -1153,8 +1153,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -914,9 +914,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -218,9 +218,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -417,8 +417,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -264,9 +264,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -1674,8 +1674,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Evas_Object *

View File

@ -1283,8 +1283,7 @@ _elm_naviframe_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
_on_obj_size_hints_changed, obj);
elm_widget_can_focus_set(obj, EINA_TRUE);
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
static Eina_Bool

View File

@ -580,9 +580,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
#else
eo_error_set(obj);
#endif

View File

@ -1453,8 +1453,7 @@ _elm_popup_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
(wd->resize_obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set
(wd->resize_obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
if (!elm_layout_theme_set(obj, "popup", "base", elm_widget_style_get(obj)))
CRITICAL("Failed to set layout!");

View File

@ -918,9 +918,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Evas_Object *

View File

@ -441,9 +441,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -103,10 +103,7 @@ _elm_bg_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
elm_widget_can_focus_set(obj, EINA_FALSE);
priv->option = ELM_BG_OPTION_SCALE;

View File

@ -462,8 +462,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -250,9 +250,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -294,9 +294,7 @@ _elm_button_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
edje_object_signal_callback_add
(wd->resize_obj, "elm,action,click", "",

View File

@ -1181,9 +1181,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -345,9 +345,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -830,9 +830,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
static void

View File

@ -1772,9 +1772,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -985,9 +985,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
Elm_Conformant_Smart_Data *sd = _pd;

View File

@ -850,9 +850,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI const char *

View File

@ -473,9 +473,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -1468,9 +1468,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Eina_Bool

View File

@ -3094,9 +3094,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -1871,8 +1871,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Eina_Bool

View File

@ -611,9 +611,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -217,9 +217,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -2534,9 +2534,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -4915,9 +4915,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
static void

View File

@ -3659,8 +3659,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_do(obj, evas_obj_type_set(MY_CLASS_NAME));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Eina_Bool

View File

@ -291,8 +291,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
return;
}
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Evas_GL_API *

View File

@ -176,8 +176,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_do(obj, evas_obj_type_set(MY_CLASS_NAME));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -648,9 +648,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -759,8 +759,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Eina_Bool

View File

@ -1103,8 +1103,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Eina_Bool

View File

@ -1117,8 +1117,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -120,8 +120,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_do(obj, evas_obj_type_set(MY_CLASS_NAME));
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(parent, obj);
}
EAPI void

View File

@ -378,9 +378,7 @@ _elm_label_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
priv->linewrap = ELM_WRAP_NONE;
priv->wrap_w = -1;

View File

@ -797,10 +797,7 @@ _elm_layout_smart_content_set(Eo *obj, void *_pd, va_list *list)
if (content)
{
if (!elm_widget_sub_object_add(obj, content))
{
ERR("could not add %p as sub object of %p", content, obj);
return;
}
return;
if (!edje_object_part_swallow
(wd->resize_obj, part, content))
@ -914,7 +911,6 @@ _elm_layout_smart_box_append(Eo *obj, void *_pd, va_list *list)
if (!elm_widget_sub_object_add(obj, child))
{
ERR("could not add %p as sub object of %p", child, obj);
edje_object_part_box_remove
(wd->resize_obj, part, child);
return;
@ -955,7 +951,6 @@ _elm_layout_smart_box_prepend(Eo *obj, void *_pd, va_list *list)
if (!elm_widget_sub_object_add(obj, child))
{
ERR("could not add %p as sub object of %p", child, obj);
edje_object_part_box_remove
(wd->resize_obj, part, child);
return;
@ -1008,7 +1003,6 @@ _elm_layout_smart_box_insert_before(Eo *obj, void *_pd, va_list *list)
if (!elm_widget_sub_object_add(obj, child))
{
ERR("could not add %p as sub object of %p", child, obj);
edje_object_part_box_remove
(wd->resize_obj, part, child);
return;
@ -1055,7 +1049,6 @@ _elm_layout_smart_box_insert_at(Eo *obj, void *_pd, va_list *list)
if (!elm_widget_sub_object_add(obj, child))
{
ERR("could not add %p as sub object of %p", child, obj);
edje_object_part_box_remove
(wd->resize_obj, part, child);
return;
@ -1212,7 +1205,6 @@ _elm_layout_smart_table_pack(Eo *obj, void *_pd, va_list *list)
if (!elm_widget_sub_object_add(obj, child))
{
ERR("could not add %p as sub object of %p", child, obj);
edje_object_part_table_unpack
(wd->resize_obj, part, child);
return;
@ -2157,8 +2149,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
static void

View File

@ -1755,9 +1755,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -4199,9 +4199,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
#else
eo_error_set(obj);
#endif

View File

@ -266,8 +266,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -678,8 +678,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
elm_menu_parent_set(obj, eo_parent_get(obj));
elm_hover_target_set(sd->hv, sd->location);

View File

@ -486,8 +486,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -414,8 +414,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -228,9 +228,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EINA_DEPRECATED EAPI void

View File

@ -1443,9 +1443,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Evas_Load_Error

View File

@ -124,9 +124,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Evas_Object *

View File

@ -527,10 +527,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_smart_callbacks_descriptions_set(_elm_prefs_smart_callbacks,
NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
static Eina_Bool

View File

@ -312,9 +312,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -334,9 +334,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -189,8 +189,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
#ifdef ELM_EMAP

View File

@ -841,9 +841,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
/* deprecated */

View File

@ -699,9 +699,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Elm_Object_Item *

View File

@ -73,9 +73,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -872,9 +872,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -377,9 +377,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Elm_Object_Item *

View File

@ -805,9 +805,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -236,8 +236,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -636,8 +636,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
Elm_Thumb_Smart_Data *sd = _pd;
sd->obj = obj;
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -2548,9 +2548,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_smart_callbacks, NULL));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI void

View File

@ -308,9 +308,7 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME));
Evas_Object *parent = eo_parent_get(obj);
if (!elm_widget_sub_object_add(parent, obj))
ERR("could not add %p as sub object of %p", obj, parent);
elm_widget_sub_object_add(eo_parent_get(obj), obj);
#else
eo_error_set(obj);
#endif

View File

@ -1223,8 +1223,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_elm_web_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Evas_Object *

View File

@ -143,8 +143,7 @@ _constructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
eo_do(obj,
evas_obj_type_set(MY_CLASS_NAME),
evas_obj_smart_callbacks_descriptions_set(_elm_web_smart_callbacks, NULL));
if (!elm_widget_sub_object_add(eo_parent_get(obj), obj))
ERR("could not add %p as sub object of %p", obj, eo_parent_get(obj));
elm_widget_sub_object_add(eo_parent_get(obj), obj);
}
EAPI Evas_Object *

View File

@ -934,11 +934,16 @@ elm_widget_sub_object_add(Evas_Object *obj,
ELM_WIDGET_CHECK(obj) EINA_FALSE;
EINA_SAFETY_ON_TRUE_RETURN_VAL(obj == sobj, EINA_FALSE);
if (!sobj) return EINA_FALSE;
if (!sobj) goto err;
Eina_Bool ret = EINA_FALSE;
eo_do(obj, elm_wdg_sub_object_add(sobj, &ret));
return ret;
if (ret) return EINA_TRUE;
err:
ERR("could not add %p as sub object of %p", obj, sobj);
return EINA_FALSE;
}
static void

View File

@ -3033,8 +3033,7 @@ _resize_object_add(Eo *obj, void *_pd, va_list *list)
Elm_Win_Smart_Data *sd = _pd;
if (!elm_widget_sub_object_add(obj, subobj))
ERR("could not add %p as sub object of %p", subobj, obj);
elm_widget_sub_object_add(obj, subobj);
if (!evas_object_box_append(sd->box, subobj))
ERR("could not append %p to box", subobj);