|
|
@ -5,13 +5,13 @@
|
|
|
|
// Application Startup ------------------------------------------------------{{{
|
|
|
|
// Application Startup ------------------------------------------------------{{{
|
|
|
|
|
|
|
|
|
|
|
|
- (void) applicationWillFinishLaunching:(NSNotification *)notification {
|
|
|
|
- (void) applicationWillFinishLaunching:(NSNotification *)notification {
|
|
|
|
NSLog(@"applicationWillFinishLaunching notification: %@", notification);
|
|
|
|
NSLog(@"applicationWillFinishLaunching notification: %@", notification);
|
|
|
|
NSLog(@"Main Menu in applicationWillFinishLaunching: %@", [NSApp mainMenu]);
|
|
|
|
NSLog(@"Main Menu in applicationWillFinishLaunching: %@", [NSApp mainMenu]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void) applicationDidFinishLaunching:(NSNotification *)notification {
|
|
|
|
- (void) applicationDidFinishLaunching:(NSNotification *)notification {
|
|
|
|
NSLog(@"applicationDidFinishLaunching notification: %@", notification);
|
|
|
|
NSLog(@"applicationDidFinishLaunching notification: %@", notification);
|
|
|
|
NSLog(@"Main Menu in applicationDidFinishLaunching: %@", [NSApp mainMenu]);
|
|
|
|
NSLog(@"Main Menu in applicationDidFinishLaunching: %@", [NSApp mainMenu]);
|
|
|
|
[NSApp activateIgnoringOtherApps:YES];
|
|
|
|
[NSApp activateIgnoringOtherApps:YES];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -19,91 +19,91 @@
|
|
|
|
// Application Termination --------------------------------------------------{{{
|
|
|
|
// Application Termination --------------------------------------------------{{{
|
|
|
|
|
|
|
|
|
|
|
|
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
|
|
|
|
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
|
|
|
|
NSLog(@"applicationShouldTerminate sender: %@", sender);
|
|
|
|
NSLog(@"applicationShouldTerminate sender: %@", sender);
|
|
|
|
return NSTerminateNow;
|
|
|
|
return NSTerminateNow;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender {
|
|
|
|
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender {
|
|
|
|
NSLog(@"applicationShouldTerminateAfterLastWindowClosed sender: %@", sender);
|
|
|
|
NSLog(@"applicationShouldTerminateAfterLastWindowClosed sender: %@", sender);
|
|
|
|
return YES;
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationWillTerminate:(NSNotification *)notification {
|
|
|
|
- (void)applicationWillTerminate:(NSNotification *)notification {
|
|
|
|
NSLog(@"applicationWillTerminate notification sender: %@", notification);
|
|
|
|
NSLog(@"applicationWillTerminate notification sender: %@", notification);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------}}}
|
|
|
|
// --------------------------------------------------------------------------}}}
|
|
|
|
// Application Active Status ------------------------------------------------{{{
|
|
|
|
// Application Active Status ------------------------------------------------{{{
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationWillBecomeActive:(NSNotification *)notification {
|
|
|
|
- (void)applicationWillBecomeActive:(NSNotification *)notification {
|
|
|
|
NSLog(@"applicationWillBecomeActive notification: %@", notification);
|
|
|
|
NSLog(@"applicationWillBecomeActive notification: %@", notification);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationDidBecomeActive:(NSNotification *)notification {
|
|
|
|
- (void)applicationDidBecomeActive:(NSNotification *)notification {
|
|
|
|
NSLog(@"applicationDidBecomeActive notification: %@", notification);
|
|
|
|
NSLog(@"applicationDidBecomeActive notification: %@", notification);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationWillResignActive:(NSNotification *)notification {
|
|
|
|
- (void)applicationWillResignActive:(NSNotification *)notification {
|
|
|
|
NSLog(@"applicationWillResignActive notification: %@", notification);
|
|
|
|
NSLog(@"applicationWillResignActive notification: %@", notification);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationDidResignActive:(NSNotification *)notification {
|
|
|
|
- (void)applicationDidResignActive:(NSNotification *)notification {
|
|
|
|
NSLog(@"applicationDidResignActive notification: %@", notification);
|
|
|
|
NSLog(@"applicationDidResignActive notification: %@", notification);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------}}}
|
|
|
|
// --------------------------------------------------------------------------}}}
|
|
|
|
// Application Hide Status --------------------------------------------------{{{
|
|
|
|
// Application Hide Status --------------------------------------------------{{{
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationWillHide:(NSNotification *)notification {
|
|
|
|
- (void)applicationWillHide:(NSNotification *)notification {
|
|
|
|
NSLog(@"applicationWillHide notification: %@", notification);
|
|
|
|
NSLog(@"applicationWillHide notification: %@", notification);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationDidHide:(NSNotification *)notification {
|
|
|
|
- (void)applicationDidHide:(NSNotification *)notification {
|
|
|
|
NSLog(@"applicationDidHide notification: %@", notification);
|
|
|
|
NSLog(@"applicationDidHide notification: %@", notification);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationWillUnhide:(NSNotification *)notification {
|
|
|
|
- (void)applicationWillUnhide:(NSNotification *)notification {
|
|
|
|
NSLog(@"applicationWillUnhide notification: %@", notification);
|
|
|
|
NSLog(@"applicationWillUnhide notification: %@", notification);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationDidUnhide:(NSNotification *)notification {
|
|
|
|
- (void)applicationDidUnhide:(NSNotification *)notification {
|
|
|
|
NSLog(@"applicationDidUnhide notification: %@", notification);
|
|
|
|
NSLog(@"applicationDidUnhide notification: %@", notification);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------}}}
|
|
|
|
// --------------------------------------------------------------------------}}}
|
|
|
|
// Application Update Status ------------------------------------------------{{{
|
|
|
|
// Application Update Status ------------------------------------------------{{{
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationWillUpdate:(NSNotification *)notification {
|
|
|
|
- (void)applicationWillUpdate:(NSNotification *)notification {
|
|
|
|
// NSLog(@"applicationWillUpdate notification: %@", notification);
|
|
|
|
// NSLog(@"applicationWillUpdate notification: %@", notification);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationDidUpdate:(NSNotification *)notification {
|
|
|
|
- (void)applicationDidUpdate:(NSNotification *)notification {
|
|
|
|
// NSLog(@"applicationDidUpdate notification: %@", notification);
|
|
|
|
// NSLog(@"applicationDidUpdate notification: %@", notification);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------}}}
|
|
|
|
// --------------------------------------------------------------------------}}}
|
|
|
|
// Menu Bar -----------------------------------------------------------------{{{
|
|
|
|
// Menu Bar -----------------------------------------------------------------{{{
|
|
|
|
|
|
|
|
|
|
|
|
- (void) createMenuBar {
|
|
|
|
- (void) createMenuBar {
|
|
|
|
NSLog(@"Will create menu bar here");
|
|
|
|
NSLog(@"Will create menu bar here");
|
|
|
|
NSLog(@"creating menu bar. initial main menu bar: %@", [NSApp mainMenu]);
|
|
|
|
NSLog(@"creating menu bar. initial main menu bar: %@", [NSApp mainMenu]);
|
|
|
|
|
|
|
|
|
|
|
|
id mainMenu = [NSMenu alloc];
|
|
|
|
id mainMenu = [NSMenu alloc];
|
|
|
|
[mainMenu initWithTitle:@"Main Menu"];
|
|
|
|
[mainMenu initWithTitle:@"Main Menu"];
|
|
|
|
[NSApp setMainMenu:mainMenu];
|
|
|
|
[NSApp setMainMenu:mainMenu];
|
|
|
|
|
|
|
|
|
|
|
|
id appMenuItem = [NSMenuItem alloc];
|
|
|
|
id appMenuItem = [NSMenuItem alloc];
|
|
|
|
[appMenuItem initWithTitle:@"dws" action:NULL keyEquivalent:@""];
|
|
|
|
[appMenuItem initWithTitle:@"dws" action:NULL keyEquivalent:@""];
|
|
|
|
[mainMenu addItem:appMenuItem];
|
|
|
|
[mainMenu addItem:appMenuItem];
|
|
|
|
|
|
|
|
|
|
|
|
id appMenu = [NSMenu alloc];
|
|
|
|
id appMenu = [NSMenu alloc];
|
|
|
|
[appMenu initWithTitle:@"dws"];
|
|
|
|
[appMenu initWithTitle:@"dws"];
|
|
|
|
[appMenuItem setSubmenu:appMenu];
|
|
|
|
[appMenuItem setSubmenu:appMenu];
|
|
|
|
|
|
|
|
|
|
|
|
id quitMenuItem = [NSMenuItem alloc];
|
|
|
|
id quitMenuItem = [NSMenuItem alloc];
|
|
|
|
[quitMenuItem initWithTitle:@"Quit" action:@selector(terminate:) keyEquivalent:@"q"];
|
|
|
|
[quitMenuItem initWithTitle:@"Quit" action:@selector(terminate:) keyEquivalent:@"q"];
|
|
|
|
[appMenu addItem:quitMenuItem];
|
|
|
|
[appMenu addItem:quitMenuItem];
|
|
|
|
NSLog(@"assigned to main menu: %@", [NSApp mainMenu]);
|
|
|
|
NSLog(@"assigned to main menu: %@", [NSApp mainMenu]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------}}}
|
|
|
|
// --------------------------------------------------------------------------}}}
|
|
|
|