Commit 4ab4e13b authored by Benjamin Pracht's avatar Benjamin Pracht

Allow to drop an item *on* a node.

parent e8ca5bab
...@@ -586,7 +586,6 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -586,7 +586,6 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
- (void)updateRowSelection - (void)updateRowSelection
{ {
// int i;
int i_row; int i_row;
unsigned int j; unsigned int j;
...@@ -786,7 +785,6 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -786,7 +785,6 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
{ {
playlist_item_t *p_item; playlist_item_t *p_item;
playlist_item_t *p_node = NULL; playlist_item_t *p_node = NULL;
// int i;
p_item = [[o_outline_view itemAtRow:[o_outline_view selectedRow]] pointerValue]; p_item = [[o_outline_view itemAtRow:[o_outline_view selectedRow]] pointerValue];
...@@ -1592,12 +1590,16 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -1592,12 +1590,16 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
if( !p_playlist ) return NSDragOperationNone; if( !p_playlist ) return NSDragOperationNone;
/* Dropping ON items is not allowed */ /* Dropping ON items is not allowed if item is not a node */
if( index == NSOutlineViewDropOnItemIndex ) if( item )
{
if( index == NSOutlineViewDropOnItemIndex &&
((playlist_item_t *)[item pointerValue])->i_children == -1 )
{ {
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
return NSDragOperationNone; return NSDragOperationNone;
} }
}
/* We refuse to drop an item in anything else than a child of the General /* We refuse to drop an item in anything else than a child of the General
Node. We still accept items that would be root nodes of the outlineview Node. We still accept items that would be root nodes of the outlineview
...@@ -1715,14 +1717,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -1715,14 +1717,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
/* If we move the playing item in a different node or we move the /* If we move the playing item in a different node or we move the
node containing the playing item in a different node, then stop node containing the playing item in a different node, then stop
playback, or the playlist refuses to detach the item. */ playback, or the playlist refuses to detach the item. */
/* if( p_playlist->status.i_status != PLAYLIST_STOPPED &&
(( p_item == p_playlist->status.p_item &&
p_new_parent != p_old_parent) ||
( p_item->i_children > 0 &&
[self isItem: p_playlist->status.p_item inNode:p_item] == YES))
{
playlist_Stop( p_playlist );
}*/
vlc_mutex_lock( &p_playlist->object_lock ); vlc_mutex_lock( &p_playlist->object_lock );
// Acually detach the item from the old position // Acually detach the item from the old position
if( playlist_NodeRemoveItem( p_playlist, p_item, p_old_parent ) == if( playlist_NodeRemoveItem( p_playlist, p_item, p_old_parent ) ==
......
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