diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-01-05 22:42:09 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-01-05 22:45:39 -0500 |
commit | a4e4d7d1fdd0a4603a8bbe7bdfb9ff409c686b61 (patch) | |
tree | 8dcb38d945fc60fdb80d64c5198d57dc826311a6 /gtk/a11y | |
parent | 1f9da6675d09573d9cc5ab28ea471f5d4f133003 (diff) | |
download | gtk+-a4e4d7d1fdd0a4603a8bbe7bdfb9ff409c686b61.tar.gz |
GtkMenuItem: fix initial accessible selection state
When the accessible is created for an already-selected
menuitem, we were not properly setting the state of the
the accessible. Fix that.
Diffstat (limited to 'gtk/a11y')
-rw-r--r-- | gtk/a11y/gtkmenuitemaccessible.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/a11y/gtkmenuitemaccessible.c b/gtk/a11y/gtkmenuitemaccessible.c index 2e3fe75e48..b29e5cc1ed 100644 --- a/gtk/a11y/gtkmenuitemaccessible.c +++ b/gtk/a11y/gtkmenuitemaccessible.c @@ -60,11 +60,13 @@ gtk_menu_item_accessible_initialize (AtkObject *obj, GtkWidget *menu; ATK_OBJECT_CLASS (gtk_menu_item_accessible_parent_class)->initialize (obj, data); - g_signal_connect (data, "select", G_CALLBACK (menu_item_select), NULL); g_signal_connect (data, "deselect", G_CALLBACK (menu_item_deselect), NULL); widget = GTK_WIDGET (data); + if ((gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_PRELIGHT) != 0) + GTK_MENU_ITEM_ACCESSIBLE (obj)->priv->selected = TRUE; + parent = gtk_widget_get_parent (widget); if (GTK_IS_MENU (parent)) { |