📝 Add the functionality to the choose-all and choose-none buttons
This commit is contained in:
@@ -197,6 +197,19 @@ var PreferencesDialog = class PreferencesDialog {
|
|||||||
// This is our top-level widget which we will return later.
|
// This is our top-level widget which we will return later.
|
||||||
this._widget = this._builder.get_object('general-prefs');
|
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.
|
// Then add a preferences group for the effect expander rows.
|
||||||
const group = this._builder.get_object('effects-group');
|
const group = this._builder.get_object('effects-group');
|
||||||
|
|
||||||
|
|||||||
@@ -232,13 +232,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton" id="choose-all-effects-button">
|
||||||
<property name="label" translatable="yes">All</property>
|
<property name="label" translatable="yes">All</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton" id="choose-no-effects-button">
|
||||||
<property name="label" translatable="yes">None</property>
|
<property name="label" translatable="yes">None</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
Reference in New Issue
Block a user