Merge branch 'wip/exalm/check-activate' into 'master'

checkbutton: Don't allow to uncheck radios by activating them

See merge request GNOME/gtk!3569
This commit is contained in:
Matthias Clasen 2021-05-21 02:06:58 +00:00
commit f5bd9f721c

View File

@ -475,10 +475,14 @@ gtk_check_button_focus (GtkWidget *widget,
}
static void
gtk_check_button_real_activate (GtkCheckButton *check_button)
gtk_check_button_real_activate (GtkCheckButton *self)
{
gtk_check_button_set_active (check_button,
!gtk_check_button_get_active (check_button));
GtkCheckButtonPrivate *priv = gtk_check_button_get_instance_private (self);
if (priv->active && (priv->group_prev || priv->group_next))
return;
gtk_check_button_set_active (self, !gtk_check_button_get_active (self));
}
static void