From 882a079d076e1a5eda00e2638095d7f280924d4a Mon Sep 17 00:00:00 2001 From: sndev Date: Sun, 19 Feb 2006 16:34:22 +0000 Subject: [PATCH] Just small bug fix in Key Binding configuration dialog. It fixes a situation when, after opening a config dialog, just one key binding is changed and apply/ok button is pressed. Thus, the configuration changes are not lost. SVN revision: 20585 --- src/bin/e_int_config_keybindings.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/bin/e_int_config_keybindings.c b/src/bin/e_int_config_keybindings.c index f3244de8f..f69257a11 100644 --- a/src/bin/e_int_config_keybindings.c +++ b/src/bin/e_int_config_keybindings.c @@ -248,6 +248,9 @@ const ACTION actions_predefined_names[ ] = { EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS }, {"Menu Show", "menu_show", NULL, _NONDEFAULT_ACTION, EDIT_RESTRICT_ACTION }, + {"Desktop Lock", "desk_lock", NULL, _DEFAULT_ACTION, + EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS }, + {"Toggle Edit Mode", "edit_mode_toggle", NULL, _DEFAULT_ACTION, EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS }, @@ -500,6 +503,17 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) size_t size, size2; unsigned int i, j; + //we should call for autoapply here, since this prevents a bug, when only one + //NEW keybinding is made and apply/ok button is pressed. Thus, this keybinding does + //not lost. + if (cfdata->cur_eckb) + if (_keybind_cb_auto_apply(cfdata) != 0) + { + //TODO: message box which should ask if we really should proceed. + //If yes, then the current 'empty' binding will be deleted + _keybind_delete_keybinding(cfdata); + } + // here the removing of the old keybindings goes while (e_config->key_bindings) {