#include <scsi.h>
#include <scsiprobe_driver.h>
#include <fs_info.h>
-#include <string.h>
/* VLC headers */
-#include <vlc/vlc.h>
-#include <vlc/aout.h>
-#include <vlc/intf.h>
-#include <vlc/input.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_aout.h>
+#include <vlc_interface.h>
/* BeOS interface headers */
#include "MsgVals.h"
fLastUpdateTime( system_time() ),
fSettings( new BMessage( 'sett' ) )
{
- p_playlist = (playlist_t *)
- vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+ p_playlist = pl_Yield( p_intf );
var_AddCallback( p_playlist, "intf-change", PlaylistChanged, this );
var_AddCallback( p_playlist, "item-change", PlaylistChanged, this );
/* Add the Show menu */
fShowMenu = new BMenu( _("Window") );
+#if 0
ADD_ELLIPSIS( _("Playlist") );
fShowMenu->AddItem( new BMenuItem( psz_tmp, new BMessage( OPEN_PLAYLIST ), 'P') );
+#endif
ADD_ELLIPSIS( _("Messages") );
fShowMenu->AddItem( new BMenuItem( psz_tmp, new BMessage( OPEN_MESSAGES ), 'M' ) );
-#if 0
ADD_ELLIPSIS( _("Preferences") );
fShowMenu->AddItem( new BMenuItem( psz_tmp, new BMessage( OPEN_PREFERENCES ), 'S' ) );
-#endif
fMenuBar->AddItem( fShowMenu );
// add the media control view after the menubar is complete
char psz_uri[1024];
memset( psz_uri, 0, 1024 );
snprintf( psz_uri, 1024, "dvdnav:%s", psz_device );
- playlist_PlaylistAdd( p_playlist, psz_uri, psz_device,
- PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
+ playlist_Add( p_playlist, psz_uri, psz_device,
+ PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true );
}
UpdatePlaylist();
}
break;
}
- vlc_bool_t b_remove = ( p_message->WasDropped() &&
+ bool b_remove = ( p_message->WasDropped() &&
!( modifiers() & B_SHIFT_KEY ) );
if( b_remove && p_playlist )
{
- playlist_Clear( p_playlist );
+ playlist_Clear( p_playlist, true );
}
entry_ref ref;
if( p_playlist )
{
- playlist_PlaylistAdd( p_playlist, path.Path(), path.Path(),
- PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
+ playlist_Add( p_playlist, path.Path(), NULL,
+ PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true );
}
}
_StoreSettings();
- p_intf->b_die = 1;
+ vlc_object_kill( p_intf );
return( true );
}
b_playlist_update = false;
}
#endif
- p_mediaControl->SetEnabled( p_playlist->i_size );
+ p_mediaControl->SetEnabled( !playlist_IsEmpty( p_playlist ) );
}
if( p_input )
BRect frame;
if ( fSettings->FindRect( "main frame", &frame ) == B_OK )
set_window_pos( this, frame );
-#if 0
+#if 0
if (fSettings->FindRect( "playlist frame", &frame ) == B_OK )
set_window_pos( fPlaylistWindow, frame );
-#endif
+#endif
if (fSettings->FindRect( "messages frame", &frame ) == B_OK )
set_window_pos( fMessagesWindow, frame );
if (fSettings->FindRect( "settings frame", &frame ) == B_OK )
#if 0
if ( fSettings->FindBool( "playlist showing", &showing ) == B_OK )
launch_window( fPlaylistWindow, showing );
-#endif
+#endif
if ( fSettings->FindBool( "messages showing", &showing ) == B_OK )
launch_window( fMessagesWindow, showing );
if ( fSettings->FindBool( "settings showing", &showing ) == B_OK )