+- (NSMenu *)albumsMenu
+{
+ NSMenu *albumsMenu = [[NSMenu alloc] initWithTitle:@"Albums"];
+ NSEnumerator *albumsEnumerator;
+ NSString *nextAlbum;
+ id <NSMenuItem> tempItem;
+ ITDebugLog(@"Building \"Albums\" menu.");
+ NS_DURING
+ albumsEnumerator = [[[[MainController sharedController] currentRemote] albums] objectEnumerator];
+ while ( (nextAlbum = [albumsEnumerator nextObject]) ) {
+ tempItem = [albumsMenu addItemWithTitle:nextAlbum action:@selector(performBrowseMenuAction:) keyEquivalent:@""];
+ [tempItem setTarget:self];
+ }
+ NS_HANDLER
+ [[MainController sharedController] networkError:localException];
+ NS_ENDHANDLER
+ ITDebugLog(@"Done Building \"Albums\" menu");
+ return albumsMenu;
+}
+