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:
parent
ab7ed393cb
commit
596efc3fa9
@ -1005,8 +1005,8 @@ class CalendarMessageList extends St.Widget {
|
|||||||
y_align: Clutter.ActorAlign.START,
|
y_align: Clutter.ActorAlign.START,
|
||||||
});
|
});
|
||||||
this._sectionList.connectObject(
|
this._sectionList.connectObject(
|
||||||
'actor-added', this._sync.bind(this),
|
'child-added', this._sync.bind(this),
|
||||||
'actor-removed', this._sync.bind(this),
|
'child-removed', this._sync.bind(this),
|
||||||
this);
|
this);
|
||||||
this._scrollView.child = this._sectionList;
|
this._scrollView.child = this._sectionList;
|
||||||
|
|
||||||
|
@ -1192,8 +1192,8 @@ export const IconGrid = GObject.registerClass({
|
|||||||
this._currentPage = 0;
|
this._currentPage = 0;
|
||||||
this._currentMode = -1;
|
this._currentMode = -1;
|
||||||
|
|
||||||
this.connect('actor-added', this._childAdded.bind(this));
|
this.connect('child-added', this._childAdded.bind(this));
|
||||||
this.connect('actor-removed', this._childRemoved.bind(this));
|
this.connect('child-removed', this._childRemoved.bind(this));
|
||||||
this.connect('destroy', () => layoutManager.disconnect(pagesChangedId));
|
this.connect('destroy', () => layoutManager.disconnect(pagesChangedId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,8 +157,8 @@ export const Lightbox = GObject.registerClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
container.connectObject(
|
container.connectObject(
|
||||||
'actor-added', this._actorAdded.bind(this),
|
'child-added', this._childAdded.bind(this),
|
||||||
'actor-removed', this._actorRemoved.bind(this), this);
|
'child-removed', this._childRemoved.bind(this), this);
|
||||||
|
|
||||||
this._highlighted = null;
|
this._highlighted = null;
|
||||||
}
|
}
|
||||||
@ -167,7 +167,7 @@ export const Lightbox = GObject.registerClass({
|
|||||||
return this._active;
|
return this._active;
|
||||||
}
|
}
|
||||||
|
|
||||||
_actorAdded(container, newChild) {
|
_childAdded(container, newChild) {
|
||||||
let children = this._container.get_children();
|
let children = this._container.get_children();
|
||||||
let myIndex = children.indexOf(this);
|
let myIndex = children.indexOf(this);
|
||||||
let newChildIndex = children.indexOf(newChild);
|
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);
|
let index = this._children.indexOf(child);
|
||||||
if (index !== -1) // paranoia
|
if (index !== -1) // paranoia
|
||||||
this._children.splice(index, 1);
|
this._children.splice(index, 1);
|
||||||
|
@ -950,10 +950,10 @@ class ActorTreeViewer extends St.BoxLayout {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
data.visible = true;
|
data.visible = true;
|
||||||
data.actorAddedId = actor.connect('actor-added', (container, child) => {
|
data.actorAddedId = actor.connect('child-added', (container, child) => {
|
||||||
this._addActor(data.children, child);
|
this._addActor(data.children, child);
|
||||||
});
|
});
|
||||||
data.actorRemovedId = actor.connect('actor-removed', (container, child) => {
|
data.actorRemovedId = actor.connect('child-removed', (container, child) => {
|
||||||
this._removeActor(child);
|
this._removeActor(child);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -576,8 +576,8 @@ export const MessageListSection = GObject.registerClass({
|
|||||||
});
|
});
|
||||||
this.add_child(this._list);
|
this.add_child(this._list);
|
||||||
|
|
||||||
this._list.connect('actor-added', this._sync.bind(this));
|
this._list.connect('child-added', this._sync.bind(this));
|
||||||
this._list.connect('actor-removed', this._sync.bind(this));
|
this._list.connect('child-removed', this._sync.bind(this));
|
||||||
|
|
||||||
Main.sessionMode.connectObject(
|
Main.sessionMode.connectObject(
|
||||||
'updated', () => this._sync(), this);
|
'updated', () => this._sync(), this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user