[vlc-commits] macosx: simplify playlist duration calculation
David Fuhrmann
git at videolan.org
Tue Nov 11 12:25:09 CET 2014
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Tue Nov 11 11:56:43 2014 +0100| [6e24206e034f6bafc3a8d552b5f281a3512100eb] | committer: David Fuhrmann
macosx: simplify playlist duration calculation
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6e24206e034f6bafc3a8d552b5f281a3512100eb
---
modules/gui/macosx/MainWindow.m | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 1adfe4e..2079b28 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -949,14 +949,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
playlist_t * p_playlist = pl_Get(VLCIntf);
PL_LOCK;
- playlist_item_t * currentPlaylistRoot = [[[VLCMain sharedInstance] playlist] currentPlaylistRoot];
+ playlist_item_t *currentPlaylistRoot = [[[VLCMain sharedInstance] playlist] currentPlaylistRoot];
PL_UNLOCK;
- if (currentPlaylistRoot == p_playlist->p_local_category || currentPlaylistRoot == p_playlist->p_ml_category) {
- if (currentPlaylistRoot == p_playlist->p_local_category)
- [o_chosen_category_lbl setStringValue: [_NS("Playlist") stringByAppendingString:[self _playbackDurationOfNode:p_playlist->p_local_category]]];
- else
- [o_chosen_category_lbl setStringValue: [_NS("Media Library") stringByAppendingString:[self _playbackDurationOfNode:p_playlist->p_ml_category]]];
- }
+
+ if (currentPlaylistRoot == p_playlist->p_local_category)
+ [o_chosen_category_lbl setStringValue: [_NS("Playlist") stringByAppendingString:[self _playbackDurationOfNode:p_playlist->p_local_category]]];
+ else if (currentPlaylistRoot == p_playlist->p_ml_category)
+ [o_chosen_category_lbl setStringValue: [_NS("Media Library") stringByAppendingString:[self _playbackDurationOfNode:p_playlist->p_ml_category]]];
}
- (NSString *)_playbackDurationOfNode:(playlist_item_t*)node
More information about the vlc-commits
mailing list