elm_object_text_set(tg, "Icon sized to toggle");
elm_check_icon_set(tg, ic);
elm_check_state_set(tg, 1);
- elm_check_states_labels_set(tg, "Yes", "No");
+ elm_object_text_part_set(tg, "on", "Yes");
+ elm_object_text_part_set(tg, "off", "No");
elm_box_pack_end(bx, tg);
evas_object_show(tg);
evas_object_show(ic);
tg = elm_check_add(win);
elm_object_style_set(tg, "toggle");
elm_object_text_set(tg, "Label Only");
- elm_check_states_labels_set(tg, "Big long fun times label",
- "Small long happy fun label");
+ 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_box_pack_end(bx, tg);
evas_object_show(tg);
if (p->icon)
elm_check_icon_set(obj, p->icon);
- if ((p->on) && (p->off))
- elm_check_states_labels_set(obj, p->on, p->off);
- else if ((p->on) || (p->off))
- {
- const char *on, *off;
- elm_check_states_labels_get(obj, &on, &off);
- if (p->on)
- elm_check_states_labels_set(obj, p->on, off);
- else
- elm_check_states_labels_set(obj, on, p->off);
- }
+ if (p->on)
+ elm_object_text_part_set(obj, "on", p->on);
+ if (p->off)
+ elm_object_text_part_set(obj, "off", p->off);
if (p->state_exists)
elm_check_state_set(obj, p->state);
{
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
{
- const char *on, *off;
- elm_check_states_labels_get(obj, &on, &off);
- elm_check_states_labels_set(obj, param->s, off);
+ elm_object_text_part_set(obj, "on", param->s);
return EINA_TRUE;
}
}
{
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
{
- const char *on, *off;
- elm_check_states_labels_get(obj, &on, &off);
- elm_check_states_labels_set(obj, on, param->s);
+ elm_object_text_part_set(obj, "off", param->s);
return EINA_TRUE;
}
}
{
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
{
- const char *on, *off;
- elm_check_states_labels_get(obj, &on, &off);
- param->s = on;
+ param->s = elm_object_text_part_get(obj, "on");
return EINA_TRUE;
}
}
{
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
{
- const char *on, *off;
- elm_check_states_labels_get(obj, &on, &off);
- param->s = off;
+ param->s = elm_object_text_part_get(obj, "off");
return EINA_TRUE;
}
}
obj = elm_check_add(parent);
elm_object_style_set(obj, "toggle");
- elm_check_states_labels_set(obj, E_("ON"), E_("OFF"));
+ elm_object_text_part_set(obj, "on", E_("ON"));
+ elm_object_text_part_set(obj, "off", E_("OFF"));
return obj;
}
EAPI void
elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *offlabel)
{
- elm_check_states_labels_set(obj, onlabel, offlabel);
+ elm_object_text_part_set(obj, "on", onlabel);
+ elm_object_text_part_set(obj, "off", offlabel);
}
EAPI void
elm_toggle_states_labels_get(const Evas_Object *obj, const char **onlabel, const char **offlabel)
{
- elm_check_states_labels_get(obj, onlabel, offlabel);
+ if (onlabel) *onlabel = elm_object_text_part_get(obj, "on");
+ if (offlabel) *offlabel = elm_object_text_part_get(obj, "off");
}
EAPI void