summaryrefslogtreecommitdiff
path: root/gtk/a11y
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-01-04 21:48:19 -0500
committerMatthias Clasen <mclasen@redhat.com>2014-01-04 21:53:31 -0500
commit8085b410742b2183fd599221f90fff569048b7e8 (patch)
tree366c545a32a93622fba3c3e5942552a47eddec0c /gtk/a11y
parent2a3d5823f485f0885c4f9cf46c1403464c963b70 (diff)
downloadgtk+-8085b410742b2183fd599221f90fff569048b7e8.tar.gz
GtkCheckMenuItemAccessible: Make work with model menu items
GtkModelMenuItem does not emit the ::toggled signal when a radio item is activated, so listen for property notification for that property. We still keep the ::toggled signal handler, in order to not break other uses of check and radio menu items. https://bugzilla.gnome.org/show_bug.cgi?id=720983
Diffstat (limited to 'gtk/a11y')
-rw-r--r--gtk/a11y/gtkcheckmenuitemaccessible.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/a11y/gtkcheckmenuitemaccessible.c b/gtk/a11y/gtkcheckmenuitemaccessible.c
index 694fec4506..e0011f5a3a 100644
--- a/gtk/a11y/gtkcheckmenuitemaccessible.c
+++ b/gtk/a11y/gtkcheckmenuitemaccessible.c
@@ -84,10 +84,12 @@ gtk_check_menu_item_accessible_notify_gtk (GObject *obj,
AtkObject *atk_obj;
gboolean sensitive;
gboolean inconsistent;
+ gboolean active;
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (check_menu_item));
sensitive = gtk_widget_get_sensitive (GTK_WIDGET (check_menu_item));
inconsistent = gtk_check_menu_item_get_inconsistent (check_menu_item);
+ active = gtk_check_menu_item_get_active (check_menu_item);
if (strcmp (pspec->name, "inconsistent") == 0)
{
@@ -100,6 +102,10 @@ gtk_check_menu_item_accessible_notify_gtk (GObject *obj,
atk_object_notify_state_change (atk_obj, ATK_STATE_SENSITIVE, sensitive);
atk_object_notify_state_change (atk_obj, ATK_STATE_ENABLED, (sensitive && !inconsistent));
}
+ else if (strcmp (pspec->name, "active") == 0)
+ {
+ atk_object_notify_state_change (atk_obj, ATK_STATE_CHECKED, active);
+ }
else
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_check_menu_item_accessible_parent_class)->notify_gtk (obj, pspec);
}