📝 Add the functionality to the choose-all and choose-none buttons

This commit is contained in:
Simon Schneegans
2023-08-05 13:38:47 +02:00
parent 2447d40885
commit 5d105a99c1
2 changed files with 15 additions and 2 deletions
+13
View File
@@ -197,6 +197,19 @@ var PreferencesDialog = class PreferencesDialog {
// This is our top-level widget which we will return later.
this._widget = this._builder.get_object('general-prefs');
// Add the functionality to the choose-all and choose-none buttons.
this._builder.get_object('choose-all-effects-button').connect('clicked', () => {
this._ALL_EFFECTS.forEach(effect => {
this.getProfileSettings().set_boolean(`${effect.getNick()}-enable-effect`, true);
});
});
this._builder.get_object('choose-no-effects-button').connect('clicked', () => {
this._ALL_EFFECTS.forEach(effect => {
this.getProfileSettings().set_boolean(`${effect.getNick()}-enable-effect`, false);
});
});
// Then add a preferences group for the effect expander rows.
const group = this._builder.get_object('effects-group');