extensions-app: Use banner instead of action bar

Action bars have largely gone out of fashion, and Banner is an
appropriate replacement in our case, so switch to that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3048>
This commit is contained in:
Florian Müllner
2023-12-07 19:10:40 +01:00
committed by Marge Bot
parent 33c074c738
commit 2d34fbe2e7
2 changed files with 44 additions and 83 deletions

View File

@ -88,8 +88,7 @@ var ExtensionsWindow = GObject.registerClass({
'searchBar',
'searchButton',
'searchEntry',
'updatesBar',
'updatesLabel',
'updatesBanner',
],
}, class ExtensionsWindow extends Adw.ApplicationWindow {
_init(params) {
@ -341,11 +340,11 @@ var ExtensionsWindow = GObject.registerClass({
_checkUpdates() {
let nUpdates = [...this._userList].filter(c => c.hasUpdate).length;
this._updatesLabel.label = Gettext.ngettext(
this._updatesBanner.title = Gettext.ngettext(
'%d extension will be updated on next login.',
'%d extensions will be updated on next login.',
nUpdates).format(nUpdates);
this._updatesBar.revealed = nUpdates > 0;
this._updatesBanner.revealed = nUpdates > 0;
}
_extensionsLoaded() {