Re: [E-devel] Binding clearing actions

2006-09-07 Thread R . Ramkumar
Hi!

 for now i don't think it's wise to accept this. as per previous emails - i 
 have
 the ipc config in my sights to nuke because once we have a complete gui for
 all the config - there is no need to keep a very big lump of code for doing
 this via ipc (not to mention that it is incomplete and lets you shoot yourself
 in the foot etc. etc.)

Ah.. Well... I got this in for the same reason as the temporary
problem that was mentioned in the remove ipc thread... Using scripts
to restore bindings on config nuking Anyway, as you say, it may be
better not to add to the huge bloat... May be people using such
scripts will find it useful to patch this to their local tree still :)

Regards,
Ramkumar.

-- 
April 1: This is the day upon which we are reminded of
what we are on the other three hundred and sixty-four.
  -- Mark Twain, Pudd'nhead Wilson's Calendar

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Binding clearing actions

2006-09-06 Thread R . Ramkumar

Hi!

Here's a patch to include ipc handlers for clearing all
Mouse/Key/Signal/Wheel bindings in E. Though it is theoretically
possible for an external program to read through the existing
keybindings and erase them one after the other, this offers a faster
and cleaner solution. This is useful when an external script is used
to fully configure the keybindings from scratch, ignoring the default
keybindings of E.

Regards,
Ramkumar.

--
April 1: This is the day upon which we are reminded of
what we are on the other three hundred and sixty-four.
 -- Mark Twain, Pudd'nhead Wilson's Calendar
ProxyChains-3.1 (http://proxychains.sf.net)
Index: e_bindings.c
===
RCS file: /cvs/e/e17/apps/e/src/bin/e_bindings.c,v
retrieving revision 1.33
diff -u -r1.33 e_bindings.c
--- e_bindings.c23 Aug 2006 00:34:33 -  1.33
+++ e_bindings.c6 Sep 2006 13:44:36 -
@@ -81,38 +81,10 @@
 EAPI int
 e_bindings_shutdown(void)
 {
-   while (mouse_bindings)
- {
-   E_Binding_Mouse *bind;
-   
-   bind = mouse_bindings-data;
-   mouse_bindings  = evas_list_remove_list(mouse_bindings, mouse_bindings);
-   _e_bindings_mouse_free(bind);
- }
-   while (key_bindings)
- {
-   E_Binding_Key *bind;
-   
-   bind = key_bindings-data;
-   key_bindings  = evas_list_remove_list(key_bindings, key_bindings);
-   _e_bindings_key_free(bind);
- }
-   while (signal_bindings)
- {
-   E_Binding_Signal *bind;
-   
-   bind = signal_bindings-data;
-   signal_bindings  = evas_list_remove_list(signal_bindings, 
signal_bindings);
-   _e_bindings_signal_free(bind);
- }
-   while (wheel_bindings)
- {
-   E_Binding_Wheel *bind;
-   
-   bind = wheel_bindings-data;
-   wheel_bindings  = evas_list_remove_list(wheel_bindings, wheel_bindings);
-   _e_bindings_wheel_free(bind);
- }
+   e_bindings_mouse_clear();
+   e_bindings_key_clear();
+   e_bindings_signal_clear();
+   e_bindings_wheel_clear();
return 1;
 }
 
@@ -158,6 +130,19 @@
 }
 
 EAPI void
+e_bindings_mouse_clear()
+{
+   while (mouse_bindings)
+ {
+   E_Binding_Mouse *bind;
+
+   bind = mouse_bindings-data;
+   mouse_bindings  = evas_list_remove_list(mouse_bindings, mouse_bindings);
+   _e_bindings_mouse_free(bind);
+ }
+}
+
+EAPI void
 e_bindings_mouse_grab(E_Binding_Context ctxt, Ecore_X_Window win)
 {
Evas_List *l;
@@ -350,6 +335,19 @@
 }
 
 EAPI void
+e_bindings_key_clear()
+{
+   while (key_bindings)
+ {
+   E_Binding_Key *bind;
+
+   bind = key_bindings-data;
+   key_bindings  = evas_list_remove_list(key_bindings, key_bindings);
+   _e_bindings_key_free(bind);
+ }
+}
+
+EAPI void
 e_bindings_key_grab(E_Binding_Context ctxt, Ecore_X_Window win)
 {
Evas_List *l;
@@ -520,6 +518,19 @@
  }
 }
 
+EAPI void
+e_bindings_signal_clear()
+{
+   while (signal_bindings)
+ {
+   E_Binding_Signal *bind;
+
+   bind = signal_bindings-data;
+   signal_bindings  = evas_list_remove_list(signal_bindings, 
signal_bindings);
+   _e_bindings_signal_free(bind);
+ }
+}
+
 EAPI E_Action  *
 e_bindings_signal_find(E_Binding_Context ctxt, E_Object *obj, const char *sig, 
const char *src, E_Binding_Signal **bind_ret)
 {
@@ -612,6 +623,19 @@
 wheel_bindings = evas_list_remove_list(wheel_bindings, l);
 break;
  }
+ }
+}
+
+EAPI void
+e_bindings_wheel_clear()
+{
+   while (wheel_bindings)
+ {
+   E_Binding_Wheel *bind;
+
+   bind = wheel_bindings-data;
+   wheel_bindings  = evas_list_remove_list(wheel_bindings, wheel_bindings);
+   _e_bindings_wheel_free(bind);
  }
 }
 
Index: e_bindings.h
===
RCS file: /cvs/e/e17/apps/e/src/bin/e_bindings.h,v
retrieving revision 1.14
diff -u -r1.14 e_bindings.h
--- e_bindings.h21 Aug 2006 16:25:57 -  1.14
+++ e_bindings.h6 Sep 2006 13:44:36 -
@@ -86,6 +86,7 @@
 
 EAPI voide_bindings_mouse_add(E_Binding_Context ctxt, int button, 
E_Binding_Modifier mod, int any_mod, const char *action, const char *params);
 EAPI voide_bindings_mouse_del(E_Binding_Context ctxt, int button, 
E_Binding_Modifier mod, int any_mod, const char *action, const char *params);
+EAPI voide_bindings_mouse_clear(void);
 EAPI voide_bindings_mouse_grab(E_Binding_Context ctxt, Ecore_X_Window 
win);
 EAPI voide_bindings_mouse_ungrab(E_Binding_Context ctxt, 
Ecore_X_Window win);
 EAPI E_Action   *e_bindings_mouse_down_find(E_Binding_Context ctxt, E_Object 
*obj, Ecore_X_Event_Mouse_Button_Down *ev, E_Binding_Mouse **bind_ret);
@@ -95,6 +96,7 @@
 
 EAPI voide_bindings_key_add(E_Binding_Context ctxt, const char *key, 
E_Binding_Modifier mod, int any_mod, const char *action, const char *params);
 EAPI voide_bindings_key_del(E_Binding_Context 

Re: [E-devel] Binding clearing actions

2006-09-06 Thread The Rasterman
On Wed, 6 Sep 2006 19:25:37 +0530 R.Ramkumar [EMAIL PROTECTED]
babbled:

 Hi!
 
 Here's a patch to include ipc handlers for clearing all
 Mouse/Key/Signal/Wheel bindings in E. Though it is theoretically
 possible for an external program to read through the existing
 keybindings and erase them one after the other, this offers a faster
 and cleaner solution. This is useful when an external script is used
 to fully configure the keybindings from scratch, ignoring the default
 keybindings of E.

for now i don't think it's wise to accept this. as per previous emails - i have
the ipc config in my sights to nuke because once we have a complete gui for
all the config - there is no need to keep a very big lump of code for doing
this via ipc (not to mention that it is incomplete and lets you shoot yourself
in the foot etc. etc.)

-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel