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:
parent
c520f2c9c9
commit
c5f8afb944
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -186,6 +186,8 @@ private:
|
||||
ListenerAdapter fGlobalSettingsListener;
|
||||
bool fCloseWhenDonePlayingMovie;
|
||||
bool fCloseWhenDonePlayingSound;
|
||||
bool fLoopMovies;
|
||||
bool fLoopSounds;
|
||||
bigtime_t fInitialSeekPosition;
|
||||
|
||||
static int sNoVideoWidth;
|
||||
|
@ -1,9 +1,10 @@
|
||||
/*
|
||||
* Copyright 2008-2009, Haiku, Inc. All rights reserved.
|
||||
* Copyright 2008-2010, Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Fredrik Modéen <fredrik@modeen.se>
|
||||
* Stephan Aßmus <superstippi@gmx.de>
|
||||
*/
|
||||
|
||||
#include "SettingsWindow.h"
|
||||
@ -261,10 +262,6 @@ SettingsWindow::SettingsWindow(BRect frame)
|
||||
view->AddChild(bbox);
|
||||
AddChild(view);
|
||||
#endif
|
||||
|
||||
// disable currently unsupported features
|
||||
fLoopMoviesCB->SetEnabled(false);
|
||||
fLoopSoundsCB->SetEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user