diff --git a/prefs.js b/prefs.js
index 2182911..83f14e7 100644
--- a/prefs.js
+++ b/prefs.js
@@ -138,6 +138,28 @@ var PreferencesDialog = class PreferencesDialog {
// clang-format on
}
+ // Populate the open-effects drop-down menu.
+ {
+ const menu = this._builder.get_object('open-effect-menu');
+ const group = Gio.SimpleActionGroup.new();
+ window.insert_action_group('open-effects', group);
+
+ ALL_EFFECTS.forEach(Effect => {
+ const [minMajor, minMinor] = Effect.getMinShellVersion();
+ if (utils.shellVersionIsAtLeast(minMajor, minMinor)) {
+ const nick = Effect.getNick();
+ const label = Effect.getLabel();
+ const actionName = nick + '-open-effect';
+ const fullName = 'open-effects.' + actionName;
+
+ const action = this._settings.create_action(actionName);
+ group.add_action(action);
+
+ menu.append_item(Gio.MenuItem.new(label, fullName));
+ }
+ });
+ }
+
// Populate the close-effects drop-down menu.
{
const menu = this._builder.get_object('close-effect-menu');
@@ -299,8 +321,12 @@ var PreferencesDialog = class PreferencesDialog {
this._button.connect('clicked', () => {
// Set the to-be-previewed effect.
+ dialog.getSettings().set_string('open-preview-effect', Effect.getNick());
dialog.getSettings().set_string('close-preview-effect', Effect.getNick());
+ // Make sure that the window.show() firther below "sees" this change.
+ Gio.Settings.sync();
+
// Create the preview-window.
const window = new Gtk.Window({
title: `Preview for ${Effect.getLabel()}`,
diff --git a/resources/ui/gtk3/prefs.ui b/resources/ui/gtk3/prefs.ui
index 8b70434..708d1f5 100644
--- a/resources/ui/gtk3/prefs.ui
+++ b/resources/ui/gtk3/prefs.ui
@@ -3,6 +3,7 @@