quickSettings: Add getFirstItem() method

We will need some more access to the menu's underlying grid to
provide extension API for adding additional quick items.

Expose a new getFirstItem() method that (surprise!) returns the
first item.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2894>
This commit is contained in:
Florian Müllner 2023-08-15 00:13:34 +02:00
parent 30a36c970b
commit 96bf9e700f

View File

@ -802,6 +802,10 @@ export const QuickSettingsMenu = class extends PopupMenu.PopupMenu {
}
}
getFirstItem() {
return this._grid.get_first_child();
}
open(animate) {
this.actor.show();
super.open(animate);