diff options
Diffstat (limited to 'gtk/gtkmenu.c')
-rw-r--r-- | gtk/gtkmenu.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 80b554c95f..25bf3e6500 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -1423,13 +1423,18 @@ static gboolean gtk_menu_real_can_activate_accel (GtkWidget *widget, guint signal_id) { - /* menu items chain here to figure whether they can activate their accelerators. - * despite ordinary widgets, menus allow accel activation even if invisible - * since that's the usual case for submenus/popup-menus. however, the state - * of the attach widget affects "activeness" of the menu. + /* Menu items chain here to figure whether they can activate their + * accelerators. Unlike ordinary widgets, menus allow accel + * activation even if invisible since that's the usual case for + * submenus/popup-menus. however, the state of the attach widget + * affects the "activeness" of the menu. */ GtkWidget *awidget = gtk_menu_get_attach_widget (GTK_MENU (widget)); - return awidget ? gtk_widget_can_activate_accel (awidget, signal_id) : GTK_WIDGET_IS_SENSITIVE (widget); + + if (awidget) + return gtk_widget_can_activate_accel (awidget, signal_id); + else + return GTK_WIDGET_IS_SENSITIVE (widget); } /** |