js: Adapt for ::child-{added,removed}

These were previously known as ::actor-{added,removed}

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3014>
This commit is contained in:
Zander Brown
2023-11-14 10:52:53 +00:00
parent ab7ed393cb
commit 596efc3fa9
5 changed files with 12 additions and 12 deletions

View File

@ -157,8 +157,8 @@ export const Lightbox = GObject.registerClass({
}
container.connectObject(
'actor-added', this._actorAdded.bind(this),
'actor-removed', this._actorRemoved.bind(this), this);
'child-added', this._childAdded.bind(this),
'child-removed', this._childRemoved.bind(this), this);
this._highlighted = null;
}
@ -167,7 +167,7 @@ export const Lightbox = GObject.registerClass({
return this._active;
}
_actorAdded(container, newChild) {
_childAdded(container, newChild) {
let children = this._container.get_children();
let myIndex = children.indexOf(this);
let newChildIndex = children.indexOf(newChild);
@ -241,7 +241,7 @@ export const Lightbox = GObject.registerClass({
}
}
_actorRemoved(container, child) {
_childRemoved(container, child) {
let index = this._children.indexOf(child);
if (index !== -1) // paranoia
this._children.splice(index, 1);