From 7e18dbb3a163e496626a6917b88ec0af822f229a Mon Sep 17 00:00:00 2001 From: stffrdhrn Date: Thu, 2 Mar 2006 12:01:21 +0000 Subject: [PATCH] When options arent available disable them, don't just hide them. This is needed if the configured item is one which is disabled. otherwise you cant select the other options. SVN revision: 20911 --- src/bin/e_int_config_hinting.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/bin/e_int_config_hinting.c b/src/bin/e_int_config_hinting.c index 1f94cad43..6f81226dc 100644 --- a/src/bin/e_int_config_hinting.c +++ b/src/bin/e_int_config_hinting.c @@ -84,23 +84,25 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf /* generate the core widget layout for a basic dialog */ Evas_Object *o, *ob; E_Radio_Group *rg; + int option_enable; o = e_widget_list_add(evas, 0, 0); rg = e_widget_radio_group_new(&(cfdata->hinting)); - if (evas_font_hinting_can_hint(evas, EVAS_FONT_HINTING_BYTECODE)) - { - ob = e_widget_radio_add(evas, _("Bytecode Hinting"), 0, rg); - e_widget_list_object_append(o, ob, 1, 1, 0.5); - } - if (evas_font_hinting_can_hint(evas, EVAS_FONT_HINTING_AUTO)) - { - ob = e_widget_radio_add(evas, _("Automatic Hinting"), 1, rg); - e_widget_list_object_append(o, ob, 1, 1, 0.5); - } - if (evas_font_hinting_can_hint(evas, EVAS_FONT_HINTING_NONE)) - { - ob = e_widget_radio_add(evas, _("No Hinting"), 2, rg); - e_widget_list_object_append(o, ob, 1, 1, 0.5); - } + + option_enable = evas_font_hinting_can_hint(evas, EVAS_FONT_HINTING_BYTECODE); + ob = e_widget_radio_add(evas, _("Bytecode Hinting"), 0, rg); + e_widget_disabled_set(ob, !option_enable); + e_widget_list_object_append(o, ob, 1, 1, 0.5); + + option_enable = evas_font_hinting_can_hint(evas, EVAS_FONT_HINTING_AUTO); + ob = e_widget_radio_add(evas, _("Automatic Hinting"), 1, rg); + e_widget_disabled_set(ob, !option_enable); + e_widget_list_object_append(o, ob, 1, 1, 0.5); + + option_enable = evas_font_hinting_can_hint(evas, EVAS_FONT_HINTING_NONE); + ob = e_widget_radio_add(evas, _("No Hinting"), 2, rg); + e_widget_disabled_set(ob, !option_enable); + e_widget_list_object_append(o, ob, 1, 1, 0.5); + return o; }