summaryrefslogtreecommitdiff
path: root/src/modules/conf_keybindings
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-06-27 07:11:01 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-06-27 07:11:01 +0000
commite63e7395c0e335c2d7b4150bd5e527fe4cf84b02 (patch)
treec23c75f862fc0d298520eb58ecde137496b1569b /src/modules/conf_keybindings
parentf9e2aba1d43a6222156ca82ecf7ff69d822e72fb (diff)
better fix for keybindings config, fixes param setting in all tested cases
SVN revision: 72921
Diffstat (limited to 'src/modules/conf_keybindings')
-rw-r--r--src/modules/conf_keybindings/e_int_config_keybindings.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/modules/conf_keybindings/e_int_config_keybindings.c b/src/modules/conf_keybindings/e_int_config_keybindings.c
index 0aef81677..7b23ad506 100644
--- a/src/modules/conf_keybindings/e_int_config_keybindings.c
+++ b/src/modules/conf_keybindings/e_int_config_keybindings.c
@@ -157,6 +157,7 @@ _create_data(E_Config_Dialog *cfd)
157 157
158 cfdata = E_NEW(E_Config_Dialog_Data, 1); 158 cfdata = E_NEW(E_Config_Dialog_Data, 1);
159 cfdata->cfd = cfd; 159 cfdata->cfd = cfd;
160 cfdata->locals.cur_act = -1;
160 _fill_data(cfdata); 161 _fill_data(cfdata);
161 162
162 return cfdata; 163 return cfdata;
@@ -365,6 +366,7 @@ _binding_change_cb(void *data)
365 _auto_apply_changes(cfdata); 366 _auto_apply_changes(cfdata);
366 eina_stringshare_del(cfdata->locals.cur); 367 eina_stringshare_del(cfdata->locals.cur);
367 cfdata->locals.cur = NULL; 368 cfdata->locals.cur = NULL;
369 cfdata->locals.cur_act = -1;
368 370
369 if ((!cfdata->locals.binding) || (!cfdata->locals.binding[0])) return; 371 if ((!cfdata->locals.binding) || (!cfdata->locals.binding[0])) return;
370 372
@@ -381,6 +383,7 @@ _action_change_cb(void *data)
381 383
382 cfdata = data; 384 cfdata = data;
383 _update_action_params(cfdata); 385 _update_action_params(cfdata);
386 cfdata->locals.cur_act = e_widget_ilist_selected_get(cfdata->gui.o_action_list);
384} 387}
385 388
386static void 389static void
@@ -749,7 +752,7 @@ _update_action_params(E_Config_Dialog_Data *cfdata)
749 E_Action_Group *actg; 752 E_Action_Group *actg;
750 E_Action_Description *actd; 753 E_Action_Description *actd;
751 E_Config_Binding_Key *bi; 754 E_Config_Binding_Key *bi;
752 const char *action; 755 const char *action, *params;
753 756
754#define KB_EXAMPLE_PARAMS \ 757#define KB_EXAMPLE_PARAMS \
755 if ((!actd->param_example) || (!actd->param_example[0])) \ 758 if ((!actd->param_example) || (!actd->param_example[0])) \
@@ -800,6 +803,7 @@ _update_action_params(E_Config_Dialog_Data *cfdata)
800 return; 803 return;
801 } 804 }
802 action = bi->action; 805 action = bi->action;
806 params = bi->params;
803 } 807 }
804 else 808 else
805 { 809 {
@@ -812,10 +816,10 @@ _update_action_params(E_Config_Dialog_Data *cfdata)
812 { 816 {
813 if (!strcmp(action, actd->act_cmd)) 817 if (!strcmp(action, actd->act_cmd))
814 { 818 {
815 if ((!actd->act_params) || (!actd->act_params[0])) 819 if ((cfdata->locals.cur_act >= 0) && (cfdata->locals.cur_act != e_widget_ilist_selected_get(cfdata->gui.o_action_list)))
816 KB_EXAMPLE_PARAMS; 820 KB_EXAMPLE_PARAMS;
817 else 821 else
818 e_widget_entry_text_set(cfdata->gui.o_params, actd->act_params); 822 e_widget_entry_text_set(cfdata->gui.o_params, params);
819 } 823 }
820 else 824 else
821 KB_EXAMPLE_PARAMS; 825 KB_EXAMPLE_PARAMS;