summaryrefslogtreecommitdiff
path: root/src/modules/conf_keybindings
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-01 10:21:54 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-01 10:21:54 +0000
commitc48fd0b06d22c47228005b0639aad580350bdf26 (patch)
tree135a9937068791da3c69d50969241008300eb1f7 /src/modules/conf_keybindings
parentabe45b31c1ca503970b87f657397dcc3bce35af6 (diff)
giant commit that wipes all bindi^W^W^Wsplits out binding configs into a separate config domain so they can be more easily copied and so they won't be wiped in the event that primary config is wiped
also splits all binding lists out of e_config: they are now conveniently located in the global "e_bindings" struct SVN revision: 83544
Diffstat (limited to 'src/modules/conf_keybindings')
-rw-r--r--src/modules/conf_keybindings/e_int_config_acpibindings.c14
-rw-r--r--src/modules/conf_keybindings/e_int_config_keybindings.c6
-rw-r--r--src/modules/conf_keybindings/e_int_config_mousebindings.c12
3 files changed, 16 insertions, 16 deletions
diff --git a/src/modules/conf_keybindings/e_int_config_acpibindings.c b/src/modules/conf_keybindings/e_int_config_acpibindings.c
index 64d8cce8c..416c518cf 100644
--- a/src/modules/conf_keybindings/e_int_config_acpibindings.c
+++ b/src/modules/conf_keybindings/e_int_config_acpibindings.c
@@ -94,7 +94,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
94 Eina_List *l; 94 Eina_List *l;
95 E_Config_Binding_Acpi *binding; 95 E_Config_Binding_Acpi *binding;
96 96
97 EINA_LIST_FOREACH(e_config->acpi_bindings, l, binding) 97 EINA_LIST_FOREACH(e_bindings->acpi_bindings, l, binding)
98 { 98 {
99 E_Config_Binding_Acpi *b2; 99 E_Config_Binding_Acpi *b2;
100 100
@@ -150,7 +150,7 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__,
150 E_Config_Binding_Acpi *binding, *b2; 150 E_Config_Binding_Acpi *binding, *b2;
151 Eina_List *l; 151 Eina_List *l;
152 152
153 EINA_LIST_FREE(e_config->acpi_bindings, binding) 153 EINA_LIST_FREE(e_bindings->acpi_bindings, binding)
154 { 154 {
155 e_bindings_acpi_del(binding->context, binding->type, binding->status, 155 e_bindings_acpi_del(binding->context, binding->type, binding->status,
156 binding->action, binding->params); 156 binding->action, binding->params);
@@ -167,8 +167,8 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__,
167 b2->status = binding->status; 167 b2->status = binding->status;
168 b2->action = eina_stringshare_ref(binding->action); 168 b2->action = eina_stringshare_ref(binding->action);
169 b2->params = eina_stringshare_ref(binding->params); 169 b2->params = eina_stringshare_ref(binding->params);
170 e_config->acpi_bindings = 170 e_bindings->acpi_bindings =
171 eina_list_append(e_config->acpi_bindings, b2); 171 eina_list_append(e_bindings->acpi_bindings, b2);
172 172
173 e_bindings_acpi_add(b2->context, b2->type, b2->status, 173 e_bindings_acpi_add(b2->context, b2->type, b2->status,
174 b2->action, b2->params); 174 b2->action, b2->params);
@@ -535,7 +535,7 @@ _cb_del_binding(void *data,
535 if (!(binding = _selected_binding_get(cfdata))) return; 535 if (!(binding = _selected_binding_get(cfdata))) return;
536 536
537 /* delete from e_config */ 537 /* delete from e_config */
538 EINA_LIST_FOREACH(e_config->acpi_bindings, l, bind2) 538 EINA_LIST_FOREACH(e_bindings->acpi_bindings, l, bind2)
539 { 539 {
540 if ((binding->context == bind2->context) && (binding->type == bind2->type) && 540 if ((binding->context == bind2->context) && (binding->type == bind2->type) &&
541 (((binding->action) && (bind2->action) && 541 (((binding->action) && (bind2->action) &&
@@ -548,8 +548,8 @@ _cb_del_binding(void *data,
548 if (bind2->action) eina_stringshare_del(bind2->action); 548 if (bind2->action) eina_stringshare_del(bind2->action);
549 if (bind2->params) eina_stringshare_del(bind2->params); 549 if (bind2->params) eina_stringshare_del(bind2->params);
550 E_FREE(bind2); 550 E_FREE(bind2);
551 e_config->acpi_bindings = 551 e_bindings->acpi_bindings =
552 eina_list_remove_list(e_config->acpi_bindings, l); 552 eina_list_remove_list(e_bindings->acpi_bindings, l);
553 e_config_save_queue(); 553 e_config_save_queue();
554 break; 554 break;
555 } 555 }
diff --git a/src/modules/conf_keybindings/e_int_config_keybindings.c b/src/modules/conf_keybindings/e_int_config_keybindings.c
index dc4079b16..378f64b7f 100644
--- a/src/modules/conf_keybindings/e_int_config_keybindings.c
+++ b/src/modules/conf_keybindings/e_int_config_keybindings.c
@@ -128,7 +128,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
128 cfdata->binding.key = NULL; 128 cfdata->binding.key = NULL;
129 cfdata->locals.eg = NULL; 129 cfdata->locals.eg = NULL;
130 130
131 EINA_LIST_FOREACH(e_config->key_bindings, l, bi) 131 EINA_LIST_FOREACH(e_bindings->key_bindings, l, bi)
132 { 132 {
133 if (!bi) continue; 133 if (!bi) continue;
134 134
@@ -190,7 +190,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__,
190 _auto_apply_changes(cfdata); 190 _auto_apply_changes(cfdata);
191 191
192 e_managers_keys_ungrab(); 192 e_managers_keys_ungrab();
193 EINA_LIST_FREE(e_config->key_bindings, bi) 193 EINA_LIST_FREE(e_bindings->key_bindings, bi)
194 { 194 {
195 e_bindings_key_del(bi->context, bi->key, bi->modifiers, bi->any_mod, 195 e_bindings_key_del(bi->context, bi->key, bi->modifiers, bi->any_mod,
196 bi->action, bi->params); 196 bi->action, bi->params);
@@ -216,7 +216,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__,
216 bi->params = 216 bi->params =
217 ((!bi2->params) || (!bi2->params[0])) ? NULL : eina_stringshare_ref(bi2->params); 217 ((!bi2->params) || (!bi2->params[0])) ? NULL : eina_stringshare_ref(bi2->params);
218 218
219 e_config->key_bindings = eina_list_append(e_config->key_bindings, bi); 219 e_bindings->key_bindings = eina_list_append(e_bindings->key_bindings, bi);
220 e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod, 220 e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod,
221 bi->action, bi->params); 221 bi->action, bi->params);
222 } 222 }
diff --git a/src/modules/conf_keybindings/e_int_config_mousebindings.c b/src/modules/conf_keybindings/e_int_config_mousebindings.c
index ba0125df4..a4517f855 100644
--- a/src/modules/conf_keybindings/e_int_config_mousebindings.c
+++ b/src/modules/conf_keybindings/e_int_config_mousebindings.c
@@ -127,7 +127,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
127 cfdata->binding.wheel = NULL; 127 cfdata->binding.wheel = NULL;
128 cfdata->locals.eg = NULL; 128 cfdata->locals.eg = NULL;
129 129
130 EINA_LIST_FOREACH(e_config->mouse_bindings, l, eb) 130 EINA_LIST_FOREACH(e_bindings->mouse_bindings, l, eb)
131 { 131 {
132 eb2 = E_NEW(E_Config_Binding_Mouse, 1); 132 eb2 = E_NEW(E_Config_Binding_Mouse, 1);
133 eb2->context = eb->context; 133 eb2->context = eb->context;
@@ -140,7 +140,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
140 cfdata->binding.mouse = eina_list_append(cfdata->binding.mouse, eb2); 140 cfdata->binding.mouse = eina_list_append(cfdata->binding.mouse, eb2);
141 } 141 }
142 142
143 EINA_LIST_FOREACH(e_config->wheel_bindings, l, bw) 143 EINA_LIST_FOREACH(e_bindings->wheel_bindings, l, bw)
144 { 144 {
145 bw2 = E_NEW(E_Config_Binding_Wheel, 1); 145 bw2 = E_NEW(E_Config_Binding_Wheel, 1);
146 bw2->context = bw->context; 146 bw2->context = bw->context;
@@ -207,7 +207,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
207 e_border_button_bindings_ungrab_all(); 207 e_border_button_bindings_ungrab_all();
208 e_managers_keys_ungrab(); 208 e_managers_keys_ungrab();
209 209
210 EINA_LIST_FREE(e_config->mouse_bindings, eb) 210 EINA_LIST_FREE(e_bindings->mouse_bindings, eb)
211 { 211 {
212 e_bindings_mouse_del(eb->context, eb->button, eb->modifiers, eb->any_mod, 212 e_bindings_mouse_del(eb->context, eb->button, eb->modifiers, eb->any_mod,
213 eb->action, eb->params); 213 eb->action, eb->params);
@@ -226,12 +226,12 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
226 eb2->action = !eb->action ? NULL : eina_stringshare_add(eb->action); 226 eb2->action = !eb->action ? NULL : eina_stringshare_add(eb->action);
227 eb2->params = !eb->params ? NULL : eina_stringshare_add(eb->params); 227 eb2->params = !eb->params ? NULL : eina_stringshare_add(eb->params);
228 228
229 e_config->mouse_bindings = eina_list_append(e_config->mouse_bindings, eb2); 229 e_bindings->mouse_bindings = eina_list_append(e_bindings->mouse_bindings, eb2);
230 e_bindings_mouse_add(eb2->context, eb2->button, eb2->modifiers, eb2->any_mod, 230 e_bindings_mouse_add(eb2->context, eb2->button, eb2->modifiers, eb2->any_mod,
231 eb2->action, eb2->params); 231 eb2->action, eb2->params);
232 } 232 }
233 233
234 EINA_LIST_FREE(e_config->wheel_bindings, bw) 234 EINA_LIST_FREE(e_bindings->wheel_bindings, bw)
235 { 235 {
236 e_bindings_wheel_del(bw->context, bw->direction, bw->z, bw->modifiers, bw->any_mod, 236 e_bindings_wheel_del(bw->context, bw->direction, bw->z, bw->modifiers, bw->any_mod,
237 bw->action, bw->params); 237 bw->action, bw->params);
@@ -264,7 +264,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
264 bw2->action = !bw->action ? NULL : eina_stringshare_add(bw->action); 264 bw2->action = !bw->action ? NULL : eina_stringshare_add(bw->action);
265 bw2->params = !bw->params ? NULL : eina_stringshare_add(bw->params); 265 bw2->params = !bw->params ? NULL : eina_stringshare_add(bw->params);
266 266
267 e_config->wheel_bindings = eina_list_append(e_config->wheel_bindings, bw2); 267 e_bindings->wheel_bindings = eina_list_append(e_bindings->wheel_bindings, bw2);
268 e_bindings_wheel_add(bw2->context, bw2->direction, bw2->z, bw2->modifiers, 268 e_bindings_wheel_add(bw2->context, bw2->direction, bw2->z, bw2->modifiers,
269 bw2->any_mod, bw2->action, bw2->params); 269 bw2->any_mod, bw2->action, bw2->params);
270 } 270 }