summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-11-10 16:03:09 (UTC)
committer llornkcor <llornkcor>2002-11-10 16:03:09 (UTC)
commitcb4821802897bbf6e06be3b2608656e05db68b96 (patch) (side-by-side diff)
tree672351f10dfb9a6bd13f753d876c975a39b74270
parentee6938139a5f8f24da901ab5a41930a98af00d44 (diff)
downloadopie-cb4821802897bbf6e06be3b2608656e05db68b96.zip
opie-cb4821802897bbf6e06be3b2608656e05db68b96.tar.gz
opie-cb4821802897bbf6e06be3b2608656e05db68b96.tar.bz2
display loaded playlist in caption at start
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 8b0f501..1f19b30 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -41,49 +41,52 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name )
qApp->processEvents();
// QPEApplication::grabKeyboard(); // EVIL
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) );
connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) );
connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
connect( mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) );
connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) );
connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) );
connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) );
connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
connect( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) );
connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) );
connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) );
connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
volControl = new VolumeControl;
xineControl = new XineControl();
- playList->setCaption(tr("OpiePlayer"));
+ Config cfg( "OpiePlayer" );
+ cfg.setGroup("PlayList");
+ QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default");
+ playList->setCaption( tr( "OpiePlayer: " ) + QFileInfo(currentPlaylist).baseName() );
}
MediaPlayer::~MediaPlayer() {
delete xineControl;
delete volControl;
}
void MediaPlayer::pauseCheck( bool b ) {
if ( b && !mediaPlayerState->playing() ) {
mediaPlayerState->setPaused( FALSE );
}
}
void MediaPlayer::play() {
mediaPlayerState->setPlaying( FALSE );
mediaPlayerState->setPlaying( TRUE );
}
void MediaPlayer::setPlaying( bool play ) {
if ( !play ) {
return;
}
if ( mediaPlayerState->paused() ) {