st-widget: Don't use deprecated API
clutter_container_foreach is deprecated, so let's replace that with some ClutterActorIter usage. Additionally, remove the checks for ClutterContainer, as all ClutterActors are now ClutterContainers. https://bugzilla.gnome.org/show_bug.cgi?id=670034
This commit is contained in:
parent
b47fd6df31
commit
f19ee78fb2
@ -394,25 +394,20 @@ st_widget_unmap (ClutterActor *actor)
|
|||||||
st_widget_set_hover (self, FALSE);
|
st_widget_set_hover (self, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void notify_children_of_style_change (ClutterContainer *container);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
notify_children_of_style_change_foreach (ClutterActor *actor,
|
notify_children_of_style_change (ClutterActor *self)
|
||||||
gpointer user_data)
|
|
||||||
{
|
{
|
||||||
if (ST_IS_WIDGET (actor))
|
ClutterActorIter iter;
|
||||||
st_widget_style_changed (ST_WIDGET (actor));
|
ClutterActor *actor;
|
||||||
else if (CLUTTER_IS_CONTAINER (actor))
|
|
||||||
notify_children_of_style_change ((ClutterContainer *)actor);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
clutter_actor_iter_init (&iter, self);
|
||||||
notify_children_of_style_change (ClutterContainer *container)
|
while (clutter_actor_iter_next (&iter, &actor))
|
||||||
{
|
{
|
||||||
/* notify our children that their parent stylable has changed */
|
if (ST_IS_WIDGET (actor))
|
||||||
clutter_container_foreach (container,
|
st_widget_style_changed (ST_WIDGET (actor));
|
||||||
notify_children_of_style_change_foreach,
|
else
|
||||||
NULL);
|
notify_children_of_style_change (actor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -425,9 +420,7 @@ st_widget_real_style_changed (StWidget *self)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
clutter_actor_queue_redraw ((ClutterActor *) self);
|
clutter_actor_queue_redraw ((ClutterActor *) self);
|
||||||
|
notify_children_of_style_change ((ClutterActor *) self);
|
||||||
if (CLUTTER_IS_CONTAINER (self))
|
|
||||||
notify_children_of_style_change ((ClutterContainer *)self);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -454,7 +447,7 @@ static void
|
|||||||
on_theme_context_changed (StThemeContext *context,
|
on_theme_context_changed (StThemeContext *context,
|
||||||
ClutterStage *stage)
|
ClutterStage *stage)
|
||||||
{
|
{
|
||||||
notify_children_of_style_change (CLUTTER_CONTAINER (stage));
|
notify_children_of_style_change (CLUTTER_ACTOR (stage));
|
||||||
}
|
}
|
||||||
|
|
||||||
static StThemeNode *
|
static StThemeNode *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user