extensions-app: Remember window state

It's good practice to save and reload the window size and
maximization state, and easy enough to implement, so let's
do that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3115>
This commit is contained in:
Florian Müllner
2024-01-13 23:34:00 +01:00
parent 2d380a3995
commit 41b94ccf11
5 changed files with 35 additions and 2 deletions

View File

@ -59,6 +59,20 @@ export const ExtensionsWindow = GObject.registerClass({
},
}]);
const settings = new Gio.Settings({
schema_id: 'org.gnome.Extensions',
});
settings.bind('window-width',
this, 'default-width',
Gio.SettingsBindFlags.DEFAULT);
settings.bind('window-height',
this, 'default-height',
Gio.SettingsBindFlags.DEFAULT);
settings.bind('window-maximized',
this, 'maximized',
Gio.SettingsBindFlags.DEFAULT);
this._searchEntry.connect('search-changed',
() => (this._searchFilter.search = this._searchEntry.text));
this._searchBar.connect('notify::search-mode-enabled',