GtkStack: Avoid a few redundant notify emissions
A few of the property setters were missing the standard checks.
This commit is contained in:
parent
0a681f9224
commit
d591341bd1
@ -1315,6 +1315,9 @@ gtk_stack_set_transition_duration (GtkStack *stack,
|
|||||||
|
|
||||||
g_return_if_fail (GTK_IS_STACK (stack));
|
g_return_if_fail (GTK_IS_STACK (stack));
|
||||||
|
|
||||||
|
if (priv->transition_duration == duration)
|
||||||
|
return;
|
||||||
|
|
||||||
priv->transition_duration = duration;
|
priv->transition_duration = duration;
|
||||||
g_object_notify_by_pspec (G_OBJECT (stack),
|
g_object_notify_by_pspec (G_OBJECT (stack),
|
||||||
stack_props[PROP_TRANSITION_DURATION]);
|
stack_props[PROP_TRANSITION_DURATION]);
|
||||||
@ -1364,6 +1367,9 @@ gtk_stack_set_transition_type (GtkStack *stack,
|
|||||||
|
|
||||||
g_return_if_fail (GTK_IS_STACK (stack));
|
g_return_if_fail (GTK_IS_STACK (stack));
|
||||||
|
|
||||||
|
if (priv->transition_type == transition)
|
||||||
|
return;
|
||||||
|
|
||||||
priv->transition_type = transition;
|
priv->transition_type = transition;
|
||||||
g_object_notify_by_pspec (G_OBJECT (stack),
|
g_object_notify_by_pspec (G_OBJECT (stack),
|
||||||
stack_props[PROP_TRANSITION_TYPE]);
|
stack_props[PROP_TRANSITION_TYPE]);
|
||||||
|
Loading…
Reference in New Issue
Block a user