Mercurial > pidgin
diff finch/libgnt/gntbindable.c @ 22899:24dfef623410
Check if a key is already bound before assigning a menu trigger
author | Richard Nelson <wabz@pidgin.im> |
---|---|
date | Sun, 11 May 2008 07:20:42 +0000 |
parents | c38d72677c8a |
children | e2e57d3c0578 |
line wrap: on
line diff
--- a/finch/libgnt/gntbindable.c Sun May 11 05:08:08 2008 +0000 +++ b/finch/libgnt/gntbindable.c Sun May 11 07:20:42 2008 +0000 @@ -339,6 +339,13 @@ return FALSE; } +gboolean +gnt_bindable_check_key(GntBindable *bindable, const char *keys) { + GntBindableClass *klass = GNT_BINDABLE_CLASS(GNT_BINDABLE_GET_CLASS(bindable)); + GntBindableActionParam *param = g_hash_table_lookup(klass->bindings, keys); + return (param && param->action); +} + static void register_binding(GntBindableClass *klass, const char *name, const char *trigger, GList *list) {