clutter/actor: Remove deprecated internal child support

Clutter had support for internal children in its early revisions, but they
were deprecated for long time (commit f41061b8df, more than 7 years ago) and
no one is using them in both clutter and in gnome-shell.

So remove any alternative code path that uses internal children.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/816
This commit is contained in:
Marco Trevisan (Treviño)
2019-09-10 02:22:07 +02:00
committed by Marco Trevisan
parent e17d70a592
commit 2773e8adf8
6 changed files with 13 additions and 221 deletions

View File

@ -60,13 +60,8 @@ test_destroy_remove (ClutterContainer *container,
clutter_actor_get_name (actor),
G_OBJECT_TYPE_NAME (actor));
g_assert (actor != self->bg);
g_assert (actor != self->label);
if (!g_list_find (self->children, actor))
g_assert (actor == self->tex);
else
self->children = g_list_remove (self->children, actor);
g_assert_true (g_list_find (self->children, actor));
self->children = g_list_remove (self->children, actor);
clutter_actor_unparent (actor);
}
@ -83,6 +78,8 @@ test_destroy_destroy (ClutterActor *self)
{
TestDestroy *test = TEST_DESTROY (self);
g_assert_cmpuint (g_list_length (test->children), ==, 4);
if (test->bg != NULL)
{
if (g_test_verbose ())
@ -116,7 +113,7 @@ test_destroy_destroy (ClutterActor *self)
test->tex = NULL;
}
g_assert_nonnull (test->children);
g_assert_cmpuint (g_list_length (test->children), ==, 1);
if (CLUTTER_ACTOR_CLASS (test_destroy_parent_class)->destroy)
CLUTTER_ACTOR_CLASS (test_destroy_parent_class)->destroy (self);
@ -135,23 +132,16 @@ test_destroy_class_init (TestDestroyClass *klass)
static void
test_destroy_init (TestDestroy *self)
{
clutter_actor_push_internal (CLUTTER_ACTOR (self));
if (g_test_verbose ())
g_print ("Adding internal children...\n");
self->bg = clutter_rectangle_new ();
clutter_actor_set_parent (self->bg, CLUTTER_ACTOR (self));
clutter_container_add_actor (CLUTTER_CONTAINER (self), self->bg);
clutter_actor_set_name (self->bg, "Background");
self->label = clutter_text_new ();
clutter_actor_set_parent (self->label, CLUTTER_ACTOR (self));
clutter_container_add_actor (CLUTTER_CONTAINER (self), self->label);
clutter_actor_set_name (self->label, "Label");
clutter_actor_pop_internal (CLUTTER_ACTOR (self));
self->tex = clutter_texture_new ();
clutter_actor_set_parent (self->tex, CLUTTER_ACTOR (self));
clutter_container_add_actor (CLUTTER_CONTAINER (self), self->tex);
clutter_actor_set_name (self->tex, "Texture");
}