Commit e25c0df1 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx: Use pl_Locked for better readability.

parent 8b6e26a8
...@@ -562,12 +562,6 @@ ...@@ -562,12 +562,6 @@
existence first since OSX sometimes tries to redraw items that have been existence first since OSX sometimes tries to redraw items that have been
deleted. We don't do it when not required since this verification takes deleted. We don't do it when not required since this verification takes
quite a long time on big playlists (yes, pretty hacky). */ quite a long time on big playlists (yes, pretty hacky). */
- (BOOL)isItem: (playlist_item_t *)p_item
inNode: (playlist_item_t *)p_node
checkItemExistence:(BOOL)b_check
{
[self isItem:p_item inNode:p_node checkItemExistence:b_check locked:NO];
}
- (BOOL)isItem: (playlist_item_t *)p_item - (BOOL)isItem: (playlist_item_t *)p_item
inNode: (playlist_item_t *)p_node inNode: (playlist_item_t *)p_node
...@@ -629,6 +623,13 @@ ...@@ -629,6 +623,13 @@
return NO; return NO;
} }
- (BOOL)isItem: (playlist_item_t *)p_item
inNode: (playlist_item_t *)p_node
checkItemExistence:(BOOL)b_check
{
[self isItem:p_item inNode:p_node checkItemExistence:b_check locked:NO];
}
/* This method is usefull for instance to remove the selected children of an /* This method is usefull for instance to remove the selected children of an
already selected node */ already selected node */
- (void)removeItemsFrom:(id)o_items ifChildrenOf:(id)o_nodes - (void)removeItemsFrom:(id)o_items ifChildrenOf:(id)o_nodes
...@@ -748,7 +749,7 @@ ...@@ -748,7 +749,7 @@
p_item = NULL; p_item = NULL;
} }
} }
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, false, p_node, p_item ); playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Unlocked, p_node, p_item );
} }
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
...@@ -856,7 +857,7 @@ ...@@ -856,7 +857,7 @@
playlist_NodeDelete( p_playlist, p_item, true, false ); playlist_NodeDelete( p_playlist, p_item, true, false );
} }
else else
playlist_DeleteFromInput( p_playlist, p_item->p_input->i_id, true ); playlist_DeleteFromInput( p_playlist, p_item->p_input->i_id, pl_Locked );
} }
PL_UNLOCK; PL_UNLOCK;
...@@ -1017,13 +1018,13 @@ ...@@ -1017,13 +1018,13 @@
playlist_AddInput( p_playlist, p_input, PLAYLIST_INSERT, playlist_AddInput( p_playlist, p_input, PLAYLIST_INSERT,
i_position == -1 ? PLAYLIST_END : i_position + i_item, true, i_position == -1 ? PLAYLIST_END : i_position + i_item, true,
true ); pl_Locked );
if( i_item == 0 && !b_enqueue ) if( i_item == 0 && !b_enqueue )
{ {
playlist_item_t *p_item; playlist_item_t *p_item;
p_item = playlist_ItemGetByInput( p_playlist, p_input, true ); p_item = playlist_ItemGetByInput( p_playlist, p_input, pl_Locked );
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, NULL, p_item ); playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked, NULL, p_item );
} }
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
} }
...@@ -1051,19 +1052,21 @@ ...@@ -1051,19 +1052,21 @@
/* Add the item */ /* Add the item */
/* FIXME: playlist_BothAddInput() can fail */ /* FIXME: playlist_BothAddInput() can fail */
playlist_BothAddInput( p_playlist, p_input, p_node, PL_LOCK;
playlist_BothAddInput( p_playlist, p_input, p_node,
PLAYLIST_INSERT, PLAYLIST_INSERT,
i_position == -1 ? i_position == -1 ?
PLAYLIST_END : i_position + i_item, PLAYLIST_END : i_position + i_item,
NULL, NULL, false ); NULL, NULL, pl_Locked );
if( i_item == 0 && !b_enqueue ) if( i_item == 0 && !b_enqueue )
{ {
playlist_item_t *p_item; playlist_item_t *p_item;
p_item = playlist_ItemGetByInput( p_playlist, p_input, true ); p_item = playlist_ItemGetByInput( p_playlist, p_input, pl_Locked );
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, NULL, p_item ); playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked, NULL, p_item );
} }
PL_UNLOCK;
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
} }
[self playlistUpdated]; [self playlistUpdated];
......
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