summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2012-04-12 15:35:12 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2012-04-12 15:35:12 +0000
commita5f679eec4fc51f85395914e9f2a054ebf3d2741 (patch)
tree0aee975b5fdfd3e61ffb11eb1d7843d119c4efaa /src/lib
parentb28548eabca0369a3a7866c222e3d783ef22bcb1 (diff)
elm elm_widget.c: Print error message when unsupported elm_object_item_part_content_set/unset/get and elm_object_item_part_text_set/get APIs are called.
SVN revision: 70154
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elm_widget.c43
1 files changed, 34 insertions, 9 deletions
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 60d725d5c..7ce02d08e 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -3398,11 +3398,16 @@ _smart_reconfigure(Smart_Data *sd)
3398 3398
3399EAPI void 3399EAPI void
3400_elm_widget_item_content_part_set(Elm_Widget_Item *item, 3400_elm_widget_item_content_part_set(Elm_Widget_Item *item,
3401 const char *part, 3401 const char *part,
3402 Evas_Object *content) 3402 Evas_Object *content)
3403{ 3403{
3404 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); 3404 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
3405 if (!item->content_set_func) return; 3405 if (!item->content_set_func)
3406 {
3407 ERR("%s does not support elm_object_item_part_content_set() API.",
3408 elm_widget_type_get(item->widget));
3409 return;
3410 }
3406 item->content_set_func((Elm_Object_Item *)item, part, content); 3411 item->content_set_func((Elm_Object_Item *)item, part, content);
3407} 3412}
3408 3413
@@ -3411,7 +3416,12 @@ _elm_widget_item_content_part_get(const Elm_Widget_Item *item,
3411 const char *part) 3416 const char *part)
3412{ 3417{
3413 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); 3418 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
3414 if (!item->content_get_func) return NULL; 3419 if (!item->content_get_func)
3420 {
3421 ERR("%s does not support elm_object_item_part_content_get() API.",
3422 elm_widget_type_get(item->widget));
3423 return NULL;
3424 }
3415 return item->content_get_func((Elm_Object_Item *)item, part); 3425 return item->content_get_func((Elm_Object_Item *)item, part);
3416} 3426}
3417 3427
@@ -3420,17 +3430,27 @@ _elm_widget_item_content_part_unset(Elm_Widget_Item *item,
3420 const char *part) 3430 const char *part)
3421{ 3431{
3422 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); 3432 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
3423 if (!item->content_unset_func) return NULL; 3433 if (!item->content_unset_func)
3434 {
3435 ERR("%s does not support elm_object_item_part_content_unset() API.",
3436 elm_widget_type_get(item->widget));
3437 return NULL;
3438 }
3424 return item->content_unset_func((Elm_Object_Item *)item, part); 3439 return item->content_unset_func((Elm_Object_Item *)item, part);
3425} 3440}
3426 3441
3427EAPI void 3442EAPI void
3428_elm_widget_item_text_part_set(Elm_Widget_Item *item, 3443_elm_widget_item_text_part_set(Elm_Widget_Item *item,
3429 const char *part, 3444 const char *part,
3430 const char *label) 3445 const char *label)
3431{ 3446{
3432 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item); 3447 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
3433 if (!item->text_set_func) return; 3448 if (!item->text_set_func)
3449 {
3450 ERR("%s does not support elm_object_item_part_text_set() API.",
3451 elm_widget_type_get(item->widget));
3452 return;
3453 }
3434 item->text_set_func((Elm_Object_Item *)item, part, label); 3454 item->text_set_func((Elm_Object_Item *)item, part, label);
3435} 3455}
3436 3456
@@ -3449,7 +3469,12 @@ _elm_widget_item_text_part_get(const Elm_Widget_Item *item,
3449 const char *part) 3469 const char *part)
3450{ 3470{
3451 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL); 3471 ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
3452 if (!item->text_get_func) return NULL; 3472 if (!item->text_get_func)
3473 {
3474 ERR("%s does not support elm_object_item_part_text_get() API.",
3475 elm_widget_type_get(item->widget));
3476 return NULL;
3477 }
3453 return item->text_get_func((Elm_Object_Item *)item, part); 3478 return item->text_get_func((Elm_Object_Item *)item, part);
3454} 3479}
3455 3480