From 700b34148bd9e052bf521caeaff05c1373200972 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 5 Jan 2009 16:29:49 +0000 Subject: [PATCH] Remove the binding pool entry from the list When removing a binding entry from the binding pool we should not only remove it from the hash table, but also from the linked list we use to iterate over inside the block/unblock_action() pair. --- clutter/clutter-binding-pool.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/clutter/clutter-binding-pool.c b/clutter/clutter-binding-pool.c index 065310bcf..28082cb63 100644 --- a/clutter/clutter-binding-pool.c +++ b/clutter/clutter-binding-pool.c @@ -650,6 +650,7 @@ clutter_binding_pool_remove_action (ClutterBindingPool *pool, ClutterModifierType modifiers) { ClutterBindingEntry remove_entry = { 0, }; + GSList *l; g_return_if_fail (pool != NULL); g_return_if_fail (key_val != 0); @@ -659,6 +660,18 @@ clutter_binding_pool_remove_action (ClutterBindingPool *pool, remove_entry.key_val = key_val; remove_entry.modifiers = modifiers; + for (l = pool->entries; l != NULL; l = l->data) + { + ClutterBindingEntry *e = l->data; + + if (e->key_val == remove_entry.key_val && + e->modifiers == remove_entry.modifiers) + { + pool->entries = g_slist_remove_link (pool->entries, l); + break; + } + } + g_hash_table_remove (pool->entries_hash, &remove_entry); }