forked from AuroraMiddleware/gtk
togglebutton: Fix expected group behavior
The expectation is that a grouped button stays active when you click it. Grouped check buttons behave this way, and grouped toggle buttons should too.
This commit is contained in:
parent
7b84ffd378
commit
06c0012dd4
@ -199,6 +199,9 @@ gtk_toggle_button_clicked (GtkButton *button)
|
||||
GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button);
|
||||
GtkToggleButtonPrivate *priv = gtk_toggle_button_get_instance_private (toggle_button);
|
||||
|
||||
if (priv->active && (priv->group_prev || priv->group_next))
|
||||
return;
|
||||
|
||||
gtk_toggle_button_set_active (toggle_button, !priv->active);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user