Allow native menu to unhighlight

This commit is contained in:
Phil Marell
2021-07-28 20:14:34 +10:00
parent 0e3534d902
commit f36a8da95f

View File

@@ -17,13 +17,19 @@ void DoSettingsMain(void);
@implementation AerofoilAppDelegate @implementation AerofoilAppDelegate
- (IBAction)showAboutAerofoil:(id)sender { - (IBAction)showAboutAerofoil:(id)sender {
DoAboutFramework(); [self performAsynchronously:DoAboutFramework];
} }
- (IBAction)showAboutGliderPRO:(id)sender { - (IBAction)showAboutGliderPRO:(id)sender {
DoAbout(); [self performAsynchronously:DoAbout];
} }
- (IBAction)showPreferences:(id)sender { - (IBAction)showPreferences:(id)sender {
DoSettingsMain(); [self performAsynchronously:DoSettingsMain];
}
- (void)performAsynchronously:(void(*)())function {
dispatch_async(dispatch_get_main_queue(), ^{
function();
});
} }
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem { - (BOOL)validateMenuItem:(NSMenuItem *)menuItem {