mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
code cleanup
This commit is contained in:
parent
36a558d123
commit
7d73ca9b41
1 changed files with 5 additions and 8 deletions
|
@ -37,13 +37,12 @@ static Oscilloscope *sharedAudioScope;
|
||||||
|
|
||||||
|
|
||||||
void initMacOSXMenu(Oscilloscope *audioScope) {
|
void initMacOSXMenu(Oscilloscope *audioScope) {
|
||||||
sharedAudioScope = audioScope;
|
|
||||||
|
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
if (NSApp) {
|
if (NSApp) {
|
||||||
if (!sharedInterfaceMainMenuTarget) {
|
if (!sharedInterfaceMainMenuTarget) {
|
||||||
sharedInterfaceMainMenuTarget = [[InterfaceMainMenuTarget alloc] init];
|
sharedInterfaceMainMenuTarget = [[InterfaceMainMenuTarget alloc] init];
|
||||||
}
|
}
|
||||||
|
sharedAudioScope = audioScope;
|
||||||
|
|
||||||
NSMenu *mainMenu = [NSApp mainMenu];
|
NSMenu *mainMenu = [NSApp mainMenu];
|
||||||
|
|
||||||
|
@ -55,17 +54,15 @@ void initMacOSXMenu(Oscilloscope *audioScope) {
|
||||||
NSMenu *scopeMenu = [[[NSMenu alloc] init] initWithTitle:@"Scope"];
|
NSMenu *scopeMenu = [[[NSMenu alloc] init] initWithTitle:@"Scope"];
|
||||||
[scopeMenuItem setSubmenu:scopeMenu];
|
[scopeMenuItem setSubmenu:scopeMenu];
|
||||||
sharedInterfaceMainMenuTarget.scopeAudioMenuItem = [scopeMenu addItemWithTitle:@"Audio"
|
sharedInterfaceMainMenuTarget.scopeAudioMenuItem = [scopeMenu addItemWithTitle:@"Audio"
|
||||||
action:@selector(scopeAudioAction)
|
action:@selector(scopeAudioAction)
|
||||||
keyEquivalent:@""];
|
keyEquivalent:@""];
|
||||||
[sharedInterfaceMainMenuTarget.scopeAudioMenuItem setTarget:sharedInterfaceMainMenuTarget];
|
[sharedInterfaceMainMenuTarget.scopeAudioMenuItem setTarget:sharedInterfaceMainMenuTarget];
|
||||||
[sharedInterfaceMainMenuTarget.scopeAudioMenuItem setState:NSOnState];
|
[sharedInterfaceMainMenuTarget.scopeAudioMenuItem setState:NSOnState];
|
||||||
|
|
||||||
sharedInterfaceMainMenuTarget.scopeNoneMenuItem = [scopeMenu addItemWithTitle:@"None"
|
sharedInterfaceMainMenuTarget.scopeNoneMenuItem = [scopeMenu addItemWithTitle:@"None"
|
||||||
action:@selector(scopeNoneAction)
|
action:@selector(scopeNoneAction)
|
||||||
keyEquivalent:@""];
|
keyEquivalent:@""];
|
||||||
[sharedInterfaceMainMenuTarget.scopeNoneMenuItem setTarget:sharedInterfaceMainMenuTarget];
|
[sharedInterfaceMainMenuTarget.scopeNoneMenuItem setTarget:sharedInterfaceMainMenuTarget];
|
||||||
|
|
||||||
[NSApp setMainMenu:mainMenu];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue