-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 | |||
@@ -133,48 +133,49 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
133 | this, SLOT( addToSelection( QListViewItem *) ) ); | 133 | this, SLOT( addToSelection( QListViewItem *) ) ); |
134 | connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), | 134 | connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), |
135 | this, SLOT( loadList( const DocLnk & ) ) ); | 135 | this, SLOT( loadList( const DocLnk & ) ) ); |
136 | connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ), | 136 | connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ), |
137 | this, SLOT( tabChanged( QWidget* ) ) ); | 137 | this, SLOT( tabChanged( QWidget* ) ) ); |
138 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), | 138 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), |
139 | d->tbPlay, SLOT( setOn( bool ) ) ); | 139 | d->tbPlay, SLOT( setOn( bool ) ) ); |
140 | connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), | 140 | connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), |
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() ); |
173 | d->tbLoop->setOn( mediaPlayerState->looping() ); | 174 | d->tbLoop->setOn( mediaPlayerState->looping() ); |
174 | d->tbShuffle->setOn( mediaPlayerState->shuffled() ); | 175 | d->tbShuffle->setOn( mediaPlayerState->shuffled() ); |
175 | setPlaylist( true ); | 176 | setPlaylist( true ); |
176 | } | 177 | } |
177 | 178 | ||
178 | 179 | ||
179 | void PlayListWidget::readConfig( Config& cfg ) { | 180 | void PlayListWidget::readConfig( Config& cfg ) { |
180 | 181 | ||
@@ -463,49 +464,49 @@ bool PlayListWidget::next() { | |||
463 | 464 | ||
464 | bool PlayListWidget::first() { | 465 | bool PlayListWidget::first() { |
465 | if ( mediaPlayerState->playlist() ) | 466 | if ( mediaPlayerState->playlist() ) |
466 | return d->selectedFiles->first(); | 467 | return d->selectedFiles->first(); |
467 | else | 468 | else |
468 | return mediaPlayerState->looping(); | 469 | return mediaPlayerState->looping(); |
469 | } | 470 | } |
470 | 471 | ||
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(); |
504 | } | 505 | } |
505 | } | 506 | } |
506 | 507 | ||
507 | 508 | ||
508 | void PlayListWidget::addSelected() { | 509 | void PlayListWidget::addSelected() { |
509 | 510 | ||
510 | switch (whichList()) { | 511 | switch (whichList()) { |
511 | case 0: //playlist | 512 | case 0: //playlist |