[gtk/actionable-fixes: 5/6] togglebutton: Fix actionable state tracking
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/actionable-fixes: 5/6] togglebutton: Fix actionable state tracking
- Date: Thu, 10 Jun 2021 12:38:44 +0000 (UTC)
commit 0a78a592ffbd8fbf4a7313dfd7ad68b637522964
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jun 10 08:36:08 2021 -0400
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]