clutter/actor: Remove clutter_actor_unparent
Pretty much the same set of changes of the previous commit, but for clutter_actor_unparent(). https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1332
This commit is contained in:
parent
59e454f01e
commit
237f277641
4 changed files with 2 additions and 49 deletions
|
@ -4324,14 +4324,6 @@ typedef enum
|
|||
REMOVE_CHILD_FLUSH_QUEUE |
|
||||
REMOVE_CHILD_NOTIFY_FIRST_LAST |
|
||||
REMOVE_CHILD_CLEAR_STAGE_VIEWS,
|
||||
|
||||
/* flags for legacy/deprecated API */
|
||||
REMOVE_CHILD_LEGACY_FLAGS = REMOVE_CHILD_STOP_TRANSITIONS |
|
||||
REMOVE_CHILD_CHECK_STATE |
|
||||
REMOVE_CHILD_FLUSH_QUEUE |
|
||||
REMOVE_CHILD_EMIT_PARENT_SET |
|
||||
REMOVE_CHILD_NOTIFY_FIRST_LAST |
|
||||
REMOVE_CHILD_CLEAR_STAGE_VIEWS
|
||||
} ClutterActorRemoveChildFlags;
|
||||
|
||||
/*< private >
|
||||
|
@ -13307,36 +13299,6 @@ clutter_actor_replace_child (ClutterActor *self,
|
|||
&clos);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_actor_unparent:
|
||||
* @self: a #ClutterActor
|
||||
*
|
||||
* Removes the parent of @self.
|
||||
*
|
||||
* This will cause the parent of @self to release the reference
|
||||
* acquired when calling clutter_actor_set_parent(), so if you
|
||||
* want to keep @self you will have to acquire a reference of
|
||||
* your own, through g_object_ref().
|
||||
*
|
||||
* This function should only be called by legacy #ClutterActor<!-- -->s
|
||||
* implementing the #ClutterContainer interface.
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_remove_child() instead.
|
||||
*/
|
||||
void
|
||||
clutter_actor_unparent (ClutterActor *self)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||
|
||||
if (self->priv->parent == NULL)
|
||||
return;
|
||||
|
||||
clutter_actor_remove_child_internal (self->priv->parent, self,
|
||||
REMOVE_CHILD_LEGACY_FLAGS);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_actor_contains:
|
||||
* @self: A #ClutterActor
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_actor_remove_child)
|
||||
void clutter_actor_unparent (ClutterActor *self);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
void clutter_actor_show_all (ClutterActor *self);
|
||||
|
||||
|
|
|
@ -142,13 +142,7 @@ clutter_group_real_remove (ClutterContainer *container,
|
|||
g_object_ref (actor);
|
||||
|
||||
priv->children = g_list_remove (priv->children, actor);
|
||||
clutter_actor_unparent (actor);
|
||||
|
||||
clutter_actor_queue_relayout (CLUTTER_ACTOR (container));
|
||||
|
||||
g_signal_emit_by_name (container, "actor-removed", actor);
|
||||
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (container));
|
||||
clutter_actor_remove_child (CLUTTER_ACTOR (container), actor);
|
||||
|
||||
g_object_unref (actor);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ test_destroy_remove (ClutterContainer *container,
|
|||
g_assert_true (g_list_find (self->children, actor));
|
||||
self->children = g_list_remove (self->children, actor);
|
||||
|
||||
clutter_actor_unparent (actor);
|
||||
clutter_actor_remove_child (CLUTTER_ACTOR (container), actor);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue