From: Florian Müllner Date: Fri, 30 Jul 2021 05:40:48 +0000 (+0200) Subject: checkbutton: Delegate ::activate to the helper if appropriate X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~1^2~53^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c50475de34f66a97ea8fb57c722d7290b9f60d44;p=gtk4.git checkbutton: Delegate ::activate to the helper if appropriate If the button is associated with an action, the action is currently only activated when the button is clicked, not when it is activated. --- diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index 9860641ac6..9471f6d3c6 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -498,7 +498,10 @@ gtk_check_button_real_activate (GtkCheckButton *self) if (priv->active && (priv->group_prev || priv->group_next)) return; - gtk_check_button_set_active (self, !gtk_check_button_get_active (self)); + if (priv->action_helper) + gtk_action_helper_activate (priv->action_helper); + else + gtk_check_button_set_active (self, !gtk_check_button_get_active (self)); } static void