On Fri, 03 Mar 2006 20:36:23 -0800 [email protected]
babbled:
i'm not sure changing the label of a checkbox like this is a good idea - NO UI
i have ever seen does this. if it was 2 radio options - sure, 2 labels, but
here - what does it really mean? is the label what happens when it is checked
or unchecked? generally the logic of a tickbox as in any form is if you
tick/cross it you say "yes" to the label next to it. i believe this is commonly
accepted as the way to go and understood. i am not sure this improves anything
here - actually makes it more confusing due to the checkbox next to the label
if there was no check i would definitely agree it should toggle the label
displaying what the current state is...
> Enlightenment CVS committal
>
> Author : devilhorns
> Project : e17
> Module : apps/e
>
> Dir : e17/apps/e/src/bin
>
>
> Modified Files:
> e_int_config_cursor.c
>
>
> Log Message:
> Update the checkbox label when it gets toggled. Trying to think like grandma
> here :)
>
> ===================================================================
> RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_int_config_cursor.c,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -3 -r1.4 -r1.5
> --- e_int_config_cursor.c 15 Feb 2006 20:32:28 -0000 1.4
> +++ e_int_config_cursor.c 4 Mar 2006 04:36:23 -0000 1.5
> @@ -6,6 +6,7 @@
> static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas,
> E_Config_Dialog_Data *cfdata); static int _advanced_apply_data
> (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); static Evas_Object
> *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas,
> E_Config_Dialog_Data *cfdata); +static void _cursor_check_toggle(void
> *data, Evas_Object *obj, const char *emission, const char *source); struct
> _E_Config_Dialog_Data {
> @@ -15,6 +16,13 @@
> int cursor_size;
> };
>
> +typedef struct _E_Widget_Check_Data E_Widget_Check_Data;
> +struct _E_Widget_Check_Data
> +{
> + Evas_Object *o_check;
> + int *valptr;
> +};
> +
> EAPI E_Config_Dialog *
> e_int_config_cursor(E_Container *con)
> {
> @@ -88,11 +96,16 @@
> _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
> *cfdata) {
> Evas_Object *o, *of, *ob;
> + E_Widget_Check_Data *wd;
>
> o = e_widget_list_add(evas, 0, 0);
>
> of = e_widget_framelist_add(evas, _("Cursor Settings"), 0);
> ob = e_widget_check_add(evas, _("Use Enlightenment Cursor"), &
> (cfdata->use_e_cursor));
> + wd = e_widget_data_get(ob);
> + edje_object_signal_callback_add(wd->o_check, "toggle_on", "",
> _cursor_check_toggle, ob);
> + edje_object_signal_callback_add(wd->o_check, "toggle_off", "",
> _cursor_check_toggle, ob);
> +
> e_widget_framelist_object_append(of, ob);
> e_widget_list_object_append(o, of, 1, 1, 0.5);
>
> @@ -134,11 +147,15 @@
> _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas,
> E_Config_Dialog_Data *cfdata) {
> Evas_Object *o, *ob, *of;
> + E_Widget_Check_Data *wd;
>
> o = e_widget_list_add(evas, 0, 0);
>
> of = e_widget_framelist_add(evas, _("Cursor Settings"), 0);
> ob = e_widget_check_add(evas, _("Use Enlightenment Cursor"), &
> (cfdata->use_e_cursor));
> + wd = e_widget_data_get(ob);
> + edje_object_signal_callback_add(wd->o_check, "toggle_on", "",
> _cursor_check_toggle, ob);
> + edje_object_signal_callback_add(wd->o_check, "toggle_off", "",
> _cursor_check_toggle, ob); e_widget_framelist_object_append(of, ob);
> ob = e_widget_label_add(evas, _("Cursor Size"));
> e_widget_framelist_object_append(of, ob);
> @@ -147,3 +164,20 @@
> e_widget_list_object_append(o, of, 1, 1, 0.5);
> return o;
> }
> +
> +static void
> +_cursor_check_toggle(void *data, Evas_Object *obj, const char *emission,
> const char *source) +{
> + E_Widget_Check_Data *wd;
> + Evas_Object *o;
> +
> + if (!(o = data)) return;
> + wd = e_widget_data_get(o);
> + if (!wd->valptr)
> + return;
> +
> + if (*(wd->valptr) == 0)
> + edje_object_part_text_set(wd->o_check, "label", _("Use X Cursor"));
> + else
> + edje_object_part_text_set(wd->o_check, "label", _("Use Enlightenment
> Cursor")); +}
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> enlightenment-cvs mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
>
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) [EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel