-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 11a7b5c..a708cf6 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -426,19 +426,14 @@ void PlayListWidget::useSelectedDocument() { | |||
426 | 426 | ||
427 | const DocLnk *PlayListWidget::current() { // this is fugly | 427 | const DocLnk *PlayListWidget::current() { // this is fugly |
428 | switch ( whichList() ) { | 428 | assert( currentTab() == CurrentPlayList ); |
429 | case 0: //playlist | 429 | |
430 | { | ||
431 | // qDebug("playlist"); | 430 | // qDebug("playlist"); |
432 | if ( mediaPlayerState->isUsingPlaylist() ) { | 431 | if ( mediaPlayerState->isUsingPlaylist() ) { |
433 | return d->selectedFiles->current(); | 432 | return d->selectedFiles->current(); |
434 | } else if ( d->setDocumentUsed && d->current ) { | 433 | } else if ( d->setDocumentUsed && d->current ) { |
435 | return d->current; | 434 | return d->current; |
436 | } else { | 435 | } else { |
437 | return &(d->files->selectedDocument()); | 436 | return &(d->files->selectedDocument()); |
438 | } | 437 | } |
439 | } | ||
440 | break; | ||
441 | }; | ||
442 | return 0; | ||
443 | } | 438 | } |
444 | 439 | ||
@@ -1159,12 +1154,11 @@ PlayListWidget::TabType PlayListWidget::currentTab() const | |||
1159 | 1154 | ||
1160 | QString PlayListWidget::currentFileListPathName() const { | 1155 | QString PlayListWidget::currentFileListPathName() const { |
1161 | switch (whichList()) { | 1156 | switch (currentTab()) { |
1162 | case 1: | 1157 | case AudioFiles: |
1163 | return audioView->currentItem()->text(3); | 1158 | return audioView->currentItem()->text(3); |
1164 | break; | 1159 | case VideoFiles: |
1165 | case 2: | ||
1166 | return videoView->currentItem()->text(3); | 1160 | return videoView->currentItem()->text(3); |
1167 | break; | 1161 | default: assert( false ); |
1168 | }; | 1162 | }; |
1169 | return ""; | 1163 | return QString::null; |
1170 | } | 1164 | } |