Commit 487060fe authored by Benjamin Pracht's avatar Benjamin Pracht

* Take the position parametter into account in playlist_NodeAddItem

* This fixes the drag'n'drop from items from the finder in OSX
* Not sure PLAYLIST_END is handled correctly in every case (don't know enough about adding modes to judge)

parent 469b0d8d
...@@ -281,6 +281,8 @@ int playlist_NodeAddItem( playlist_t *p_playlist, playlist_item_t *p_item, ...@@ -281,6 +281,8 @@ int playlist_NodeAddItem( playlist_t *p_playlist, playlist_item_t *p_item,
vlc_mutex_lock( &p_playlist->object_lock ); vlc_mutex_lock( &p_playlist->object_lock );
if ( i_pos == PLAYLIST_END ) i_pos = -1;
/* Sanity checks */ /* Sanity checks */
if( !p_parent || p_parent->i_children == -1 ) if( !p_parent || p_parent->i_children == -1 )
{ {
...@@ -334,7 +336,7 @@ int playlist_NodeAddItem( playlist_t *p_playlist, playlist_item_t *p_item, ...@@ -334,7 +336,7 @@ int playlist_NodeAddItem( playlist_t *p_playlist, playlist_item_t *p_item,
p_playlist->i_enabled ++; p_playlist->i_enabled ++;
/* TODO: Handle modes */ /* TODO: Handle modes */
playlist_NodeAppend( p_playlist, i_view, p_item, p_parent ); playlist_NodeInsert( p_playlist, i_view, p_item, p_parent, i_pos );
p_add->i_item = p_item->input.i_id; p_add->i_item = p_item->input.i_id;
p_add->i_node = p_parent->input.i_id; p_add->i_node = p_parent->input.i_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment