From 0a78a592ffbd8fbf4a7313dfd7ad68b637522964 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 10 Jun 2021 08:36:08 -0400 Subject: [PATCH] togglebutton: Fix actionable state tracking If we have a GAction as model, we just have to let the action helper handle the state updates. GtkButton already calls gtk_action_helper_activate() for us. --- gtk/gtktogglebutton.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c index 4ea135ee48..1774508bc5 100644 --- a/gtk/gtktogglebutton.c +++ b/gtk/gtktogglebutton.c @@ -202,6 +202,9 @@ gtk_toggle_button_clicked (GtkButton *button) if (priv->active && (priv->group_prev || priv->group_next)) return; + if (gtk_button_get_action_helper (button)) + return; + gtk_toggle_button_set_active (toggle_button, !priv->active); }