From ae4325e90f6ba0dafa7ad18b924341c4529b273e Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Wed, 23 Sep 2015 18:48:57 +0200 Subject: [PATCH] macosx: Replace method of auto-expanding all items in the Source List This replaces the iteration over all items and expanding them with a single call to the expand method, passing nil for the item, which causes all items to expand. This works since OS X 10.5. Signed-off-by: David Fuhrmann --- modules/gui/macosx/MainWindow.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m index 78d3a71623..df0a7f486c 100644 --- a/modules/gui/macosx/MainWindow.m +++ b/modules/gui/macosx/MainWindow.m @@ -211,10 +211,7 @@ static const float f_min_window_height = 307.; if (![defaults objectForKey:@"VLCFirstRun"]) { [defaults setObject:[NSDate date] forKey:@"VLCFirstRun"]; - NSUInteger i_sidebaritem_count = [o_sidebaritems count]; - for (NSUInteger x = 0; x < i_sidebaritem_count; x++) - [o_sidebar_view expandItem: [o_sidebaritems objectAtIndex:x] expandChildren: YES]; - + [o_sidebar_view expandItem:nil expandChildren:YES]; [_fspanel center]; NSAlert *albumArtAlert = [NSAlert alertWithMessageText:_NS("Check for album art and metadata?") defaultButton:_NS("Enable Metadata Retrieval") alternateButton:_NS("No, Thanks") otherButton:nil informativeTextWithFormat:@"%@",_NS("VLC can check online for album art and metadata to enrich your playback experience, e.g. by providing track information when playing Audio CDs. To provide this functionality, VLC will send information about your contents to trusted services in an anonymized form.")]; -- 2.20.1