diff options
author | Timm Bäder <mail@baedert.org> | 2019-08-25 14:15:12 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2019-09-09 17:36:24 +0200 |
commit | 5782871f91db119c4347d69b49eff2c3072eeeda (patch) | |
tree | 3d3c78917e15c68e3e2bfaabdb657ddbf5158bb5 /gtk/gtkmenubutton.c | |
parent | 0e9ac9e64b839397e05de1b694488135b08fe790 (diff) | |
download | gtk+-5782871f91db119c4347d69b49eff2c3072eeeda.tar.gz |
menubutton: Control sensitivity of child button
Instead of the menubutton itself.
Diffstat (limited to 'gtk/gtkmenubutton.c')
-rw-r--r-- | gtk/gtkmenubutton.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c index 33a16903ef..56443769fb 100644 --- a/gtk/gtkmenubutton.c +++ b/gtk/gtkmenubutton.c @@ -706,7 +706,7 @@ gtk_menu_button_init (GtkMenuButton *menu_button) g_signal_connect_swapped (priv->button, "toggled", G_CALLBACK (gtk_menu_button_toggled), menu_button); add_arrow (menu_button); - gtk_widget_set_sensitive (GTK_WIDGET (menu_button), FALSE); + gtk_widget_set_sensitive (priv->button, FALSE); context = gtk_widget_get_style_context (GTK_WIDGET (menu_button)); gtk_style_context_add_class (context, "popup"); @@ -758,7 +758,7 @@ update_sensitivity (GtkMenuButton *menu_button) { GtkMenuButtonPrivate *priv = gtk_menu_button_get_instance_private (menu_button); - gtk_widget_set_sensitive (GTK_WIDGET (menu_button), + gtk_widget_set_sensitive (priv->button, priv->menu != NULL || priv->popover != NULL || priv->create_popup_func != NULL); |