From 2f7c91c7da3793713482880864dded1a8cf4e820 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 3 Nov 2015 08:02:22 +0100 Subject: GUI checkbox to disable plugins for the benefit of Windows and OSX users and everyone else who does not run Ardour from the commandline. --- gtk2_ardour/session_dialog.cc | 17 +++++++++++++++++ gtk2_ardour/session_dialog.h | 4 ++++ 2 files changed, 21 insertions(+) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc index 7ff2ad2083..017d5b9482 100644 --- a/gtk2_ardour/session_dialog.cc +++ b/gtk2_ardour/session_dialog.cc @@ -411,6 +411,17 @@ SessionDialog::setup_initial_choice_box () centering_vbox->pack_start (*browse_label, false, false, 12); centering_vbox->pack_start (existing_session_chooser, false, false); + /* --disable plugins UI */ + + _disable_plugins.set_label (_("Safe Mode: Disable all Plugins")); + _disable_plugins.set_flags (Gtk::CAN_FOCUS); + _disable_plugins.set_relief (Gtk::RELIEF_NORMAL); + _disable_plugins.set_mode (true); + _disable_plugins.set_active (ARDOUR::Session::get_disable_all_loaded_plugins()); + _disable_plugins.set_border_width(0); + _disable_plugins.signal_clicked().connect (sigc::mem_fun (*this, &SessionDialog::disable_plugins_clicked)); + centering_vbox->pack_start (_disable_plugins, false, false); + /* pack it all up */ centering_hbox->pack_start (*centering_vbox, true, true); @@ -1134,6 +1145,12 @@ SessionDialog::recent_row_activated (const Gtk::TreePath&, Gtk::TreeViewColumn*) response (RESPONSE_ACCEPT); } +void +SessionDialog::disable_plugins_clicked () +{ + ARDOUR::Session::set_disable_all_loaded_plugins (_disable_plugins.get_active()); +} + void SessionDialog::existing_session_selected () { diff --git a/gtk2_ardour/session_dialog.h b/gtk2_ardour/session_dialog.h index 69532182a2..c2efd3ab2b 100644 --- a/gtk2_ardour/session_dialog.h +++ b/gtk2_ardour/session_dialog.h @@ -231,6 +231,10 @@ class SessionDialog : public ArdourDialog { void master_bus_button_clicked (); void setup_more_options_box (); + /* --disable plugins UI */ + Gtk::CheckButton _disable_plugins; + void disable_plugins_clicked (); + /* always there */ Glib::RefPtr layout; -- cgit v1.2.3