GUI checkbox to disable plugins
authorRobin Gareus <robin@gareus.org>
Tue, 3 Nov 2015 07:02:22 +0000 (08:02 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 3 Nov 2015 18:21:32 +0000 (19:21 +0100)
for the benefit of Windows and OSX users and everyone else who does
not run Ardour from the commandline.

gtk2_ardour/session_dialog.cc
gtk2_ardour/session_dialog.h

index 7ff2ad2083385c99dc4c07578b4dc1b23a1d870b..017d5b94824a3e5e75703b2fb2347128e4cfbc0f 100644 (file)
@@ -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 ()
 {
index 69532182a2e10428ceb230ebd2d89dd103280be0..c2efd3ab2b3d2a5ecec0fda18fcdb518cbd1b836 100644 (file)
@@ -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<Pango::Layout> layout;