🔀 Merge pull request #359 from Schneegans/feature/batch-effect-selection

This commit is contained in:
Simon Schneegans
2023-08-06 12:29:11 +02:00
committed by GitHub
21 changed files with 129 additions and 36 deletions
+8
View File
@@ -5,6 +5,14 @@ SPDX-License-Identifier: CC-BY-4.0
# Changelog of the Burn-My-Windows Extension
## [Burn My Windows 36](https://github.com/schneegans/Burn-My-Windows/releases/tag/v36)
**Release Date:** TBD
#### New Features
- Two convenience buttons have been added to the preferences dialog. One allows you to select all effects, the other one allows you to deselect all effects.
## [Burn My Windows 35](https://github.com/schneegans/Burn-My-Windows/releases/tag/v35)
**Release Date:** 2023-07-03
+18 -5
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');
@@ -297,12 +310,12 @@ var PreferencesDialog = class PreferencesDialog {
}
});
this._effectRows.push(row);
row.add_action(previewButton);
row.add_action(button);
} else {
row.add_suffix(previewButton);
row.add_suffix(button);
}
row.add_prefix(button);
row.add_prefix(previewButton);
group.add(row);
@@ -321,9 +334,9 @@ var PreferencesDialog = class PreferencesDialog {
{label: effect.getLabel(), hexpand: true, halign: Gtk.Align.START});
label.get_style_context().add_class('heading');
this.gtkBoxAppend(header, button);
this.gtkBoxAppend(header, label);
this.gtkBoxAppend(header, previewButton);
this.gtkBoxAppend(header, label);
this.gtkBoxAppend(header, button);
this.gtkBoxAppend(container, header);
if (hasPrefs) {
+7 -7
View File
@@ -221,10 +221,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
<property name="margin-bottom">20</property>
<property name="margin-start">20</property>
<property name="margin-end">20</property>
<property name="title" translatable="yes">Effect Settings</property>
<property name="title" translatable="yes">Effect Selection</property>
<property name="description" translatable="yes">If multiple are selected, one is chosen randomly.</property>
<!-- <child type="header-suffix">
<child type="header-suffix">
<object class="GtkBox">
<property name="valign">center</property>
<style>
@@ -232,19 +232,19 @@ SPDX-License-Identifier: GPL-3.0-or-later
</style>
<child>
<object class="GtkButton">
<property name="icon-name">bmw-copy-effects-symbolic</property>
<object class="GtkButton" id="choose-all-effects-button">
<property name="label" translatable="yes">All</property>
</object>
</child>
<child>
<object class="GtkButton">
<property name="icon-name">bmw-paste-effects-symbolic</property>
<object class="GtkButton" id="choose-no-effects-button">
<property name="label" translatable="yes">None</property>
</object>
</child>
</object>
</child> -->
</child>
</object>
</child>
</object>
+48 -12
View File
@@ -120,19 +120,55 @@ SPDX-License-Identifier: GPL-3.0-or-later
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Effect Settings</property>
<property name="halign">start</property>
<style>
<class name="heading" />
</style>
</object>
</child>
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
<property name="halign">start</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="hexpand">true</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Effect Selection</property>
<property name="halign">start</property>
<style>
<class name="heading" />
</style>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
<property name="halign">start</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="valign">center</property>
<style>
<class name="linked" />
</style>
<child>
<object class="GtkButton" id="choose-all-effects-button">
<property name="label" translatable="yes">All</property>
</object>
</child>
<child>
<object class="GtkButton" id="choose-no-effects-button">
<property name="label" translatable="yes">None</property>
</object>
</child>
</object>
</child>
</object>
</child>
+48 -12
View File
@@ -78,19 +78,55 @@ SPDX-License-Identifier: GPL-3.0-or-later
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Effect Settings</property>
<property name="halign">start</property>
<style>
<class name="heading" />
</style>
</object>
</child>
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
<property name="halign">start</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="hexpand">true</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Effect Selection</property>
<property name="halign">start</property>
<style>
<class name="heading" />
</style>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">If multiple are selected, one is chosen randomly.</property>
<property name="halign">start</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="valign">center</property>
<style>
<class name="linked" />
</style>
<child>
<object class="GtkButton" id="choose-all-effects-button">
<property name="label" translatable="yes">All</property>
</object>
</child>
<child>
<object class="GtkButton" id="choose-no-effects-button">
<property name="label" translatable="yes">None</property>
</object>
</child>
</object>
</child>
</object>
</child>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB