diff options
author | Robin Gareus <robin@gareus.org> | 2016-10-06 17:42:46 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-10-06 17:42:46 +0200 |
commit | 70b580a4b45b8a2ac7b071ca2dfe2bbd7a1ff2a7 (patch) | |
tree | d0d1a08c6a18175247ce010e35301c42b59caa3e /gtk2_ardour | |
parent | b63babbc3d562741c4592de6d2990c44e9771060 (diff) |
Hold ctrl + click "open" session -> safe mode
This allows to hide the "Safe Mode" checkbox.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/session_dialog.cc | 12 | ||||
-rw-r--r-- | gtk2_ardour/session_dialog.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc index 225b02df84..6cb28f99b0 100644 --- a/gtk2_ardour/session_dialog.cc +++ b/gtk2_ardour/session_dialog.cc @@ -41,6 +41,7 @@ #include "pbd/openuri.h" #include "gtkmm2ext/utils.h" +#include "gtkmm2ext/keyboard.h" #include "ardour/audioengine.h" #include "ardour/filesystem_paths.h" @@ -87,6 +88,7 @@ SessionDialog::SessionDialog (bool require_new, const std::string& session_name, open_button = add_button (Stock::OPEN, RESPONSE_ACCEPT); back_button->signal_button_press_event().connect (sigc::mem_fun (*this, &SessionDialog::back_button_pressed), false); + open_button->signal_button_press_event().connect (sigc::mem_fun (*this, &SessionDialog::open_button_pressed), false); open_button->set_sensitive (false); back_button->set_sensitive (false); @@ -478,6 +480,16 @@ SessionDialog::back_button_pressed (GdkEventButton*) return true; } +bool +SessionDialog::open_button_pressed (GdkEventButton* ev) +{ + if (Gtkmm2ext::Keyboard::modifier_state_equals (ev->state, Gtkmm2ext::Keyboard::PrimaryModifier)) { + _disable_plugins.set_active(); + } + response (RESPONSE_ACCEPT); + return true; +} + void SessionDialog::populate_session_templates () { diff --git a/gtk2_ardour/session_dialog.h b/gtk2_ardour/session_dialog.h index 9143007f8f..98bdd6b788 100644 --- a/gtk2_ardour/session_dialog.h +++ b/gtk2_ardour/session_dialog.h @@ -94,6 +94,7 @@ class SessionDialog : public ArdourDialog { Gtk::Button* quit_button; bool back_button_pressed (GdkEventButton*); + bool open_button_pressed (GdkEventButton*); Gtk::Frame info_frame; |