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); 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. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ 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
