mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
use Tracks' MainMenuDisabler during session lock (could be improved with more RAII)
This commit is contained in:
parent
2363fb71e3
commit
a81bfbfc41
4 changed files with 23 additions and 11 deletions
|
|
@ -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__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue