[gtk+] GtkMenuItem: fix initial accessible selection state
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkMenuItem: fix initial accessible selection state
- Date: Mon, 6 Jan 2014 03:45:50 +0000 (UTC)
commit a4e4d7d1fdd0a4603a8bbe7bdfb9ff409c686b61
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jan 5 22:42:09 2014 -0500
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.
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 2e3fe75..b29e5cc 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))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]