summaryrefslogtreecommitdiff
path: root/modules/other/gail/gailcheckmenuitem.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/other/gail/gailcheckmenuitem.c')
-rw-r--r--modules/other/gail/gailcheckmenuitem.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/other/gail/gailcheckmenuitem.c b/modules/other/gail/gailcheckmenuitem.c
index 45c3c5b786..e203e189c7 100644
--- a/modules/other/gail/gailcheckmenuitem.c
+++ b/modules/other/gail/gailcheckmenuitem.c
@@ -138,7 +138,19 @@ gail_check_menu_item_real_notify_gtk (GObject *obj,
if (strcmp (pspec->name, "inconsistent") == 0)
atk_object_notify_state_change (atk_obj, ATK_STATE_ENABLED,
- !gtk_check_menu_item_get_inconsistent (check_menu_item));
+ (gtk_widget_get_sensitive (GTK_WIDGET (check_menu_item)) &&
+ !gtk_check_menu_item_get_inconsistent (check_menu_item)));
+ else if (strcmp (pspec->name, "sensitive") == 0)
+ {
+ /* Need to override gailwidget behavior of notifying for ENABLED */
+ gboolean sensitive;
+ gboolean enabled;
+ sensitive = gtk_widget_get_sensitive (GTK_WIDGET (check_menu_item));
+ enabled = sensitive &&
+ !gtk_check_menu_item_get_inconsistent (check_menu_item);
+ atk_object_notify_state_change (atk_obj, ATK_STATE_SENSITIVE, sensitive);
+ atk_object_notify_state_change (atk_obj, ATK_STATE_ENABLED, enabled);
+ }
else
GAIL_WIDGET_CLASS (gail_check_menu_item_parent_class)->notify_gtk (obj, pspec);
}