#include <String.h>
/* VLC headers */
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
#include <vlc_interface.h>
#include "InterfaceWindow.h"
// only do something if user clicked the same item twice
if ( fLastClickedItem == item )
{
- playlist_t * p_playlist;
- p_playlist = (playlist_t *) vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist )
{
playlist_Goto( p_playlist, i );
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
}
handled = true;
}
BListItem*
PlaylistView::_PlayingItem() const
{
- playlist_t * p_playlist;
- p_playlist = (playlist_t *) vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( !p_playlist )
{
}
BListItem * item = ItemAt( p_playlist->i_index );
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
return item;
}
{
if ( item == playingItem )
{
- playlist_t * p_playlist;
- p_playlist = (playlist_t *) vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( !p_playlist )
{
playlist_Goto( p_playlist, i );
SetCurrent( i );
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
break;
}
}