*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
fLastUpdateTime( system_time() ),
fSettings( new BMessage( 'sett' ) )
{
fLastUpdateTime( system_time() ),
fSettings( new BMessage( 'sett' ) )
{
var_AddCallback( p_playlist, "intf-change", PlaylistChanged, this );
var_AddCallback( p_playlist, "item-change", PlaylistChanged, this );
var_AddCallback( p_playlist, "intf-change", PlaylistChanged, this );
var_AddCallback( p_playlist, "item-change", PlaylistChanged, this );
fPlaylistWindow = new PlayListWindow( window_rect, _("Playlist"), this, p_intf );
window_rect.Set( screen_rect.right - 550,
screen_rect.top + 300,
screen_rect.right - 150,
screen_rect.top + 500 );
fPlaylistWindow = new PlayListWindow( window_rect, _("Playlist"), this, p_intf );
window_rect.Set( screen_rect.right - 550,
screen_rect.top + 300,
screen_rect.right - 150,
screen_rect.top + 500 );
fMessagesWindow = new MessagesWindow( p_intf, window_rect, _("Messages") );
// the media control view
fMessagesWindow = new MessagesWindow( p_intf, window_rect, _("Messages") );
// the media control view
ADD_ELLIPSIS( _("Playlist") );
fShowMenu->AddItem( new BMenuItem( psz_tmp, new BMessage( OPEN_PLAYLIST ), 'P') );
ADD_ELLIPSIS( _("Playlist") );
fShowMenu->AddItem( new BMenuItem( psz_tmp, new BMessage( OPEN_PLAYLIST ), 'P') );
ADD_ELLIPSIS( _("Messages") );
fShowMenu->AddItem( new BMenuItem( psz_tmp, new BMessage( OPEN_MESSAGES ), 'M' ) );
ADD_ELLIPSIS( _("Preferences") );
ADD_ELLIPSIS( _("Messages") );
fShowMenu->AddItem( new BMenuItem( psz_tmp, new BMessage( OPEN_MESSAGES ), 'M' ) );
ADD_ELLIPSIS( _("Preferences") );
memset( psz_uri, 0, 1024 );
snprintf( psz_uri, 1024, "dvdnav:%s", psz_device );
playlist_Add( p_playlist, psz_uri, psz_device,
memset( psz_uri, 0, 1024 );
snprintf( psz_uri, 1024, "dvdnav:%s", psz_device );
playlist_Add( p_playlist, psz_uri, psz_device,
- playlist_Add( 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 );
if( fPlaylistWindow->Lock() )
{
fPlaylistWindow->UpdatePlaylist( true );
fPlaylistWindow->Unlock();
b_playlist_update = false;
}
if( fPlaylistWindow->Lock() )
{
fPlaylistWindow->UpdatePlaylist( true );
fPlaylistWindow->Unlock();
b_playlist_update = false;
}
BRect frame;
if ( fSettings->FindRect( "main frame", &frame ) == B_OK )
set_window_pos( this, frame );
BRect frame;
if ( fSettings->FindRect( "main frame", &frame ) == B_OK )
set_window_pos( this, frame );
if (fSettings->FindRect( "playlist frame", &frame ) == B_OK )
set_window_pos( fPlaylistWindow, frame );
if (fSettings->FindRect( "playlist frame", &frame ) == B_OK )
set_window_pos( fPlaylistWindow, frame );
if (fSettings->FindRect( "messages frame", &frame ) == B_OK )
set_window_pos( fMessagesWindow, frame );
if (fSettings->FindRect( "settings frame", &frame ) == B_OK )
if (fSettings->FindRect( "messages frame", &frame ) == B_OK )
set_window_pos( fMessagesWindow, frame );
if (fSettings->FindRect( "settings frame", &frame ) == B_OK )
if ( fSettings->FindBool( "playlist showing", &showing ) == B_OK )
launch_window( fPlaylistWindow, showing );
if ( fSettings->FindBool( "playlist showing", &showing ) == B_OK )
launch_window( fPlaylistWindow, showing );
if ( fSettings->FindBool( "messages showing", &showing ) == B_OK )
launch_window( fMessagesWindow, showing );
if ( fSettings->FindBool( "settings showing", &showing ) == B_OK )
launch_window( fPreferencesWindow, showing );
if ( fSettings->FindBool( "messages showing", &showing ) == B_OK )
launch_window( fMessagesWindow, showing );
if ( fSettings->FindBool( "settings showing", &showing ) == B_OK )
launch_window( fPreferencesWindow, showing );
uint32 displayMode;
if ( fSettings->FindInt32( "playlist display mode", (int32*)&displayMode ) == B_OK )
fPlaylistWindow->SetDisplayMode( displayMode );
uint32 displayMode;
if ( fSettings->FindInt32( "playlist display mode", (int32*)&displayMode ) == B_OK )
fPlaylistWindow->SetDisplayMode( displayMode );
/* Save the windows positions */
if ( fSettings->ReplaceRect( "main frame", Frame() ) != B_OK )
fSettings->AddRect( "main frame", Frame() );
/* Save the windows positions */
if ( fSettings->ReplaceRect( "main frame", Frame() ) != B_OK )
fSettings->AddRect( "main frame", Frame() );
if ( fPlaylistWindow->Lock() )
{
if (fSettings->ReplaceRect( "playlist frame", fPlaylistWindow->Frame() ) != B_OK)
if ( fPlaylistWindow->Lock() )
{
if (fSettings->ReplaceRect( "playlist frame", fPlaylistWindow->Frame() ) != B_OK)
fSettings->AddBool( "playlist showing", !fPlaylistWindow->IsHidden() );
fPlaylistWindow->Unlock();
}
fSettings->AddBool( "playlist showing", !fPlaylistWindow->IsHidden() );
fPlaylistWindow->Unlock();
}
if ( fMessagesWindow->Lock() )
{
if (fSettings->ReplaceRect( "messages frame", fMessagesWindow->Frame() ) != B_OK)
if ( fMessagesWindow->Lock() )
{
if (fSettings->ReplaceRect( "messages frame", fMessagesWindow->Frame() ) != B_OK)
fSettings->AddBool( "settings showing", !fPreferencesWindow->IsHidden() );
fPreferencesWindow->Unlock();
}
fSettings->AddBool( "settings showing", !fPreferencesWindow->IsHidden() );
fPreferencesWindow->Unlock();
}
uint32 displayMode = fPlaylistWindow->DisplayMode();
if (fSettings->ReplaceInt32( "playlist display mode", displayMode ) != B_OK )
fSettings->AddInt32( "playlist display mode", displayMode );
uint32 displayMode = fPlaylistWindow->DisplayMode();
if (fSettings->ReplaceInt32( "playlist display mode", displayMode ) != B_OK )
fSettings->AddInt32( "playlist display mode", displayMode );