From 932cd9b97b4f20a74dbbc08f3420acf5b40baa08 Mon Sep 17 00:00:00 2001 From: billiob Date: Thu, 17 Nov 2011 21:02:43 +0000 Subject: [PATCH] elm: change elm_object_item_text_part_set/get to elm_object_item_part_text_set/get git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@65350 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/test_naviframe.c | 2 +- src/lib/Elementary.h.in | 34 +++++++++++++++++++++++++++++----- src/lib/elm_main.c | 14 ++++++++++++++ 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/src/bin/test_naviframe.c b/src/bin/test_naviframe.c index 57d4664..8e5aa2e 100644 --- a/src/bin/test_naviframe.c +++ b/src/bin/test_naviframe.c @@ -156,7 +156,7 @@ _page2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) content = _content_new(nf, img2); it = elm_naviframe_item_push(nf, "Page 2", NULL, bt, content, NULL); - elm_object_item_text_part_set(it, "subtitle", "Here is sub-title part!"); + elm_object_item_part_text_set(it, "subtitle", "Here is sub-title part!"); } void diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 7be48d4..eb64d12 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -1228,12 +1228,25 @@ extern "C" { * @param label The new text of the label * * @note Elementary object items may have many labels + * @deprecated Use elm_object_item_part_text_set instead. + * @ingroup General + */ + WILL_DEPRECATE EAPI void elm_object_item_text_part_set(Elm_Object_Item *it, const char *part, const char *label); + + /** + * Set a label of an object item + * + * @param it The Elementary object item + * @param part The text part name to set (NULL for the default label) + * @param label The new text of the label + * + * @note Elementary object items may have many labels * * @ingroup General */ - EAPI void elm_object_item_text_part_set(Elm_Object_Item *it, const char *part, const char *label); + EAPI void elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label); -#define elm_object_item_text_set(it, label) elm_object_item_text_part_set((it), NULL, (label)) +#define elm_object_item_text_set(it, label) elm_object_item_part_text_set((it), NULL, (label)) /** * Get a label of an object item @@ -1243,10 +1256,22 @@ extern "C" { * @return text of the label or NULL for any error * * @note Elementary object items may have many labels + * @deprecated Use elm_object_item_part_text_get instead. + * @ingroup General + */ + WILL_DEPRECATE EAPI const char *elm_object_item_text_part_get(const Elm_Object_Item *it, const char *part); + /** + * Get a label of an object item + * + * @param it The Elementary object item + * @param part The text part name to get (NULL for the default label) + * @return text of the label or NULL for any error + * + * @note Elementary object items may have many labels * * @ingroup General */ - EAPI const char *elm_object_item_text_part_get(const Elm_Object_Item *it, const char *part); + EAPI const char *elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part); /** * Set the text to read out when in accessibility mode @@ -1268,8 +1293,7 @@ extern "C" { */ EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt); - -#define elm_object_item_text_get(it) elm_object_item_text_part_get((it), NULL) +#define elm_object_item_text_get(it) elm_object_item_part_text_get((it), NULL) /** * Set the text to read out when in accessibility mode diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c index c7df1a4..230f68b 100644 --- a/src/lib/elm_main.c +++ b/src/lib/elm_main.c @@ -2225,12 +2225,26 @@ elm_object_item_text_part_set(Elm_Object_Item *it, elm_widget_item_text_part_set(it, part, label); } +EAPI void +elm_object_item_part_text_set(Elm_Object_Item *it, + const char *part, + const char *label) +{ + _elm_widget_item_text_part_set((Elm_Widget_Item *) it, part, label); +} + EAPI const char * elm_object_item_text_part_get(const Elm_Object_Item *it, const char *part) { return elm_widget_item_text_part_get(it, part); } +EAPI const char * +elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part) +{ + return _elm_widget_item_text_part_get((Elm_Widget_Item *) it, part); +} + EAPI void * elm_object_item_data_get(const Elm_Object_Item *it) { -- 2.7.4