summaryrefslogtreecommitdiff
path: root/gtk2_ardour/plugin_ui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/plugin_ui.cc')
-rw-r--r--gtk2_ardour/plugin_ui.cc31
1 files changed, 31 insertions, 0 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index 943a7a8bce..9a85b78454 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -565,9 +565,14 @@ PlugUIBase::preset_selected ()
}
}
+#ifdef NO_PLUGIN_STATE
+static bool seen_saving_message = false;
+#endif
+
void
PlugUIBase::add_plugin_setting ()
{
+#ifndef NO_PLUGIN_STATE
NewPluginPresetDialog d (plugin);
switch (d.run ()) {
@@ -586,23 +591,49 @@ PlugUIBase::add_plugin_setting ()
}
break;
}
+#else
+ if (!seen_saving_message) {
+ info << string_compose (_("Plugin presets are not supported in this build of %1. Consider paying for a full version"),
+ PROGRAM_NAME)
+ << endmsg;
+ seen_saving_message = true;
+ }
+#endif
}
void
PlugUIBase::save_plugin_setting ()
{
+#ifndef NO_PLUGIN_STATE
string const name = _preset_combo.get_active_text ();
plugin->remove_preset (name);
Plugin::PresetRecord const r = plugin->save_preset (name);
if (!r.uri.empty ()) {
plugin->load_preset (r);
}
+#else
+ if (!seen_saving_message) {
+ info << string_compose (_("Plugin presets are not supported in this build of %1. Consider paying for a newer version"),
+ PROGRAM_NAME)
+ << endmsg;
+ seen_saving_message = true;
+ }
+#endif
}
void
PlugUIBase::delete_plugin_setting ()
{
+#ifndef NO_PLUGIN_STATE
plugin->remove_preset (_preset_combo.get_active_text ());
+#else
+ if (!seen_saving_message) {
+ info << string_compose (_("Plugin presets are not supported in this build of %1. Consider paying for a newer version"),
+ PROGRAM_NAME)
+ << endmsg;
+ seen_saving_message = true;
+ }
+#endif
}
bool