On Thu, 20 Oct 2011 15:27:43 -0200 Gustavo Sverzut Barbieri
<[email protected]> said:

> On Thu, Oct 20, 2011 at 3:03 PM, Iván Briano (Sachiel)
> <[email protected]> wrote:
> > 2011/10/20 Daniel Juyung Seo <[email protected]>:
> >>  EAPI void
> >> +elm_check_states_labels_set(Evas_Object *obj, const char *ontext,
> >> const char *offtext)
> >> +{
> >> +   _elm_check_label_set(obj, "on", ontext);
> >> +   _elm_check_label_set(obj, "off", offtext);
> >> +}
> >> +
> >> +EAPI void
> >> +elm_check_states_labels_get(const Evas_Object *obj, const char
> >> **ontext, const char **offtext)
> >> +{
> >> +   if (ontext) *ontext = _elm_check_label_get(obj, "on");
> >> +   if (offtext) *offtext = _elm_check_label_get(obj, "off");
> >> +}
> >>
> >> Why new APIs?
> >> With recent elementary changes, we use elm_object_text_set() and
> >> elm_object_text_part_set() to set texts of widgets instead of
> >> elm_{widget}_label_set().
> >> This is inconsistent.
> >>
> >> We need to fix the policy to set texts.
> >> 1. Use elm_object_text_set, elm_object_text_part_set.
> >> 2. Use each widgets' APIs elm_{widget}_label_set,
> >> elm_{widget}_{blarblar}_labels_set, elm_{widget}_info_set,  and so on.
> >>
> >> Now it's a mess.
> >>
> >
> > This functions gets two strings, not just one, and it's needed
> > if you want to keep the compatibility with the old toggle.
> 
> Likely he means:
> 
> elm_object_text_part_set(o, "on", onstring);
> elm_object_text_part_set(o, "off", offstring);

that's exactly what the call does internally. i just added it as a
transitionary call to make it EASY to transition over. by replacing "toggle"
with "check" in your code if you use it. it will get removed ultimately like
all the label set code.

> BTW, Seoz what about following the Evas_Smart_Class
> callback_description and add some list/description to elm_widget so
> it's possible to introspect available labels?
> 
> For instance we could do something about it in edje-externals.


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to