[vlc-commits] macosx: Use for-in for table column iteration
Marvin Scholz
git at videolan.org
Wed Aug 26 16:28:01 CEST 2020
vlc/vlc-3.0 | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sat Aug 18 00:45:12 2018 +0200| [78c05469e57e085c51713e16c0afa5f4f2dedd78] | committer: Marvin Scholz
macosx: Use for-in for table column iteration
(cherry picked from commit 691e51a4d3ba423b34e3ba6a7297a1960096db62)
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=78c05469e57e085c51713e16c0afa5f4f2dedd78
---
modules/gui/macosx/VLCPlaylist.m | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/gui/macosx/VLCPlaylist.m b/modules/gui/macosx/VLCPlaylist.m
index a6226de496..135c50c141 100644
--- a/modules/gui/macosx/VLCPlaylist.m
+++ b/modules/gui/macosx/VLCPlaylist.m
@@ -202,18 +202,18 @@
[self setupPlaylistTableColumnsForMenu:[[[VLCMain sharedInstance] mainMenu] playlistTableColumnsMenu]];
NSArray * columnArray = [[NSUserDefaults standardUserDefaults] arrayForKey:@"PlaylistColumnSelection"];
- NSUInteger columnCount = [columnArray count];
- NSString * column;
- for (NSUInteger i = 0; i < columnCount; i++) {
- column = [[columnArray objectAtIndex:i] firstObject];
- if ([column isEqualToString:@"status"])
+ for (NSArray *column in columnArray) {
+ NSString *columnName = column[0];
+ NSNumber *columnWidth = column[1];
+
+ if ([columnName isEqualToString:@"status"])
continue;
- if(![self setPlaylistColumnTableState: NSOnState forColumn:column])
+ if(![self setPlaylistColumnTableState: NSOnState forColumn:columnName])
continue;
- [[_outlineView tableColumnWithIdentifier: column] setWidth: [[[columnArray objectAtIndex:i] objectAtIndex:1] floatValue]];
+ [[_outlineView tableColumnWithIdentifier: columnName] setWidth: [columnWidth floatValue]];
}
}
More information about the vlc-commits
mailing list