diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-05-06 12:10:41 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-29 14:18:09 -0400 |
commit | a81bfbfc416753331f791f1b8ca246f460ad74b9 (patch) | |
tree | 4b35b7033f4afcf791a79269b7815e410821002e /gtk2_ardour/public_editor.h | |
parent | 2363fb71e3ec69d14695207bf13820720679c2d8 (diff) |
use Tracks' MainMenuDisabler during session lock (could be improved with more RAII)
Diffstat (limited to 'gtk2_ardour/public_editor.h')
-rw-r--r-- | gtk2_ardour/public_editor.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 951c3e9b0e..b5d139b543 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -40,6 +40,8 @@ #include "pbd/statefuldestructible.h" #include "canvas/fwd.h" + +#include "gtkmm2ext/actions.h" #include "gtkmm2ext/visibility_tracker.h" #include "editing.h" @@ -459,4 +461,19 @@ class DisplaySuspender { } }; +class MainMenuDisabler { +public: + MainMenuDisabler () { + /* The global menu bar continues to be accessible to applications + with modal dialogs on mac, which means that we need to desensitize + all items in the menu bar. + */ + ActionManager::disable_active_actions (); + } + + ~MainMenuDisabler () { + ActionManager::enable_active_actions (); + } +}; + #endif // __gtk_ardour_public_editor_h__ |