elm elm_widget.c: Print error message when unsupported elm_object_item_part_content_s...
authorseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 Apr 2012 15:35:12 +0000 (15:35 +0000)
committerseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 Apr 2012 15:35:12 +0000 (15:35 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@70154 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_widget.c

index 60d725d..7ce02d0 100644 (file)
@@ -3398,11 +3398,16 @@ _smart_reconfigure(Smart_Data *sd)
 
 EAPI void
 _elm_widget_item_content_part_set(Elm_Widget_Item *item,
-                                 const char *part,
-                                 Evas_Object *content)
+                                  const char *part,
+                                  Evas_Object *content)
 {
    ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
-   if (!item->content_set_func) return;
+   if (!item->content_set_func)
+     {
+        ERR("%s does not support elm_object_item_part_content_set() API.",
+            elm_widget_type_get(item->widget));
+        return;
+     }
    item->content_set_func((Elm_Object_Item *)item, part, content);
 }
 
@@ -3411,7 +3416,12 @@ _elm_widget_item_content_part_get(const Elm_Widget_Item *item,
                                   const char *part)
 {
    ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
-   if (!item->content_get_func) return NULL;
+   if (!item->content_get_func)
+     {
+        ERR("%s does not support elm_object_item_part_content_get() API.",
+            elm_widget_type_get(item->widget));
+        return NULL;
+     }
    return item->content_get_func((Elm_Object_Item *)item, part);
 }
 
@@ -3420,17 +3430,27 @@ _elm_widget_item_content_part_unset(Elm_Widget_Item *item,
                                     const char *part)
 {
    ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
-   if (!item->content_unset_func) return NULL;
+   if (!item->content_unset_func)
+     {
+        ERR("%s does not support elm_object_item_part_content_unset() API.",
+            elm_widget_type_get(item->widget));
+           return NULL;
+        }
    return item->content_unset_func((Elm_Object_Item *)item, part);
 }
 
 EAPI void
 _elm_widget_item_text_part_set(Elm_Widget_Item *item,
-                              const char *part,
-                              const char *label)
+                               const char *part,
+                               const char *label)
 {
    ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
-   if (!item->text_set_func) return;
+   if (!item->text_set_func)
+     {
+        ERR("%s does not support elm_object_item_part_text_set() API.",
+            elm_widget_type_get(item->widget));
+        return;
+     }
    item->text_set_func((Elm_Object_Item *)item, part, label);
 }
 
@@ -3449,7 +3469,12 @@ _elm_widget_item_text_part_get(const Elm_Widget_Item *item,
                                const char *part)
 {
    ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
-   if (!item->text_get_func) return NULL;
+   if (!item->text_get_func)
+     {
+        ERR("%s does not support elm_object_item_part_text_get() API.",
+            elm_widget_type_get(item->widget));
+        return NULL;
+     }
    return item->text_get_func((Elm_Object_Item *)item, part);
 }