mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-17 23:50:16 +00:00
widget: Flip the sensitive flag even if the state doesn't change
Even if we can't change our sensitivity because the parent is insensitive we should still flip the sensitive flag. Otherwise, with and insensitive parent, child.set_sensitive(True) ... parent.set_sensitive(True) would result in child still being insensitive. https://bugzilla.gnome.org/show_bug.cgi?id=666392
This commit is contained in:
parent
b9fad15ee6
commit
9d6da33ff5
@ -7673,6 +7673,8 @@ gtk_widget_set_sensitive (GtkWidget *widget,
|
||||
if (priv->sensitive == sensitive)
|
||||
return;
|
||||
|
||||
priv->sensitive = sensitive;
|
||||
|
||||
if (priv->parent == NULL
|
||||
|| gtk_widget_is_sensitive (priv->parent))
|
||||
{
|
||||
@ -7681,15 +7683,9 @@ gtk_widget_set_sensitive (GtkWidget *widget,
|
||||
data.flags = GTK_STATE_FLAG_INSENSITIVE;
|
||||
|
||||
if (sensitive)
|
||||
{
|
||||
priv->sensitive = TRUE;
|
||||
data.operation = STATE_CHANGE_UNSET;
|
||||
}
|
||||
data.operation = STATE_CHANGE_UNSET;
|
||||
else
|
||||
{
|
||||
priv->sensitive = FALSE;
|
||||
data.operation = STATE_CHANGE_SET;
|
||||
}
|
||||
data.operation = STATE_CHANGE_SET;
|
||||
|
||||
data.use_forall = TRUE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user