X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/7cd79252cc4ede9035cf21ce21dd3044fd5ec8a1..0ab2d6bec7f56617e1c7ed073168753d48d1707e:/MenuController.m diff --git a/MenuController.m b/MenuController.m index 86d74c9..0ac43d1 100755 --- a/MenuController.m +++ b/MenuController.m @@ -11,6 +11,14 @@ @implementation MenuController +- (id)init +{ + if ( (self = [super init]) ) { + _menuLayout = [[NSMutableArray alloc] initWithCapacity: + } + return self; +} + - (NSMenu *)menu { // dynamically create menu from supplied data and layout information. @@ -67,6 +75,7 @@ - (void)updateMenu { + [_currentMenu update]; } @@ -74,4 +83,23 @@ { } +- (NSString *)systemUIColor +{ + NSDictionary *tmpDict; + NSNumber *tmpNumber; + if ( (tmpDict = [NSDictionary dictionaryWithContentsOfFile:[@"~/Library/Preferences/.GlobalPreferences.plist" stringByExpandingTildeInPath]]) ) { + if ( (tmpNumber = [tmpDict objectForKey:@"AppleAquaColorVariant"]) ) { + if ( ([tmpNumber intValue == 1) ) { + return @"Aqua"; + } else { + return @"Graphite"; + } + } else { + return @"Aqua"; + } + } else { + return @"Aqua"; + } +} + @end