summaryrefslogtreecommitdiff
path: root/src/bin/e_ipc.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-05-05 06:45:47 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-05-05 06:45:47 +0000
commit4c91972c078df348d23c176e118ed706842c712e (patch)
tree3f4a5ab468ca3406a693d95aae4d23be06ecf192 /src/bin/e_ipc.c
parent9a8fe8a324ec7762c2e256f4939df02817a7b4fd (diff)
key and mouse bindings are configurable via ipc. now. :)
SVN revision: 14608
Diffstat (limited to 'src/bin/e_ipc.c')
-rw-r--r--src/bin/e_ipc.c81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/bin/e_ipc.c b/src/bin/e_ipc.c
index 7f57c24..cc99c20 100644
--- a/src/bin/e_ipc.c
+++ b/src/bin/e_ipc.c
@@ -471,10 +471,50 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
471 break; 471 break;
472 case E_IPC_OP_BINDING_MOUSE_ADD: 472 case E_IPC_OP_BINDING_MOUSE_ADD:
473 { 473 {
474 E_Config_Binding_Mouse bind, *eb;
475
476 _e_ipc_mouse_binding_dec(e->data, e->size, &bind);
477 {
478 eb = e_config_binding_mouse_match(&bind);
479 if (!eb)
480 {
481 eb = E_NEW(E_Config_Binding_Key, 1);
482 e_config->mouse_bindings = evas_list_append(e_config->mouse_bindings, eb);
483 eb->context = bind.context;
484 eb->button = bind.button;
485 eb->modifiers = bind.modifiers;
486 eb->any_mod = bind.any_mod;
487 eb->action = strdup(bind.action);
488 eb->params = strdup(bind.params);
489 e_border_button_bindings_ungrab_all();
490 e_bindings_mouse_add(bind.context, bind.button, bind.modifiers,
491 bind.any_mod, bind.action, bind.params);
492 e_border_button_bindings_grab_all();
493 e_config_save_queue();
494 }
495 }
474 } 496 }
475 break; 497 break;
476 case E_IPC_OP_BINDING_MOUSE_DEL: 498 case E_IPC_OP_BINDING_MOUSE_DEL:
477 { 499 {
500 E_Config_Binding_Mouse bind, *eb;
501
502 _e_ipc_mouse_binding_dec(e->data, e->size, &bind);
503 {
504 eb = e_config_binding_mouse_match(&bind);
505 if (eb)
506 {
507 e_config->mouse_bindings = evas_list_remove(e_config->mouse_bindings, eb);
508 IF_FREE(eb->action);
509 IF_FREE(eb->params);
510 IF_FREE(eb);
511 e_border_button_bindings_ungrab_all();
512 e_bindings_mouse_del(bind.context, bind.button, bind.modifiers,
513 bind.any_mod, bind.action, bind.params);
514 e_border_button_bindings_grab_all();
515 e_config_save_queue();
516 }
517 }
478 } 518 }
479 break; 519 break;
480 case E_IPC_OP_BINDING_KEY_LIST: 520 case E_IPC_OP_BINDING_KEY_LIST:
@@ -495,10 +535,51 @@ _e_ipc_cb_client_data(void *data __UNUSED__, int type __UNUSED__, void *event)
495 break; 535 break;
496 case E_IPC_OP_BINDING_KEY_ADD: 536 case E_IPC_OP_BINDING_KEY_ADD:
497 { 537 {
538 E_Config_Binding_Key bind, *eb;
539
540 _e_ipc_key_binding_dec(e->data, e->size, &bind);
541 {
542 eb = e_config_binding_key_match(&bind);
543 if (!eb)
544 {
545 eb = E_NEW(E_Config_Binding_Key, 1);
546 e_config->key_bindings = evas_list_append(e_config->key_bindings, eb);
547 eb->context = bind.context;
548 eb->modifiers = bind.modifiers;
549 eb->any_mod = bind.any_mod;
550 eb->key = strdup(bind.key);
551 eb->action = strdup(bind.action);
552 eb->params = strdup(bind.params);
553 e_managers_keys_ungrab();
554 e_bindings_key_add(bind.context, bind.key, bind.modifiers,
555 bind.any_mod, bind.action, bind.params);
556 e_managers_keys_grab();
557 e_config_save_queue();
558 }
559 }
498 } 560 }
499 break; 561 break;
500 case E_IPC_OP_BINDING_KEY_DEL: 562 case E_IPC_OP_BINDING_KEY_DEL:
501 { 563 {
564 E_Config_Binding_Key bind, *eb;
565
566 _e_ipc_key_binding_dec(e->data, e->size, &bind);
567 {
568 eb = e_config_binding_key_match(&bind);
569 if (eb)
570 {
571 e_config->key_bindings = evas_list_remove(e_config->key_bindings, eb);
572 IF_FREE(eb->key);
573 IF_FREE(eb->action);
574 IF_FREE(eb->params);
575 IF_FREE(eb);
576 e_managers_keys_ungrab();
577 e_bindings_key_del(bind.context, bind.key, bind.modifiers,
578 bind.any_mod, bind.action, bind.params);
579 e_managers_keys_grab();
580 e_config_save_queue();
581 }
582 }
502 } 583 }
503 break; 584 break;
504 default: 585 default: