diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-24 09:56:08 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-24 09:56:16 -0400 |
commit | f147846863c27dfa13ef83b696f198a5092721fa (patch) | |
tree | f52baa144cf760138c862f7cdc4ab8fd80a1159d /gtk2_ardour/editor_ops.cc | |
parent | dae3b26f188c17b1e74c17284539979a92ea630f (diff) |
add ability to save current action sensitivities and restore them, and to disable all action sensitivity.
This is needed to be able to lock the application fully on OS X, where the global menu bar would still allow interaction
even when a modal dialog is displayed.
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index e7618d9168..0c36a4587d 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -57,6 +57,7 @@ #include "canvas/canvas.h" +#include "actions.h" #include "ardour_ui.h" #include "audio_region_view.h" #include "audio_streamview.h" @@ -7116,3 +7117,15 @@ Editor::toggle_midi_input_active (bool flip_others) _session->set_exclusive_input_active (rl, onoff, flip_others); } + +void +Editor::lock () +{ + ActionManager::disable_all_actions (); +} + +void +Editor::unlock () +{ + ActionManager::pop_action_state (); +} |