X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fskins2%2Fvars%2Fplaytree.cpp;h=0033e1ce8ef9dadd6b5d6f0edd9cf2be15ad359d;hb=494ace96d068ee8e4b6b689da0ae469c0c0e4fe3;hp=85cd2845e711bc1fb8daba899ea9bd13ee32d9fe;hpb=99fab9089e9e1709d9c3a4bc5ced0c137ac59134;p=vlc diff --git a/modules/gui/skins2/vars/playtree.cpp b/modules/gui/skins2/vars/playtree.cpp index 85cd2845e7..0033e1ce8e 100644 --- a/modules/gui/skins2/vars/playtree.cpp +++ b/modules/gui/skins2/vars/playtree.cpp @@ -26,7 +26,7 @@ # include "config.h" #endif -#include +#include #include "playtree.hpp" #include @@ -52,7 +52,7 @@ Playtree::~Playtree() void Playtree::delSelected() { Iterator it = begin(); - vlc_mutex_lock( &getIntf()->p_sys->p_playlist->object_lock ); + vlc_object_lock( getIntf()->p_sys->p_playlist ); for( it = begin(); it != end(); it = getNextVisibleItem( it ) ) { if( (*it).m_selected && !(*it).isReadonly() ) @@ -74,7 +74,7 @@ void Playtree::delSelected() if( p_item->i_children == -1 ) { playlist_DeleteFromInput( getIntf()->p_sys->p_playlist, - p_item->p_input->i_id, VLC_TRUE ); + p_item->p_input->i_id, pl_Locked ); it2 = getNextVisibleItem( it ) ; it->parent()->removeChild( it ); it = it2; @@ -82,7 +82,7 @@ void Playtree::delSelected() else { playlist_NodeDelete( getIntf()->p_sys->p_playlist, p_item, - VLC_TRUE, VLC_FALSE ); + true, false ); it2 = getNextSibling( it ); it->parent()->removeChild( it ); it = it2; @@ -93,12 +93,12 @@ void Playtree::delSelected() it = getNextVisibleItem( it ); } } - vlc_mutex_unlock( &getIntf()->p_sys->p_playlist->object_lock ); + vlc_object_unlock( getIntf()->p_sys->p_playlist ); } void Playtree::action( VarTree *pItem ) { - vlc_mutex_lock( &m_pPlaylist->object_lock ); + vlc_object_lock( m_pPlaylist ); VarTree::Iterator it; playlist_item_t *p_item = (playlist_item_t *)pItem->m_pData; @@ -112,9 +112,9 @@ void Playtree::action( VarTree *pItem ) if( p_parent ) { - playlist_Control( m_pPlaylist, PLAYLIST_VIEWPLAY, VLC_TRUE, p_parent, p_item ); + playlist_Control( m_pPlaylist, PLAYLIST_VIEWPLAY, pl_Locked, p_parent, p_item ); } - vlc_mutex_unlock( &m_pPlaylist->object_lock ); + vlc_object_unlock( m_pPlaylist ); } void Playtree::onChange() @@ -175,7 +175,7 @@ void Playtree::onAppend( playlist_add_t *p_add ) if( item == end() ) { playlist_item_t *p_item = playlist_ItemGetById( - m_pPlaylist, p_add->i_item, VLC_TRUE ); + m_pPlaylist, p_add->i_item, pl_Unlocked ); if( !p_item ) return; UString *pName = new UString( getIntf(), p_item->p_input->psz_name ); @@ -213,7 +213,7 @@ void Playtree::buildNode( playlist_item_t *pNode, VarTree &rTree ) void Playtree::buildTree() { clear(); - vlc_mutex_lock( &m_pPlaylist->object_lock ); + vlc_object_lock( m_pPlaylist ); i_items_to_append = 0; @@ -228,7 +228,7 @@ void Playtree::buildTree() buildNode( m_pPlaylist->p_root_category, *this ); - vlc_mutex_unlock( &m_pPlaylist->object_lock ); + vlc_object_unlock( m_pPlaylist ); // What is it ? // checkParents( NULL ); }