From: billiob Date: Wed, 16 Nov 2011 20:17:25 +0000 (+0000) Subject: elm: elm_object_text_part_set/get() is deprecated X-Git-Tag: REL_F_I9500_20111122_1~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a4050b9af8815e262cab104142348b8f14f9cfd;p=framework%2Fuifw%2Felementary.git elm: elm_object_text_part_set/get() is deprecated use elm_object_part_text_set/get(). This change is done so that it matches edje_object_part_text_set/get(). git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@65310 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/doc/examples.dox b/doc/examples.dox index cf183ab..ca77366 100644 --- a/doc/examples.dox +++ b/doc/examples.dox @@ -3073,7 +3073,7 @@ * @until } * * This call elm_layout_data_get() is used to fetch the string based on the key, - * and elm_object_text_part_set() will set the part defined in the theme as + * and elm_object_part_text_set() will set the part defined in the theme as * "example/title" to contain this string. This key "example/title" has nothing * special. It's just an arbitrary convention that we are using in this example. * Every string in this example referencing a part of this theme will be of the diff --git a/doc/widgets/widget_preview_actionslider.c b/doc/widgets/widget_preview_actionslider.c index 0540a1b..14672f6 100644 --- a/doc/widgets/widget_preview_actionslider.c +++ b/doc/widgets/widget_preview_actionslider.c @@ -5,9 +5,9 @@ evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, o); evas_object_show(o); -elm_object_text_part_set(o, "left", "left"); -elm_object_text_part_set(o, "center", "center"); -elm_object_text_part_set(o, "right", "right"); +elm_object_part_text_set(o, "left", "left"); +elm_object_part_text_set(o, "center", "center"); +elm_object_part_text_set(o, "right", "right"); elm_actionslider_indicator_pos_set(o, ELM_ACTIONSLIDER_CENTER); #include "widget_preview_tmpl_foot.c" diff --git a/doc/widgets/widget_preview_layout.c b/doc/widgets/widget_preview_layout.c index 4c2d87a..570c655 100644 --- a/doc/widgets/widget_preview_layout.c +++ b/doc/widgets/widget_preview_layout.c @@ -14,6 +14,6 @@ evas_object_size_hint_min_set(icon, 200, 140); evas_object_show(icon); elm_object_content_part_set(layout, "elm.swallow.content", icon); -elm_object_text_part_set(layout, "elm.text.title", "Layout"); +elm_object_part_text_set(layout, "elm.text.title", "Layout"); #include "widget_preview_tmpl_foot.c" diff --git a/src/bin/config.c b/src/bin/config.c index 92e06d8..9763620 100644 --- a/src/bin/config.c +++ b/src/bin/config.c @@ -2005,7 +2005,7 @@ _status_config_fonts(Evas_Object *win, snprintf(buf, sizeof(buf), "%s/objects/font_preview.edj", elm_app_data_dir_get()); preview = elm_layout_add(win); elm_layout_file_set(preview, buf, "font_preview"); - elm_object_text_part_set(preview, "elm.text", "Preview Text — 我真的会写中文"); + elm_object_part_text_set(preview, "elm.text", "Preview Text — 我真的会写中文"); evas_object_size_hint_weight_set(preview, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(preview, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(preview); diff --git a/src/bin/test_anchorblock.c b/src/bin/test_anchorblock.c index aa27371..fe51eff 100644 --- a/src/bin/test_anchorblock.c +++ b/src/bin/test_anchorblock.c @@ -148,7 +148,7 @@ test_anchorblock(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event bb = elm_bubble_add(win); elm_object_text_set(bb, "Message 3"); - elm_object_text_part_set(bb, "info", "10:32 4/11/2008"); + elm_object_part_text_set(bb, "info", "10:32 4/11/2008"); elm_object_content_part_set(bb, "icon", ic); evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL); evas_object_show(ic); @@ -175,7 +175,7 @@ test_anchorblock(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event bb = elm_bubble_add(win); elm_object_text_set(bb, "Message 2"); - elm_object_text_part_set(bb, "info", "7:16 27/10/2008"); + elm_object_part_text_set(bb, "info", "7:16 27/10/2008"); elm_object_content_part_set(bb, "icon", ic); evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL); evas_object_show(ic); @@ -212,7 +212,7 @@ test_anchorblock(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event bb = elm_bubble_add(win); elm_object_text_set(bb, "Message 1"); - elm_object_text_part_set(bb, "info", "20:47 18/6/2008"); + elm_object_part_text_set(bb, "info", "20:47 18/6/2008"); elm_object_content_part_set(bb, "icon", ic); evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL); evas_object_show(ic); diff --git a/src/bin/test_bubble.c b/src/bin/test_bubble.c index af52928..c4b2cbf 100644 --- a/src/bin/test_bubble.c +++ b/src/bin/test_bubble.c @@ -38,7 +38,7 @@ test_bubble(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info bb = elm_bubble_add(win); elm_object_text_set(bb, "Message 1"); - elm_object_text_part_set(bb, "info", "Corner: bottom_right"); + elm_object_part_text_set(bb, "info", "Corner: bottom_right"); elm_object_content_part_set(bb, "icon", ic); elm_bubble_corner_set(bb, "bottom_right"); evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL); @@ -56,7 +56,7 @@ test_bubble(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info bb = elm_bubble_add(win); elm_object_text_set(bb, "Message 2"); - elm_object_text_part_set(bb, "info", "10:32 4/11/2008"); + elm_object_part_text_set(bb, "info", "10:32 4/11/2008"); evas_object_smart_callback_add(bb, "clicked", _print_clicked, NULL); evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(bb, EVAS_HINT_FILL, EVAS_HINT_FILL); diff --git a/src/bin/test_focus.c b/src/bin/test_focus.c index ed31b56..d964f48 100644 --- a/src/bin/test_focus.c +++ b/src/bin/test_focus.c @@ -103,7 +103,8 @@ test_focus(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info { Evas_Object *tg = elm_check_add(win); elm_object_style_set(tg, "toggle"); - elm_check_states_labels_set(tg, "Yes", "No"); + elm_object_part_text_set(tg, "on", "Yes"); + elm_object_part_text_set(tg, "off", "No"); elm_box_pack_end(bx, tg); my_show(tg); } diff --git a/src/bin/test_layout.c b/src/bin/test_layout.c index 823f86e..e63839b 100644 --- a/src/bin/test_layout.c +++ b/src/bin/test_layout.c @@ -8,7 +8,7 @@ static void _clicked_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) { - elm_object_text_part_set(data, "text", elm_object_text_get(obj)); + elm_object_part_text_set(data, "text", elm_object_text_get(obj)); } void diff --git a/src/bin/test_toggle.c b/src/bin/test_toggle.c index 78f14dd..31a0f70 100644 --- a/src/bin/test_toggle.c +++ b/src/bin/test_toggle.c @@ -34,8 +34,8 @@ test_toggle(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info elm_object_text_set(tg, "Icon sized to toggle"); elm_object_content_part_set(tg, "icon", ic); elm_check_state_set(tg, 1); - elm_object_text_part_set(tg, "on", "Yes"); - elm_object_text_part_set(tg, "off", "No"); + elm_object_part_text_set(tg, "on", "Yes"); + elm_object_part_text_set(tg, "off", "No"); elm_box_pack_end(bx, tg); evas_object_show(tg); evas_object_show(ic); @@ -67,8 +67,8 @@ test_toggle(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info tg = elm_toggle_add(win); elm_object_text_set(tg, "Label Only"); - elm_object_text_part_set(tg, "on", "Big long fun times label"); - elm_object_text_part_set(tg, "off", "Small long happy fun label"); + elm_object_part_text_set(tg, "on", "Big long fun times label"); + elm_object_part_text_set(tg, "off", "Small long happy fun label"); elm_box_pack_end(bx, tg); evas_object_show(tg); diff --git a/src/bin/test_win_inline.c b/src/bin/test_win_inline.c index f7f99be..804a059 100644 --- a/src/bin/test_win_inline.c +++ b/src/bin/test_win_inline.c @@ -54,7 +54,7 @@ fill(Evas_Object *win, Eina_Bool do_bg) bb = elm_bubble_add(win); elm_object_text_set(bb, "Message 3"); - elm_object_text_part_set(bb, "info", "10:32 4/11/2008"); + elm_object_part_text_set(bb, "info", "10:32 4/11/2008"); elm_object_content_part_set(bb, "icon", ic); evas_object_show(ic); evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0); @@ -78,7 +78,7 @@ fill(Evas_Object *win, Eina_Bool do_bg) bb = elm_bubble_add(win); elm_object_text_set(bb, "Message 2"); - elm_object_text_part_set(bb, "info", "7:16 27/10/2008"); + elm_object_part_text_set(bb, "info", "7:16 27/10/2008"); elm_object_content_part_set(bb, "icon", ic); evas_object_show(ic); evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0); @@ -113,7 +113,7 @@ fill(Evas_Object *win, Eina_Bool do_bg) bb = elm_bubble_add(win); elm_object_text_set(bb, "Message 1"); - elm_object_text_part_set(bb, "info", "20:47 18/6/2008"); + elm_object_part_text_set(bb, "info", "20:47 18/6/2008"); elm_object_content_part_set(bb, "icon", ic); evas_object_show(ic); evas_object_size_hint_weight_set(bb, EVAS_HINT_EXPAND, 0.0); diff --git a/src/edje_externals/elm_bubble.c b/src/edje_externals/elm_bubble.c index 7748457..b79b693 100644 --- a/src/edje_externals/elm_bubble.c +++ b/src/edje_externals/elm_bubble.c @@ -21,8 +21,8 @@ external_bubble_state_set(void *data __UNUSED__, Evas_Object *obj, const void *f if (p->label) elm_object_text_set(obj, p->label); if (p->icon) elm_object_content_part_set(obj, "icon", p->icon); - if (p->info) elm_object_text_part_set(obj, "info", p->info); - if (p->content) elm_bubble_content_set(obj, p->content); + if (p->info) elm_object_part_text_set(obj, "info", p->info); + if (p->content) elm_object_content_set(obj, p->content); } static Eina_Bool @@ -50,7 +50,7 @@ external_bubble_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex { if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) { - elm_object_text_part_set(obj, "info", param->s); + elm_object_part_text_set(obj, "info", param->s); return EINA_TRUE; } } @@ -92,7 +92,7 @@ external_bubble_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_Ex { if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) { - param->s = elm_object_text_part_get(obj, "info"); + param->s = elm_object_part_text_get(obj, "info"); return EINA_TRUE; } } diff --git a/src/edje_externals/elm_toggle.c b/src/edje_externals/elm_toggle.c index 20fd782..3152cf2 100644 --- a/src/edje_externals/elm_toggle.c +++ b/src/edje_externals/elm_toggle.c @@ -27,9 +27,9 @@ external_toggle_state_set(void *data __UNUSED__, Evas_Object *obj, const void *f elm_object_content_part_set(obj, "icon", p->icon); if (p->on) - elm_object_text_part_set(obj, "on", p->on); + elm_object_part_text_set(obj, "on", p->on); if (p->off) - elm_object_text_part_set(obj, "off", p->off); + elm_object_part_text_set(obj, "off", p->off); if (p->state_exists) elm_toggle_state_set(obj, p->state); @@ -60,7 +60,7 @@ external_toggle_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex { if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) { - elm_object_text_part_set(obj, "on", param->s); + elm_object_part_text_set(obj, "on", param->s); return EINA_TRUE; } } @@ -68,7 +68,7 @@ external_toggle_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex { if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) { - elm_object_text_part_set(obj, "off", param->s); + elm_object_part_text_set(obj, "off", param->s); return EINA_TRUE; } } @@ -107,7 +107,7 @@ external_toggle_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_Ex { if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) { - param->s = elm_object_text_part_get(obj, "on"); + param->s = elm_object_part_text_get(obj, "on"); return EINA_TRUE; } } @@ -115,7 +115,7 @@ external_toggle_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_Ex { if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) { - param->s = elm_object_text_part_get(obj, "off"); + param->s = elm_object_part_text_get(obj, "off"); return EINA_TRUE; } } diff --git a/src/examples/actionslider_example_01.c b/src/examples/actionslider_example_01.c index d518436..e09d8ae 100644 --- a/src/examples/actionslider_example_01.c +++ b/src/examples/actionslider_example_01.c @@ -62,8 +62,8 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0); elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_RIGHT); elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_RIGHT); - elm_object_text_part_set(as, "left", "Snooze"); - elm_object_text_part_set(as, "right", "Stop"); + elm_object_part_text_set(as, "left", "Snooze"); + elm_object_part_text_set(as, "right", "Stop"); elm_actionslider_enabled_pos_set(as, ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT); evas_object_smart_callback_add(as, "pos_changed", @@ -77,8 +77,8 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0); elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_CENTER); elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_CENTER); - elm_object_text_part_set(as, "left", "Snooze"); - elm_object_text_part_set(as, "right", "Stop"); + elm_object_part_text_set(as, "left", "Snooze"); + elm_object_part_text_set(as, "right", "Stop"); elm_actionslider_enabled_pos_set(as, ELM_ACTIONSLIDER_LEFT | ELM_ACTIONSLIDER_RIGHT); evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL); @@ -94,8 +94,8 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) ELM_ACTIONSLIDER_RIGHT); elm_actionslider_enabled_pos_set(as, ELM_ACTIONSLIDER_CENTER | ELM_ACTIONSLIDER_RIGHT); - elm_object_text_part_set(as, "center", "Accept"); - elm_object_text_part_set(as, "right", "Reject"); + elm_object_part_text_set(as, "center", "Accept"); + elm_object_part_text_set(as, "right", "Reject"); evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL); evas_object_show(as); elm_box_pack_end(bx, as); @@ -106,8 +106,8 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0); elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_LEFT); elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_LEFT); - elm_object_text_part_set(as, "center", "Accept"); - elm_object_text_part_set(as, "right", "Reject"); + elm_object_part_text_set(as, "center", "Accept"); + elm_object_part_text_set(as, "right", "Reject"); elm_object_text_set(as, "Go"); evas_object_smart_callback_add(as, "pos_changed", _position_change_magnetic_cb, NULL); @@ -121,9 +121,9 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0); elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_LEFT); elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_ALL); - elm_object_text_part_set(as, "left", "Left"); - elm_object_text_part_set(as, "center", "Center"); - elm_object_text_part_set(as, "right", "Right"); + elm_object_part_text_set(as, "left", "Left"); + elm_object_part_text_set(as, "center", "Center"); + elm_object_part_text_set(as, "right", "Right"); elm_object_text_set(as, "Go"); evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL); evas_object_show(as); @@ -134,9 +134,9 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0); elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_CENTER); elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_CENTER); - elm_object_text_part_set(as, "left", "Enable"); - elm_object_text_part_set(as, "center", "Magnet"); - elm_object_text_part_set(as, "right", "Disable"); + elm_object_part_text_set(as, "left", "Enable"); + elm_object_part_text_set(as, "center", "Magnet"); + elm_object_part_text_set(as, "right", "Disable"); evas_object_smart_callback_add(as, "pos_changed", _magnet_enable_disable_cb, NULL); evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL); diff --git a/src/examples/layout_example_01.c b/src/examples/layout_example_01.c index ec8a971..91ea464 100644 --- a/src/examples/layout_example_01.c +++ b/src/examples/layout_example_01.c @@ -87,7 +87,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) if (title) { elm_win_title_set(win, title); - elm_object_text_part_set(layout, TITLE, title); + elm_object_part_text_set(layout, TITLE, title); } // Add icon, clock and button to the table diff --git a/src/examples/layout_example_03.c b/src/examples/layout_example_03.c index 4bb52b5..d974068 100644 --- a/src/examples/layout_example_03.c +++ b/src/examples/layout_example_03.c @@ -76,7 +76,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) if (title) { elm_win_title_set(win, title); - elm_object_text_part_set(layout, TITLE, title); + elm_object_part_text_set(layout, TITLE, title); } btn = elm_button_add(win); diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 872ebbb..ab910c4 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -973,12 +973,38 @@ extern "C" { * @param label The new text of the label * * @note Elementary objects may have many labels (e.g. Action Slider) + * @deprecated Use elm_object_part_text_set() instead. + * @ingroup General + */ + EINA_DEPRECATED EAPI void elm_object_text_part_set(Evas_Object *obj, const char *part, const char *label); + + /** + * Set a label of an object + * + * @param obj The Elementary object + * @param part The text part name to set (NULL for the default label) + * @param label The new text of the label + * + * @note Elementary objects may have many labels (e.g. Action Slider) * * @ingroup General */ - EAPI void elm_object_text_part_set(Evas_Object *obj, const char *part, const char *label); + EAPI void elm_object_part_text_set(Evas_Object *obj, const char *part, const char *label); -#define elm_object_text_set(obj, label) elm_object_text_part_set((obj), NULL, (label)) +#define elm_object_text_set(obj, label) elm_object_part_text_set((obj), NULL, (label)) + + /** + * Get a label of an object + * + * @param obj The Elementary object + * @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 objects may have many labels (e.g. Action Slider) + * @deprecated Use elm_object_part_text_get() instead. + * @ingroup General + */ + EINA_DEPRECATED EAPI const char *elm_object_text_part_get(const Evas_Object *obj, const char *part); /** * Get a label of an object @@ -991,16 +1017,16 @@ extern "C" { * * @ingroup General */ - EAPI const char *elm_object_text_part_get(const Evas_Object *obj, const char *part); + EAPI const char *elm_object_part_text_get(const Evas_Object *obj, const char *part); -#define elm_object_text_get(obj) elm_object_text_part_get((obj), NULL) +#define elm_object_text_get(obj) elm_object_part_text_get((obj), NULL) /** * Set the text for an objects' part, marking it as translatable. * * The string to set as @p text must be the original one. Do not pass the * return of @c gettext() here. Elementary will translate the string - * internally and set it on the object using elm_object_text_part_set(), + * internally and set it on the object using elm_object_part_text_set(), * also storing the original string so that it can be automatically * translated when the language is changed with elm_language_set(). * @@ -10046,7 +10072,7 @@ extern "C" { * @see elm_object_signal_callback_add() * @see elm_object_signal_emit() * @see elm_object_part_text_set() - * @see elm_object_part_content_set() + * @see elm_object_content_part_set() * @see elm_layout_box_append() * @see elm_layout_table_pack() * @see elm_layout_data_get() diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c index b2ad65b..a7494a8 100644 --- a/src/lib/elm_main.c +++ b/src/lib/elm_main.c @@ -948,6 +948,20 @@ elm_object_text_part_get(const Evas_Object *obj, const char *part) } EAPI void +elm_object_part_text_set(Evas_Object *obj, const char *part, const char *label) +{ + EINA_SAFETY_ON_NULL_RETURN(obj); + elm_widget_text_part_set(obj, part, label); +} + +EAPI const char * +elm_object_part_text_get(const Evas_Object *obj, const char *part) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL); + return elm_widget_text_part_get(obj, part); +} + +EAPI void elm_object_domain_translatable_text_part_set(Evas_Object *obj, const char *part, const char *domain, const char *text) { EINA_SAFETY_ON_NULL_RETURN(obj); diff --git a/src/lib/elm_toggle.c b/src/lib/elm_toggle.c index 57a8599..a802243 100644 --- a/src/lib/elm_toggle.c +++ b/src/lib/elm_toggle.c @@ -8,8 +8,8 @@ elm_toggle_add(Evas_Object *parent) obj = elm_check_add(parent); elm_object_style_set(obj, "toggle"); - elm_object_text_part_set(obj, "on", E_("ON")); - elm_object_text_part_set(obj, "off", E_("OFF")); + elm_object_part_text_set(obj, "on", E_("ON")); + elm_object_part_text_set(obj, "off", E_("OFF")); return obj; } @@ -46,16 +46,16 @@ elm_toggle_icon_unset(Evas_Object *obj) EAPI void elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *offlabel) { - elm_object_text_part_set(obj, "on", onlabel); - elm_object_text_part_set(obj, "off", offlabel); + elm_object_part_text_set(obj, "on", onlabel); + elm_object_part_text_set(obj, "off", offlabel); } EAPI void elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const char **offlabel) { - if (onlabel) *onlabel = elm_object_text_part_get(obj, "on"); - if (offlabel) *offlabel = elm_object_text_part_get(obj, "off"); + if (onlabel) *onlabel = elm_object_part_text_get(obj, "on"); + if (offlabel) *offlabel = elm_object_part_text_get(obj, "off"); } EAPI void