From 69f6a002f5ad4538c54a3048d9480b391bf19220 Mon Sep 17 00:00:00 2001 From: sebastid Date: Tue, 10 May 2005 10:34:19 +0000 Subject: [PATCH] Free SVN revision: 14693 --- src/bin/e_actions.c | 19 ++++++++++++++++++- src/bin/e_bindings.c | 23 ++++++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/bin/e_actions.c b/src/bin/e_actions.c index af7730a48..da26523b3 100644 --- a/src/bin/e_actions.c +++ b/src/bin/e_actions.c @@ -48,6 +48,7 @@ static void _e_actions_act_##act##_end_key(E_Object *obj, char *params, Ecore_X_Event_Key_Up *ev) /* local subsystem functions */ +static Evas_Bool _e_actions_cb_free(Evas_Hash *hash, const char *key, void *data, void *fdata); /* to save writing this in N places - the sctions are defined here */ /***************************************************************************/ @@ -549,7 +550,12 @@ e_actions_init(void) int e_actions_shutdown(void) { - /* FIXME: free actions */ + if (actions) + { + evas_hash_foreach(actions, _e_actions_cb_free, NULL); + evas_hash_free(actions); + actions = NULL; + } return 1; } @@ -593,3 +599,14 @@ e_action_del(char *name) } /* local subsystem functions */ +static Evas_Bool +_e_actions_cb_free(Evas_Hash *hash __UNUSED__, const char *key __UNUSED__, + void *data, void *fdata __UNUSED__) +{ + E_Action *act; + + act = data; + IF_FREE(act->name); + free(act); + return 0; +} diff --git a/src/bin/e_bindings.c b/src/bin/e_bindings.c index 39e75261c..f86fdd614 100644 --- a/src/bin/e_bindings.c +++ b/src/bin/e_bindings.c @@ -77,7 +77,28 @@ e_bindings_init(void) int e_bindings_shutdown(void) { - /* FIXME: free bindings */ + Evas_List *l; + + for (l = mouse_bindings; l; l = l->next) + { + E_Binding_Mouse *bind; + + bind = l->data; + _e_bindings_mouse_free(bind); + } + evas_list_free(mouse_bindings); + mouse_bindings = NULL; + + for (l = key_bindings; l; l = l->next) + { + E_Binding_Key *bind; + + bind = l->data; + _e_bindings_key_free(bind); + } + evas_list_free(key_bindings); + key_bindings = NULL; + return 1; }