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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user