From 1b261fab4860361d1cc3bcba7b10a7c4a6f2dfe8 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 15 Sep 2020 17:01:49 +0200 Subject: [PATCH] Remove unused LV2 ifdef 2/3 LV2 has been mandatory since 6.0 (04ccd328dc9ea) --- gtk2_ardour/instrument_selector.cc | 4 +--- gtk2_ardour/lv2_plugin_ui.h | 4 ---- gtk2_ardour/mixer_ui.cc | 4 +--- gtk2_ardour/plugin_selector.cc | 13 ++++--------- gtk2_ardour/plugin_ui.cc | 6 ++---- gtk2_ardour/rc_option_editor.cc | 8 ++------ 6 files changed, 10 insertions(+), 29 deletions(-) diff --git a/gtk2_ardour/instrument_selector.cc b/gtk2_ardour/instrument_selector.cc index 3c6676ea78..6da481c8d7 100644 --- a/gtk2_ardour/instrument_selector.cc +++ b/gtk2_ardour/instrument_selector.cc @@ -96,6 +96,7 @@ InstrumentSelector::build_instrument_list() PluginInfoList all_plugs; all_plugs.insert(all_plugs.end(), manager.ladspa_plugin_info().begin(), manager.ladspa_plugin_info().end()); all_plugs.insert(all_plugs.end(), manager.lua_plugin_info().begin(), manager.lua_plugin_info().end()); + all_plugs.insert(all_plugs.end(), manager.lv2_plugin_info().begin(), manager.lv2_plugin_info().end()); #ifdef WINDOWS_VST_SUPPORT all_plugs.insert(all_plugs.end(), manager.windows_vst_plugin_info().begin(), manager.windows_vst_plugin_info().end()); #endif @@ -108,9 +109,6 @@ InstrumentSelector::build_instrument_list() #ifdef AUDIOUNIT_SUPPORT all_plugs.insert(all_plugs.end(), manager.au_plugin_info().begin(), manager.au_plugin_info().end()); #endif -#ifdef LV2_SUPPORT - all_plugs.insert(all_plugs.end(), manager.lv2_plugin_info().begin(), manager.lv2_plugin_info().end()); -#endif all_plugs.remove_if (invalid_instrument); all_plugs.sort (pluginsort); diff --git a/gtk2_ardour/lv2_plugin_ui.h b/gtk2_ardour/lv2_plugin_ui.h index b22b8ec5c3..74d30148b3 100644 --- a/gtk2_ardour/lv2_plugin_ui.h +++ b/gtk2_ardour/lv2_plugin_ui.h @@ -38,7 +38,6 @@ #include "ardour/types.h" #include "plugin_ui.h" -#ifdef LV2_SUPPORT #include "ardour/plugin_insert.h" #include "lv2_external_ui.h" @@ -145,7 +144,4 @@ private: virtual void on_window_hide(); }; -#endif // LV2_SUPPORT - #endif /* __ardour_lv2_plugin_ui_h__ */ - diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 0094a4795f..5a79516472 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -3141,9 +3141,6 @@ Mixer_UI::refill_favorite_plugins () PluginInfoList plugs; PluginManager& mgr (PluginManager::instance()); -#ifdef LV2_SUPPORT - refiller (plugs, mgr.lv2_plugin_info ()); -#endif #ifdef WINDOWS_VST_SUPPORT refiller (plugs, mgr.windows_vst_plugin_info ()); #endif @@ -3157,6 +3154,7 @@ Mixer_UI::refill_favorite_plugins () refiller (plugs, mgr.au_plugin_info ()); #endif refiller (plugs, mgr.ladspa_plugin_info ()); + refiller (plugs, mgr.lv2_plugin_info ()); refiller (plugs, mgr.lua_plugin_info ()); switch (plugin_list_mode ()) { diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index 25dce39727..792e85f069 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -216,13 +216,14 @@ PluginSelector::PluginSelector (PluginManager& mgr) //_fil_type_combo = manage (new ComboBoxText); _fil_type_combo.append_text_item (_("Show All Formats")); + +#if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT) _fil_type_combo.append_text_item (X_("VST")); +#endif #ifdef AUDIOUNIT_SUPPORT _fil_type_combo.append_text_item (X_("AudioUnit")); #endif -#ifdef LV2_SUPPORT _fil_type_combo.append_text_item (X_("LV2")); -#endif _fil_type_combo.append_text_item (X_("Lua")); _fil_type_combo.append_text_item (X_("LADSPA")); _fil_type_combo.set_text (_("Show All Formats")); @@ -434,11 +435,9 @@ PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string& return false; } -#ifdef LV2_SUPPORT if (_fil_type_combo.get_text() == X_("LV2") && info->type != LV2) { return false; } -#endif if (_fil_type_combo.get_text() == X_("Lua") && info->type != Lua) { return false; @@ -618,9 +617,7 @@ PluginSelector::lua_refiller (const std::string& searchstr) void PluginSelector::lv2_refiller (const std::string& searchstr) { -#ifdef LV2_SUPPORT refiller (manager.lv2_plugin_info(), searchstr, "LV2"); -#endif } void @@ -937,6 +934,7 @@ PluginSelector::build_plugin_menu () all_plugs.insert (all_plugs.end(), manager.ladspa_plugin_info().begin(), manager.ladspa_plugin_info().end()); all_plugs.insert (all_plugs.end(), manager.lua_plugin_info().begin(), manager.lua_plugin_info().end()); + all_plugs.insert (all_plugs.end(), manager.lv2_plugin_info().begin(), manager.lv2_plugin_info().end()); #ifdef WINDOWS_VST_SUPPORT all_plugs.insert (all_plugs.end(), manager.windows_vst_plugin_info().begin(), manager.windows_vst_plugin_info().end()); #endif @@ -949,9 +947,6 @@ PluginSelector::build_plugin_menu () #ifdef AUDIOUNIT_SUPPORT all_plugs.insert (all_plugs.end(), manager.au_plugin_info().begin(), manager.au_plugin_info().end()); #endif -#ifdef LV2_SUPPORT - all_plugs.insert (all_plugs.end(), manager.lv2_plugin_info().begin(), manager.lv2_plugin_info().end()); -#endif using namespace Menu_Helpers; diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index 9f12449733..978aba8fbc 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -50,6 +50,8 @@ #include "ardour/plugin.h" #include "ardour/plugin_insert.h" #include "ardour/ladspa_plugin.h" +#include "ardour/lv2_plugin.h" +#include "lv2_plugin_ui.h" #ifdef WINDOWS_VST_SUPPORT #include "ardour/windows_vst_plugin.h" #include "windows_vst_plugin_ui.h" @@ -62,10 +64,6 @@ #include "ardour/mac_vst_plugin.h" #include "vst_plugin_ui.h" #endif -#ifdef LV2_SUPPORT -#include "ardour/lv2_plugin.h" -#include "lv2_plugin_ui.h" -#endif #include "ardour_window.h" #include "ardour_ui.h" diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 7be2d7df78..f797454aec 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -3717,7 +3717,6 @@ RCOptionEditor::RCOptionEditor () _("AU Blacklist:"))); #endif -#ifdef HAVE_LV2 add_option (_("Plugins"), new OptionEditorHeading (_("LV1/LV2"))); add_option (_("Plugins"), new BoolOption ( @@ -3726,9 +3725,7 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::get_conceal_lv1_if_lv2_exists), sigc::mem_fun (*_rc_config, &RCConfiguration::set_conceal_lv1_if_lv2_exists) )); -#endif -#if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT || defined AUDIOUNIT_SUPPORT || defined HAVE_LV2) add_option (_("Plugins"), new OptionEditorHeading (_("Plugin GUI"))); add_option (_("Plugins"), new BoolOption ( @@ -3738,7 +3735,7 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_open_gui_after_adding_plugin) )); -#if (defined LV2_SUPPORT && defined LV2_EXTENDED) +#ifdef LV2_EXTENDED add_option (_("Plugins"), new BoolOption ( "show-inline-display-by-default", @@ -3776,7 +3773,6 @@ RCOptionEditor::RCOptionEditor () Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(), _("When enabled show a dialog to select instrument channel configuration before adding a multichannel plugin.")); -#endif add_option (_("Plugins"), new OptionEditorHeading (_("Statistics"))); add_option (_("Plugins"), @@ -4330,7 +4326,7 @@ RCOptionEditor::parameter_changed (string const & p) _ltc_send_continuously->set_sensitive (s); _ltc_volume_slider->set_sensitive (s); } else if (p == "open-gui-after-adding-plugin" || p == "show-inline-display-by-default") { -#if (defined LV2_SUPPORT && defined LV2_EXTENDED) +#ifdef LV2_EXTENDED _plugin_prefer_inline->set_sensitive (UIConfiguration::instance().get_open_gui_after_adding_plugin() && UIConfiguration::instance().get_show_inline_display_by_default()); #endif } else if (p == "conceal-lv1-if-lv2-exists") {