mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
iconGrid: Use class handlers for ::child-{added,removed}
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3014>
This commit is contained in:
parent
0204920d8c
commit
d013555392
1 changed files with 2 additions and 4 deletions
|
|
@ -1192,12 +1192,10 @@ export const IconGrid = GObject.registerClass({
|
|||
this._currentPage = 0;
|
||||
this._currentMode = -1;
|
||||
|
||||
this.connect('child-added', this._childAdded.bind(this));
|
||||
this.connect('child-removed', this._childRemoved.bind(this));
|
||||
this.connect('destroy', () => layoutManager.disconnect(pagesChangedId));
|
||||
}
|
||||
|
||||
_childAdded(grid, child) {
|
||||
vfunc_child_added(child) {
|
||||
child._iconGridKeyFocusInId = child.connect('key-focus-in', () => {
|
||||
this._ensureItemIsVisible(child);
|
||||
});
|
||||
|
|
@ -1247,7 +1245,7 @@ export const IconGrid = GObject.registerClass({
|
|||
this._setGridMode(bestMode);
|
||||
}
|
||||
|
||||
_childRemoved(grid, child) {
|
||||
vfunc_child_removed(child) {
|
||||
child.disconnect(child._iconGridKeyFocusInId);
|
||||
delete child._iconGridKeyFocusInId;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue