diff options
author | Benjamin Otte <otte@redhat.com> | 2010-10-02 03:34:42 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-10-02 03:34:42 +0200 |
commit | e9c9193ff63f1fdbdec26f1fb7a0f9b10a2ce73c (patch) | |
tree | c9dc4c2db18740370a36b6af3a09731599d41fdf /modules | |
parent | 872ef111ecabf6cd4453590b1e17afd3c9757f28 (diff) | |
download | gtk+-e9c9193ff63f1fdbdec26f1fb7a0f9b10a2ce73c.tar.gz |
gail: Fix menu emission hooks
Ref the GtkmenuItem class, so we can add emission hooks. And actually
add the emission hooks again that were removed in
7c140feb6b18c6e158b83356370a85864758c4f9.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/other/gail/gail.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/other/gail/gail.c b/modules/other/gail/gail.c index d53fd56d98..07a619d2ce 100644 --- a/modules/other/gail/gail.c +++ b/modules/other/gail/gail.c @@ -697,6 +697,7 @@ gail_focus_tracker_init (void) * We cannot be sure that the classes exist so we make sure that they do. */ g_type_class_ref (GTK_TYPE_WIDGET); + g_type_class_ref (GTK_TYPE_MENU_ITEM); g_type_class_ref (GTK_TYPE_MENU_SHELL); g_type_class_ref (GTK_TYPE_NOTEBOOK); @@ -707,6 +708,22 @@ gail_focus_tracker_init (void) g_signal_add_emission_hook ( g_signal_lookup ("event-after", GTK_TYPE_WIDGET), 0, gail_focus_watcher, NULL, (GDestroyNotify) NULL); + /* + * A "select" signal is emitted when arrow key is used to + * move to a list item in the popup window of a GtkCombo or + * a menu item in a menu. + */ + g_signal_add_emission_hook ( + g_signal_lookup ("select", GTK_TYPE_MENU_ITEM), 0, + gail_select_watcher, NULL, (GDestroyNotify) NULL); + + /* + * A "deselect" signal is emitted when arrow key is used to + * move from a menu item in a menu to the parent menu. + */ + g_signal_add_emission_hook ( + g_signal_lookup ("deselect", GTK_TYPE_MENU_ITEM), 0, + gail_deselect_watcher, NULL, (GDestroyNotify) NULL); /* * We listen for deactivate signals on menushells to determine |