X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/9ba1419655d7d247210a4ed2e7a220ddf82d80cb..bad9de5ef29bebf5a0d07e8960b2a70a983bf86b:/MainController.m diff --git a/MainController.m b/MainController.m index 475a23e..eb48f5a 100755 --- a/MainController.m +++ b/MainController.m @@ -1,7 +1,9 @@ #import "NewMainController.h" +#import "MenuController.h" #import "PreferencesController.h" #import "HotKeyCenter.h" #import "StatusWindowController.h" +#import "StatusItemHack.h" @interface MainController(Private) - (ITMTRemote *)loadRemote; @@ -32,6 +34,7 @@ static MainController *sharedController; remoteArray = [[NSMutableArray alloc] initWithCapacity:1]; statusWindowController = [[StatusWindowController alloc] init]; + menuController = [[MenuController alloc] init]; df = [[NSUserDefaults standardUserDefaults] retain]; [self setLatestSongIdentifier:@"0-0"]; } @@ -60,6 +63,7 @@ static MainController *sharedController; [[PreferencesController sharedPrefs] registerDefaults]; } + [StatusItemHack install]; statusItem = [[ITStatusItem alloc] initWithStatusBar:[NSStatusBar systemStatusBar] withLength:NSSquareStatusItemLength]; @@ -172,6 +176,12 @@ static MainController *sharedController; */ } +- (void)menuClicked +{ + [statusItem setMenu:[menuController menu]]; + NSLog(@"The menu was clix0r3d, do something!"); +} + // // // Menu Selectors @@ -498,8 +508,9 @@ static MainController *sharedController; [currentRemote halt]; [statusItem release]; [statusWindowController release]; + [menuController release]; [super dealloc]; } -@end +@end \ No newline at end of file