Allow preventing the creation of the default menu (#1923)
* Allow preventing the creation of the default menu * Use more grammar friendly naming * Update the changelog
This commit is contained in:
parent
cdeb1c3828
commit
0152508a39
4 changed files with 26 additions and 4 deletions
|
|
@ -289,9 +289,12 @@ impl AppState {
|
|||
};
|
||||
HANDLER.set_ready();
|
||||
HANDLER.waker().start();
|
||||
// The menubar initialization should be before the `NewEvents` event, to allow overriding
|
||||
// of the default menu in the event
|
||||
menu::initialize();
|
||||
let create_default_menu = unsafe { get_aux_state_mut(app_delegate).create_default_menu };
|
||||
if create_default_menu {
|
||||
// The menubar initialization should be before the `NewEvents` event, to allow
|
||||
// overriding of the default menu even if it's created
|
||||
menu::initialize();
|
||||
}
|
||||
HANDLER.set_in_callback(true);
|
||||
HANDLER.handle_nonuser_event(EventWrapper::StaticEvent(Event::NewEvents(
|
||||
StartCause::Init,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue