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.
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
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
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
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
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
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 *
_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
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
(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!");
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 *
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
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;
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
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
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", "",
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
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
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
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
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;
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 *
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
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
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
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
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
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
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
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
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
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 *
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
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
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
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
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
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
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;
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))
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;
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;
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;
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;
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;
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
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
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
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
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);
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
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
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
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
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 *
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
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
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
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
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 */
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 *
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
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
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 *
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
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
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
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
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
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 *
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 *
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
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);