X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fbeos%2FInterfaceWindow.cpp;h=03b304651f32d60cbdb157e14c227b0f50114885;hb=7ca4e3eb624251feb1f97cfc25104cce473e04a0;hp=a7faf92338ef0c4c3ea28532ebc05d70e06f5b41;hpb=d3fe7f28797d4dba65ffcdd60bf932e758a48a9e;p=vlc diff --git a/modules/gui/beos/InterfaceWindow.cpp b/modules/gui/beos/InterfaceWindow.cpp index a7faf92338..03b304651f 100644 --- a/modules/gui/beos/InterfaceWindow.cpp +++ b/modules/gui/beos/InterfaceWindow.cpp @@ -35,10 +35,13 @@ #include #include #include -#include /* VLC headers */ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include #include #include @@ -200,8 +203,7 @@ InterfaceWindow::InterfaceWindow( intf_thread_t * _p_intf, BRect frame, 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 ); @@ -320,7 +322,7 @@ InterfaceWindow::InterfaceWindow( intf_thread_t * _p_intf, BRect frame, /* Add the Show menu */ fShowMenu = new BMenu( _("Window") ); -#if 0 +#if 0 ADD_ELLIPSIS( _("Playlist") ); fShowMenu->AddItem( new BMenuItem( psz_tmp, new BMessage( OPEN_PLAYLIST ), 'P') ); #endif @@ -436,7 +438,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) memset( psz_uri, 0, 1024 ); snprintf( psz_uri, 1024, "dvdnav:%s", psz_device ); playlist_Add( p_playlist, psz_uri, psz_device, - PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, VLC_TRUE ); + PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true ); } UpdatePlaylist(); } @@ -731,12 +733,12 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) 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, VLC_TRUE ); + playlist_Clear( p_playlist, true ); } entry_ref ref; @@ -749,7 +751,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message ) if( p_playlist ) { playlist_Add( p_playlist, path.Path(), NULL, - PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, VLC_TRUE ); + PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true ); } } @@ -804,7 +806,7 @@ bool InterfaceWindow::QuitRequested() _StoreSettings(); - p_intf->b_die = 1; + vlc_object_kill( p_intf ); return( true ); } @@ -1071,10 +1073,10 @@ InterfaceWindow::_RestoreSettings() 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 ) @@ -1089,7 +1091,7 @@ InterfaceWindow::_RestoreSettings() #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 )