forked from enlightenment/efl
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
This commit is contained in:
parent
316a8cd712
commit
528e743c33
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue