X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/e350c02cdc2d016846056966c9595969aebcf559..972a8ad14238df49d5ac835345cb6a871b1e5c17:/PreferencesController.m?ds=inline diff --git a/PreferencesController.m b/PreferencesController.m index 2f1eb9c..c2af444 100755 --- a/PreferencesController.m +++ b/PreferencesController.m @@ -1,6 +1,7 @@ #import "PreferencesController.h" #import "MainController.h" #import "StatusWindow.h" +#import "CustomMenuTableView.h" #import #import @@ -102,9 +103,8 @@ static PreferencesController *prefs = nil; [launchPlayerAtLaunchCheckbox setTitle:[NSString stringWithFormat:@"Launch %@ when MenuTunes launches", [[controller currentRemote] playerSimpleName]]]; //This isn't localized... } -// [window setLevel:NSStatusWindowLevel]; + [window setLevel:NSStatusWindowLevel]; [window center]; - [NSApp activateIgnoringOtherApps:YES]; [window makeKeyAndOrderFront:self]; } @@ -423,6 +423,27 @@ static PreferencesController *prefs = nil; [self cancelHotKey:sender]; } +- (void)deletePressedInTableView:(NSTableView *)tableView +{ + if (tableView == menuTableView) { + int selRow = [tableView selectedRow]; + if (selRow != - 1) { + NSString *object = [myItems objectAtIndex:selRow]; + + if ([object isEqualToString:@"preferences"]) { + NSBeep(); + return; + } + + if (![object isEqualToString:@"separator"]) + [availableItems addObject:object]; + [myItems removeObjectAtIndex:selRow]; + [menuTableView reloadData]; + [allTableView reloadData]; + } + [self changeMenus:self]; + } +} /*************************************************************************/ @@ -497,6 +518,7 @@ static PreferencesController *prefs = nil; id anItem; // Set the list of items you can have. availableItems = [[NSMutableArray alloc] initWithObjects: + @"separator", @"trackInfo", @"upcomingSongs", @"playlists", @@ -508,7 +530,6 @@ static PreferencesController *prefs = nil; @"fastForward", @"rewind", @"showPlayer", - @"separator", @"quit", nil];