5 // Created by Joseph Spiros on Wed Apr 30 2003.
6 // Copyright (c) 2003 iThink Software. All rights reserved.
9 #import "MenuController.h"
12 @implementation MenuController
16 if ( (self = [super init]) ) {
17 _menuLayout = [[NSMutableArray alloc] initWithCapacity:
24 // dynamically create menu from supplied data and layout information.
26 // right before returning the menu, set the created menu to instance variable _currentMenu.
29 - (void)performMainMenuAction:(id)sender
31 switch ( [sender tag] )
33 case MTMenuPlayPauseItem:
34 NSLog(@"MenuController: Play/Pause");
36 case MTMenuFastForwardItem:
37 NSLog(@"MenuController: Fast Forward");
39 case MTMenuRewindItem:
40 NSLog(@"MenuController: Rewind");
42 case MTMenuPreviousTrackItem:
43 NSLog(@"MenuController: Previous Track");
45 case MTMenuNextTrackItem:
46 NSLog(@"MenuController: Next Track");
48 case MTMenuPreferencesItem:
49 NSLog(@"MenuController: Preferences...");
52 NSLog(@"MenuController: Quit");
55 NSLog(@"MenuController: Unimplemented Menu Item OR Child-bearing Menu Item");
60 - (void)performRatingMenuAction
64 - (void)performPlaylistMenuAction
68 - (void)performEqualizerMenuAction
72 - (void)performUpcomingSongsMenuAction
79 [_currentMenu update];
82 - (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem
86 - (NSString *)systemUIColor
88 NSDictionary *tmpDict;
90 if ( (tmpDict = [NSDictionary dictionaryWithContentsOfFile:[@"~/Library/Preferences/.GlobalPreferences.plist" stringByExpandingTildeInPath]]) ) {
91 if ( (tmpNumber = [tmpDict objectForKey:@"AppleAquaColorVariant"]) ) {
92 if ( ([tmpNumber intValue == 1) ) {