if (_pluginui->non_gtk_gui()) {
_pluginui->forward_key_event (event);
} else {
- return relay_key_press (event, this);
+ return relay_key_press (event, this);
}
}
return true;
, add_button (_("Add"))
, save_button (_("Save"))
, delete_button (_("Delete"))
+ , reset_button (_("Reset"))
, bypass_button (ArdourButton::led_default_elements)
, description_expander (_("Description"))
, plugin_analysis_expander (_("Plugin analysis"))
ARDOUR_UI::instance()->set_tip (add_button, _("Save a new preset"));
ARDOUR_UI::instance()->set_tip (save_button, _("Save the current preset"));
ARDOUR_UI::instance()->set_tip (delete_button, _("Delete the current preset"));
+ ARDOUR_UI::instance()->set_tip (reset_button, _("Reset parameters to default (if no parameters are in automation play mode)"));
ARDOUR_UI::instance()->set_tip (bypass_button, _("Disable signal processing by the plugin"));
_no_load_preset = 0;
delete_button.set_name ("generic button");
delete_button.signal_clicked.connect (sigc::mem_fun (*this, &PlugUIBase::delete_plugin_setting));
+ reset_button.set_name ("generic button");
+ reset_button.signal_clicked.connect (sigc::mem_fun (*this, &PlugUIBase::reset_plugin_parameters));
+
+
insert->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&PlugUIBase::processor_active_changed, this, boost::weak_ptr<Processor>(insert)), gui_context());
bypass_button.set_name ("plugin bypass button");
plugin->PresetRemoved.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::preset_added_or_removed, this), gui_context ());
plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::update_preset, this), gui_context ());
plugin->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::parameter_changed, this, _1, _2), gui_context ());
+
+ insert->AutomationStateChanged.connect (*this, invalidator (*this), boost::bind (&PlugUIBase::automation_state_changed, this), gui_context());
+
+ automation_state_changed();
}
PlugUIBase::~PlugUIBase()
#ifdef NO_PLUGIN_STATE
static bool seen_saving_message = false;
+
+static void show_no_plugin_message()
+{
+ info << string_compose (_("Plugin presets are not supported in this build of %1. Consider paying for a full version"),
+ PROGRAM_NAME)
+ << endmsg;
+ info << _("To get full access to updates without this limitation\n"
+ "consider becoming a subscriber for a low cost every month.")
+ << endmsg;
+ info << X_("https://community.ardour.org/s/subscribe")
+ << endmsg;
+ ARDOUR_UI::instance()->popup_error(_("Plugin presets are not supported in this build, see the Log window for more information."));
+}
#endif
void
}
#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;
+ show_no_plugin_message();
}
#endif
}
}
#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;
+ show_no_plugin_message();
}
#endif
}
plugin->remove_preset (_preset_combo.get_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;
+ show_no_plugin_message();
}
#endif
}
+void
+PlugUIBase::automation_state_changed ()
+{
+ reset_button.set_sensitive (insert->can_reset_all_parameters());
+}
+
+void
+PlugUIBase::reset_plugin_parameters ()
+{
+ insert->reset_parameters_to_default ();
+}
+
bool
PlugUIBase::bypass_button_release (GdkEventButton*)
{
++_no_load_preset;
if (p.uri.empty()) {
- _preset_combo.set_text ("(none)");
+ _preset_combo.set_text (_("(none)"));
} else {
_preset_combo.set_text (p.label);
}