[gtk+] gail: Fix the atk_add_key_event_listener implementation
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gail: Fix the atk_add_key_event_listener implementation
- Date: Thu, 17 Feb 2011 03:58:24 +0000 (UTC)
commit 66db0d698a4afaafe959c9f8ec90c9ef6e43d01d
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 16 22:57:25 2011 -0500
gail: Fix the atk_add_key_event_listener implementation
Based on a patch by Alejandro Piñeiro Iglesias,
https://bugzilla.gnome.org/show_bug.cgi?id=599907
modules/other/gail/gailutil.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/modules/other/gail/gailutil.c b/modules/other/gail/gailutil.c
index c6b8430..267c417 100644
--- a/modules/other/gail/gailutil.c
+++ b/modules/other/gail/gailutil.c
@@ -282,16 +282,18 @@ gail_key_snooper (GtkWidget *the_widget, GdkEventKey *event, gpointer func_data)
static guint
gail_util_add_key_event_listener (AtkKeySnoopFunc listener,
- gpointer data)
+ gpointer data)
{
- static guint key=0;
+ static guint key = 0;
if (!key_listener_list)
{
- key_listener_list = g_hash_table_new (NULL, NULL);
+ key_listener_list = g_hash_table_new (NULL, NULL);
key_snooper_id = gtk_key_snooper_install (gail_key_snooper, data);
}
- g_hash_table_insert (key_listener_list, GUINT_TO_POINTER (key++), (gpointer) listener);
+ key++;
+ g_hash_table_insert (key_listener_list, GUINT_TO_POINTER (key), (gpointer) listener);
/* XXX: we don't check to see if n_listeners > MAXUINT */
+
return key;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]