vlc | branch: master | David Fuhrmann <[email protected]> | Fri Jan 2 14:30:38 2015 +0100| [8afbec2889afa4070fafb5da2cbae20aa0648198] | committer: David Fuhrmann
macosx: improve playItem, make sure that the complete pl is queued Simplifies the playItem action. For the playlist call, the current root is taken instead of the parent node. This ensures that playback does not stop on folder/node boundaries. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8afbec2889afa4070fafb5da2cbae20aa0648198 --- modules/gui/macosx/playlist.m | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index cdb34e8..66d72a1 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -465,31 +465,21 @@ /* When called retrieves the selected outlineview row and plays that node or item */ - (IBAction)playItem:(id)sender { - intf_thread_t * p_intf = VLCIntf; - playlist_t * p_playlist = pl_Get(p_intf); - - playlist_item_t *p_item; - playlist_item_t *p_node = NULL; + playlist_t *p_playlist = pl_Get(VLCIntf); // ignore clicks on column header when handling double action - if (sender != nil && [o_outline_view clickedRow] == -1 && sender != o_mi_play) + if (sender == o_outline_view && [o_outline_view clickedRow] == -1) return; - PL_LOCK; PLItem *o_item = [o_outline_view itemAtRow:[o_outline_view selectedRow]]; - p_item = playlist_ItemGetById(p_playlist, [o_item plItemId]); + if (!o_item) + return; - if (p_item) { - if (p_item->i_children == -1) { - p_node = p_item->p_parent; - } else { - p_node = p_item; - if (p_node->i_children > 0 && p_node->pp_children[0]->i_children == -1) - p_item = p_node->pp_children[0]; - else - p_item = NULL; - } + PL_LOCK; + playlist_item_t *p_item = playlist_ItemGetById(p_playlist, [o_item plItemId]); + playlist_item_t *p_node = playlist_ItemGetById(p_playlist, [[[self model] rootItem] plItemId]); + if (p_item && p_node) { playlist_Control(p_playlist, PLAYLIST_VIEWPLAY, pl_Locked, p_node, p_item); } PL_UNLOCK; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
