Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
22898:3d7e9eff04d0 | 22899:24dfef623410 |
---|---|
337 return param->action->u.action_noparam(bindable); | 337 return param->action->u.action_noparam(bindable); |
338 } | 338 } |
339 return FALSE; | 339 return FALSE; |
340 } | 340 } |
341 | 341 |
342 gboolean | |
343 gnt_bindable_check_key(GntBindable *bindable, const char *keys) { | |
344 GntBindableClass *klass = GNT_BINDABLE_CLASS(GNT_BINDABLE_GET_CLASS(bindable)); | |
345 GntBindableActionParam *param = g_hash_table_lookup(klass->bindings, keys); | |
346 return (param && param->action); | |
347 } | |
348 | |
342 static void | 349 static void |
343 register_binding(GntBindableClass *klass, const char *name, const char *trigger, GList *list) | 350 register_binding(GntBindableClass *klass, const char *name, const char *trigger, GList *list) |
344 { | 351 { |
345 GntBindableActionParam *param; | 352 GntBindableActionParam *param; |
346 GntBindableAction *action; | 353 GntBindableAction *action; |