-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index b6525e1..897c458 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -141,32 +141,33 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
141 | d->tbLoop, SLOT( setOn( bool ) ) ); | 141 | d->tbLoop, SLOT( setOn( bool ) ) ); |
142 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), | 142 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), |
143 | d->tbShuffle, SLOT( setOn( bool ) ) ); | 143 | d->tbShuffle, SLOT( setOn( bool ) ) ); |
144 | connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), | 144 | connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), |
145 | this, SLOT( setPlaylist( bool ) ) ); | 145 | this, SLOT( setPlaylist( bool ) ) ); |
146 | connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), | 146 | connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), |
147 | this, SLOT( playIt( QListViewItem *) ) ); | 147 | this, SLOT( playIt( QListViewItem *) ) ); |
148 | connect ( gammaSlider, SIGNAL( valueChanged( int ) ), | 148 | connect ( gammaSlider, SIGNAL( valueChanged( int ) ), |
149 | mediaPlayerState, SLOT( setVideoGamma( int ) ) ); | 149 | mediaPlayerState, SLOT( setVideoGamma( int ) ) ); |
150 | 150 | ||
151 | // see which skins are installed | 151 | // see which skins are installed |
152 | videoScan=FALSE; | 152 | videoScan=FALSE; |
153 | audioScan=FALSE; | 153 | audioScan=FALSE; |
154 | populateSkinsMenu(); | 154 | populateSkinsMenu(); |
155 | initializeStates(); | 155 | initializeStates(); |
156 | 156 | ||
157 | cfg.setGroup("PlayList"); | ||
157 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "" ); | 158 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "" ); |
158 | loadList(DocLnk( currentPlaylist ) ); | 159 | loadList(DocLnk( currentPlaylist ) ); |
159 | setCaption( tr( "OpiePlayer: " ) + currentPlaylist ); | 160 | setCaption( tr( "OpiePlayer: " ) + currentPlaylist ); |
160 | } | 161 | } |
161 | 162 | ||
162 | 163 | ||
163 | PlayListWidget::~PlayListWidget() { | 164 | PlayListWidget::~PlayListWidget() { |
164 | if ( d->current ) { | 165 | if ( d->current ) { |
165 | delete d->current; | 166 | delete d->current; |
166 | } | 167 | } |
167 | delete d; | 168 | delete d; |
168 | } | 169 | } |
169 | 170 | ||
170 | 171 | ||
171 | void PlayListWidget::initializeStates() { | 172 | void PlayListWidget::initializeStates() { |
172 | d->tbPlay->setOn( mediaPlayerState->playing() ); | 173 | d->tbPlay->setOn( mediaPlayerState->playing() ); |
@@ -471,33 +472,33 @@ bool PlayListWidget::first() { | |||
471 | 472 | ||
472 | bool PlayListWidget::last() { | 473 | bool PlayListWidget::last() { |
473 | if ( mediaPlayerState->playlist() ) | 474 | if ( mediaPlayerState->playlist() ) |
474 | return d->selectedFiles->last(); | 475 | return d->selectedFiles->last(); |
475 | else | 476 | else |
476 | return mediaPlayerState->looping(); | 477 | return mediaPlayerState->looping(); |
477 | } | 478 | } |
478 | 479 | ||
479 | 480 | ||
480 | void PlayListWidget::saveList() { | 481 | void PlayListWidget::saveList() { |
481 | writem3u(); | 482 | writem3u(); |
482 | } | 483 | } |
483 | 484 | ||
484 | 485 | ||
485 | void PlayListWidget::loadList( const DocLnk & lnk) { | 486 | void PlayListWidget::loadList( const DocLnk & lnk) { |
486 | QString name = lnk.name(); | 487 | QString name = lnk.name(); |
487 | // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<currentList is "+name); | 488 | qDebug("<<<<<<<<<<<<<<<<<<<<<<<<currentList is "+name); |
488 | 489 | ||
489 | if( name.length()>0) { | 490 | if( name.length()>0) { |
490 | setCaption("OpiePlayer: "+name); | 491 | setCaption("OpiePlayer: "+name); |
491 | qDebug("<<<<<<<<<<<<load list "+ lnk.file()); | 492 | qDebug("<<<<<<<<<<<<load list "+ lnk.file()); |
492 | clearList(); | 493 | clearList(); |
493 | readm3u(lnk.file()); | 494 | readm3u(lnk.file()); |
494 | tabWidget->setCurrentPage(0); | 495 | tabWidget->setCurrentPage(0); |
495 | } | 496 | } |
496 | } | 497 | } |
497 | 498 | ||
498 | 499 | ||
499 | void PlayListWidget::setPlaylist( bool shown ) { | 500 | void PlayListWidget::setPlaylist( bool shown ) { |
500 | if ( shown ) { | 501 | if ( shown ) { |
501 | d->playListFrame->show(); | 502 | d->playListFrame->show(); |
502 | } else { | 503 | } else { |
503 | d->playListFrame->hide(); | 504 | d->playListFrame->hide(); |