[vlc-commits] macosx: simplify playlist duration calculation
David Fuhrmann
git at videolan.org
Tue Nov 11 17:23:30 CET 2014
vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Tue Nov 11 11:56:43 2014 +0100| [ee7783e6ac69666b9dbf427932aca463f6cac01d] | committer: Felix Paul Kühne
macosx: simplify playlist duration calculation
(cherry picked from commit 6e24206e034f6bafc3a8d552b5f281a3512100eb)
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=ee7783e6ac69666b9dbf427932aca463f6cac01d
---
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 7376540..875c71f 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