]> git.sesse.net Git - vlc/blobdiff - modules/gui/beos/ListViews.cpp
contrib: dvdread's autogen.sh was significantly changed in SVN
[vlc] / modules / gui / beos / ListViews.cpp
index e339c6fa2f95a555883f051f86802cbfcf6887a1..2822915f80ac392d2f209309659fd0c039037581 100644 (file)
 #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"
@@ -686,13 +690,11 @@ PlaylistView::MouseDown( BPoint where )
                 // 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;
                 }
@@ -1075,9 +1077,7 @@ PlaylistView::SetDisplayMode( uint32 mode )
 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 )
     {
@@ -1085,7 +1085,7 @@ PlaylistView::_PlayingItem() const
     }
 
     BListItem * item = ItemAt( p_playlist->i_index );
-    vlc_object_release( p_playlist );
+    pl_Release( p_intf );
     return item;
 }
 
@@ -1099,9 +1099,7 @@ PlaylistView::_SetPlayingIndex( BListItem* playingItem )
     {
         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 )
             {
@@ -1111,7 +1109,7 @@ PlaylistView::_SetPlayingIndex( BListItem* playingItem )
             playlist_Goto( p_playlist, i );
             SetCurrent( i );
 
-            vlc_object_release( p_playlist );
+            pl_Release( p_intf );
             break;
         }
     }