From: Viktor Kojouharov Date: Tue, 28 Apr 2009 21:01:20 +0000 (+0000) Subject: disable the slider if flip animations are off X-Git-Tag: submit/efl/20131021.015651~9482 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0936b5b5b0a6e9a1a9c30d4be6a71c8475196f2;p=platform%2Fupstream%2Fenlightenment.git disable the slider if flip animations are off SVN revision: 40455 --- diff --git a/src/modules/conf_desks/e_int_config_desks.c b/src/modules/conf_desks/e_int_config_desks.c index ebcfd23..4fe6d54 100644 --- a/src/modules/conf_desks/e_int_config_desks.c +++ b/src/modules/conf_desks/e_int_config_desks.c @@ -13,6 +13,7 @@ static int _advanced_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *c static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); static void _cb_slider_change(void *data, Evas_Object *obj); +static void _cb_disable_flip_anim(void *data, Evas_Object *obj); /* Actual config data we will be playing with whil the dialog is active */ struct _E_Config_Dialog_Data @@ -31,6 +32,7 @@ struct _E_Config_Dialog_Data /*- GUI -*/ Evas_Object *preview; + Eina_List *flip_anim_list; }; /* a nice easy setup function that does the dirty work */ @@ -91,6 +93,7 @@ _create_data(E_Config_Dialog *cdd) static void _free_data(E_Config_Dialog *cdd, E_Config_Dialog_Data *cfdata) { + eina_list_free(cfdata->flip_anim_list); E_FREE(cfdata); } @@ -288,12 +291,17 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data rg = e_widget_radio_group_new(&(cfdata->flip_mode)); ob = e_widget_radio_add(evas, _("Off"), 0, rg); e_widget_framelist_object_append(of, ob); + e_widget_on_change_hook_set(ob, _cb_disable_flip_anim, cfdata); ob = e_widget_radio_add(evas, _("Pane"), 1, rg); e_widget_framelist_object_append(of, ob); + e_widget_on_change_hook_set(ob, _cb_disable_flip_anim, cfdata); ob = e_widget_radio_add(evas, _("Zoom"), 2, rg); e_widget_framelist_object_append(of, ob); + e_widget_on_change_hook_set(ob, _cb_disable_flip_anim, cfdata); ob = e_widget_slider_add(evas, 1, 0, _("%1.1f sec"), 0.0, 5.0, 0.05, 0, &(cfdata->flip_speed), NULL, 200); + e_widget_disabled_set(ob, !cfdata->flip_mode); e_widget_framelist_object_append(of, ob); + cfdata->flip_anim_list = eina_list_append(cfdata->flip_anim_list, ob); e_widget_table_object_append(ott, of, 1, 1, 1, 1, 1, 1, 1, 1); e_widget_list_object_append(o, ott, 1, 1, 0.5); @@ -308,3 +316,15 @@ _cb_slider_change(void *data, Evas_Object *obj) e_widget_desk_preview_num_desks_set(cfdata->preview, cfdata->x, cfdata->y); } + +static void +_cb_disable_flip_anim(void *data, Evas_Object *obj) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data*) data; + Eina_List *list = cfdata->flip_anim_list; + Eina_List *l; + Evas_Object *o; + + EINA_LIST_FOREACH(list, l, o) + e_widget_disabled_set(o, !cfdata->flip_mode); +}