diff options
author | sndev <sndev> | 2006-08-03 15:35:38 +0000 |
---|---|---|
committer | sndev <sndev@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33> | 2006-08-03 15:35:38 +0000 |
commit | 5ddaf123ddc21b640a7c44f2be6e10d33766d99d (patch) | |
tree | 09c2dd4c94a3ac50feadb6c2257b8837f896498b /src/bin/e_int_gadcon_config.c | |
parent | d9f94ab5e3a47302096aad77599a2c44c2758dee (diff) | |
download | enlightenment-5ddaf123ddc21b640a7c44f2be6e10d33766d99d.tar.gz |
* no need to disable the "Add" button after the gadget was added. If I want consequently
add the same gadget more than once I need to do too much mouse acions.
* no need to disable the "Delete" button. The reasoning is the same.
SVN revision: 24379
Diffstat (limited to 'src/bin/e_int_gadcon_config.c')
-rw-r--r-- | src/bin/e_int_gadcon_config.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/bin/e_int_gadcon_config.c b/src/bin/e_int_gadcon_config.c index e9d4562280..db160f4c15 100644 --- a/src/bin/e_int_gadcon_config.c +++ b/src/bin/e_int_gadcon_config.c @@ -159,8 +159,6 @@ _cb_add_instance(void *data, void *data2) _load_selected_gadgets(cfdata); e_widget_ilist_selected_set(cfdata->o_instances, e_widget_ilist_count(cfdata->o_instances) - 1); - - e_widget_disabled_set(cfdata->o_add, 1); } static void @@ -185,8 +183,16 @@ _cb_remove_instance(void *data, void *data2) _load_selected_gadgets(cfdata); - e_widget_disabled_set(cfdata->o_remove, 1); - + if (i >= evas_list_count(cfdata->cf_gc->clients)) + i = evas_list_count(cfdata->cf_gc->clients) - 1; + + if (i < 0) + e_widget_disabled_set(cfdata->o_remove, 1); + else + { + e_widget_ilist_selected_set(cfdata->o_instances, i); + e_widget_disabled_set(cfdata->o_remove, 0); + } e_gadcon_unpopulate(cfdata->gc); e_gadcon_populate(cfdata->gc); e_config_save_queue(); |