[gtk/wip/baedert/for-master] menubutton: Control sensitivity of child button
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master] menubutton: Control sensitivity of child button
- Date: Sun, 25 Aug 2019 12:49:35 +0000 (UTC)
commit c640607d448f0ec34e80affb5510a382899ead1e
Author: Timm Bäder <mail baedert org>
Date: Sun Aug 25 14:15:12 2019 +0200
menubutton: Control sensitivity of child button
Instead of the menubutton itself.
gtk/gtkmenubutton.c | 4 ++--
1 file 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]