js: Cleanup use of StBin

StBins (inc StButton) should have their content managed via :child
rather than add_child()

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3010>
This commit is contained in:
Zander Brown
2023-11-08 10:20:03 +00:00
committed by Marge Bot
parent 49cca32ca5
commit a830edf8cf
7 changed files with 29 additions and 24 deletions

View File

@ -965,7 +965,7 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList {
let clone = _createWindowClone(mutterWindow, thumbnailSize);
this._thumbnailBins[i].set_height(binHeight);
this._thumbnailBins[i].add_child(clone);
this._thumbnailBins[i].child = clone;
mutterWindow.connectObject('destroy',
source => this._removeThumbnail(source, clone), this);