elm: print the error message inside elm_widget_sub_object_add().
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Wed, 3 Apr 2013 02:28:53 +0000 (11:28 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Wed, 3 Apr 2013 02:28:53 +0000 (11:28 +0900)
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.

66 files changed:
src/lib/elc_ctxpopup.c
src/lib/elc_fileselector.c
src/lib/elc_fileselector_button.c
src/lib/elc_fileselector_entry.c
src/lib/elc_hoversel.c
src/lib/elc_multibuttonentry.c
src/lib/elc_naviframe.c
src/lib/elc_player.c
src/lib/elc_popup.c
src/lib/elm_access.c
src/lib/elm_actionslider.c
src/lib/elm_bg.c
src/lib/elm_box.c
src/lib/elm_bubble.c
src/lib/elm_button.c
src/lib/elm_calendar.c
src/lib/elm_check.c
src/lib/elm_clock.c
src/lib/elm_colorselector.c
src/lib/elm_conform.c
src/lib/elm_datetime.c
src/lib/elm_dayselector.c
src/lib/elm_diskselector.c
src/lib/elm_entry.c
src/lib/elm_flip.c
src/lib/elm_flipselector.c
src/lib/elm_frame.c
src/lib/elm_gengrid.c
src/lib/elm_genlist.c
src/lib/elm_gesture_layer.c
src/lib/elm_glview.c
src/lib/elm_grid.c
src/lib/elm_hover.c
src/lib/elm_icon.c
src/lib/elm_image.c
src/lib/elm_index.c
src/lib/elm_inwin.c
src/lib/elm_label.c
src/lib/elm_layout.c
src/lib/elm_list.c
src/lib/elm_map.c
src/lib/elm_mapbuf.c
src/lib/elm_menu.c
src/lib/elm_notify.c
src/lib/elm_panel.c
src/lib/elm_panes.c
src/lib/elm_photocam.c
src/lib/elm_plug.c
src/lib/elm_prefs.c
src/lib/elm_progressbar.c
src/lib/elm_radio.c
src/lib/elm_route.c
src/lib/elm_scroller.c
src/lib/elm_segment_control.c
src/lib/elm_separator.c
src/lib/elm_slider.c
src/lib/elm_slideshow.c
src/lib/elm_spinner.c
src/lib/elm_table.c
src/lib/elm_thumb.c
src/lib/elm_toolbar.c
src/lib/elm_video.c
src/lib/elm_web.c
src/lib/elm_web2.c
src/lib/elm_widget.c
src/lib/elm_win.c

index d67a894..2662a01 100644 (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
index 68baa04..f1fecf9 100644 (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
index de244e9..549d75a 100644 (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
index db06356..b3a57f2 100644 (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
index 3c5caa4..bc9faa4 100644 (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
index 81763e3..82d672f 100644 (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 *
index e2410f4..1943780 100644 (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
index 2e6257a..7fe372e 100644 (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
index 045b9ac..74b3ff3 100644 (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!");
index 5c170fa..a672bee 100644 (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 *
index 3aa218a..ee7a9bf 100644 (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
index 7accd31..6260224 100644 (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;
index 61efce4..9e8dfc7 100644 (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
index 7a651da..3af00fb 100644 (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
index ec30cba..869b110 100644 (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", "",
index de9a8ad..b7d4287 100644 (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
index 2558c4e..9f07db3 100644 (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
index 37a50f3..9b7a4ba 100644 (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
index 02c809a..9321ca3 100644 (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
index 76fe7e4..aa5ef14 100644 (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;
 
index 12724d2..663220e 100644 (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 *
index ded2350..5d61b4d 100644 (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
index 69aef04..bf52f0c 100644 (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
index 253a3fc..aa16c4d 100644 (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
index 223ad51..adf3024 100644 (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
index daecc9f..e23cc23 100644 (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
index 4ad00eb..9d0875d 100644 (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
index 57b8d78..dd1d789 100644 (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
index 47c05db..d9317c3 100644 (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
index 2349739..c19e498 100644 (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
index 29ed414..e181b78 100644 (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 *
index d456305..e1a22b3 100644 (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
index 92e058d..5f63480 100644 (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
index 2075ce3..ef04191 100644 (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
index 4cf3bb8..535e50c 100644 (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
index dec1694..92c7020 100644 (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
index 5561697..8846878 100644 (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
index 90deac4..2616697 100644 (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;
index 06a7b6f..4049bd5 100644 (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
index 382db09..f9bfcdd 100644 (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
index cb7121a..99de4b9 100644 (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
index 7f2598a..3a6157d 100644 (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
index 2dcccc4..c42e3d0 100644 (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);
index 365fd62..ccc036a 100644 (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
index 10760e6..dd12461 100644 (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
index bb91377..ee9aabc 100644 (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
index 71c386c..e59b66a 100644 (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
index ba259fd..d48a9b9 100644 (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 *
index cb3983e..f235ba2 100644 (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
index 411301a..3cd0bee 100644 (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
index cf507e3..7ebd092 100644 (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
index c7354e9..b6fe1bf 100644 (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
index bfac382..39a581a 100644 (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 */
index ecef2a5..c10a953 100644 (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 *
index 3d28e39..0e1e1a2 100644 (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
index 2878416..cc8d81e 100644 (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
index 58c489c..fcc07a5 100644 (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 *
index db31af2..f0a97d5 100644 (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
index 9975fa8..e159647 100644 (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
index c869e12..7cf9b07 100644 (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
index 3d3d178..36cc59d 100644 (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
index ab6c40b..5e1a7b0 100644 (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
index 1365232..5f52c4d 100644 (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 *
index 8c207cc..3f10601 100644 (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 *
index 7a62a8a..13b5ff2 100644 (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
index e7fe5d7..eeef06e 100644 (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);