First implementation at the "loop by default" settings.
To make it better, there should be a looping mode per window, and the settings should serve only as defaults. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38570 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -604,9 +604,19 @@ MainWin::MessageReceived(BMessage* msg)
|
||||
bool hadNext = fPlaylist->SetCurrentItemIndex(
|
||||
fPlaylist->CurrentItemIndex() + 1);
|
||||
if (!hadNext) {
|
||||
// Reached end of playlist
|
||||
// Handle "quit when done" settings
|
||||
if ((fHasVideo && fCloseWhenDonePlayingMovie)
|
||||
|| (!fHasVideo && fCloseWhenDonePlayingSound))
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
// Handle "loop by default" settings
|
||||
if ((fHasVideo && fLoopMovies)
|
||||
|| (!fHasVideo && fLoopSounds)) {
|
||||
if (fPlaylist->CountItems() > 1)
|
||||
fPlaylist->SetCurrentItemIndex(0);
|
||||
else
|
||||
fController->Play();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2287,6 +2297,8 @@ MainWin::_AdoptGlobalSettings()
|
||||
|
||||
fCloseWhenDonePlayingMovie = settings.closeWhenDonePlayingMovie;
|
||||
fCloseWhenDonePlayingSound = settings.closeWhenDonePlayingSound;
|
||||
fLoopMovies = settings.loopMovie;
|
||||
fLoopSounds = settings.loopSound;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user