diff --git a/prefs.js b/prefs.js
index 82d7614..a997d24 100644
--- a/prefs.js
+++ b/prefs.js
@@ -394,6 +394,25 @@ var PreferencesDialog = class PreferencesDialog {
});
}
+ // Count the number of times the user has opened the preferences window. Every now
+ // and then, we show a dialog asking the user to support the extension.
+ const showSupportDialog = this._settings.get_boolean('show-support-dialog');
+ if (showSupportDialog) {
+ const count = this._settings.get_int('prefs-open-count') + 1;
+ this._settings.set_int('prefs-open-count', count);
+
+ if (count % 10 == 0) {
+ const dialog = this._builder.get_object('support-dialog');
+ dialog.set_transient_for(window);
+ dialog.connect('response', (dialog, response) => {
+ if (response === 'never') {
+ this._settings.set_boolean('show-support-dialog', false);
+ }
+ });
+ dialog.show();
+ }
+ }
+
// Populate the menu with actions.
const group = Gio.SimpleActionGroup.new();
window.insert_action_group('prefs', group);
diff --git a/resources/ui/adw/prefs.ui b/resources/ui/adw/prefs.ui
index 40e9858..cc4cf19 100644
--- a/resources/ui/adw/prefs.ui
+++ b/resources/ui/adw/prefs.ui
@@ -37,6 +37,40 @@ SPDX-License-Identifier: GPL-3.0-or-later
+
+
+
verticalnatural
diff --git a/schemas/org.gnome.shell.extensions.burn-my-windows.gschema.xml b/schemas/org.gnome.shell.extensions.burn-my-windows.gschema.xml
index 50fd50e..844fc0e 100644
--- a/schemas/org.gnome.shell.extensions.burn-my-windows.gschema.xml
+++ b/schemas/org.gnome.shell.extensions.burn-my-windows.gschema.xml
@@ -43,6 +43,18 @@ SPDX-License-Identifier: CC0-1.0
Used to check whether the extension got updated from the extension side.
+
+ 0
+ Prefs Open Count
+ The number of times the settings dialog was openend.
+
+
+
+ true
+ Show Support Dialog
+ If set to false, the ask-for-support dialog will never be shown.
+
+
\ No newline at end of file