-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 25 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 4 |
2 files changed, 11 insertions, 18 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index a8429e3..fd256b7 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -576,7 +576,4 @@ void PlayListWidget::addToSelection( QListViewItem *it) { | |||
576 | if(it) { | 576 | if(it) { |
577 | switch ( whichList()) { | 577 | if ( currentTab() == CurrentPlayList ) |
578 | case 0: //playlist | 578 | return; |
579 | return; | ||
580 | break; | ||
581 | }; | ||
582 | // case 1: { | 579 | // case 1: { |
@@ -599,4 +596,4 @@ void PlayListWidget::tabChanged(QWidget *) { | |||
599 | 596 | ||
600 | switch ( whichList()) { | 597 | switch ( currentTab() ) { |
601 | case 0: | 598 | case CurrentPlayList: |
602 | { | 599 | { |
@@ -609,3 +606,3 @@ void PlayListWidget::tabChanged(QWidget *) { | |||
609 | break; | 606 | break; |
610 | case 1: | 607 | case AudioFiles: |
611 | { | 608 | { |
@@ -621,3 +618,3 @@ void PlayListWidget::tabChanged(QWidget *) { | |||
621 | break; | 618 | break; |
622 | case 2: | 619 | case VideoFiles: |
623 | { | 620 | { |
@@ -632,3 +629,3 @@ void PlayListWidget::tabChanged(QWidget *) { | |||
632 | break; | 629 | break; |
633 | case 3: | 630 | case PlayLists: |
634 | { | 631 | { |
@@ -1135,9 +1132,5 @@ void PlayListWidget::skinsMenuActivated( int item ) { | |||
1135 | 1132 | ||
1136 | int PlayListWidget::whichList() const { | ||
1137 | return tabWidget->currentPageIndex(); | ||
1138 | } | ||
1139 | |||
1140 | PlayListWidget::TabType PlayListWidget::currentTab() const | 1133 | PlayListWidget::TabType PlayListWidget::currentTab() const |
1141 | { | 1134 | { |
1142 | static const TabType indexToTabType[ NumTabTypes ] = | 1135 | static const TabType indexToTabType[ TabTypeCount ] = |
1143 | { CurrentPlayList, AudioFiles, VideoFiles, PlayLists }; | 1136 | { CurrentPlayList, AudioFiles, VideoFiles, PlayLists }; |
@@ -1145,3 +1138,3 @@ PlayListWidget::TabType PlayListWidget::currentTab() const | |||
1145 | int index = tabWidget->currentPageIndex(); | 1138 | int index = tabWidget->currentPageIndex(); |
1146 | assert( index < NumTabTypes && index >= 0 ); | 1139 | assert( index < TabTypeCount && index >= 0 ); |
1147 | 1140 | ||
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index 238a75c..2e2ff89 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h | |||
@@ -57,3 +57,4 @@ class PlayListWidget : public PlayListWidgetGui { | |||
57 | public: | 57 | public: |
58 | enum TabType { CurrentPlayList, AudioFiles, VideoFiles, PlayLists, NumTabTypes = 4 }; | 58 | enum TabType { CurrentPlayList, AudioFiles, VideoFiles, PlayLists }; |
59 | enum { TabTypeCount = 4 }; | ||
59 | 60 | ||
@@ -70,3 +71,2 @@ public: | |||
70 | int selected; | 71 | int selected; |
71 | int whichList() const; | ||
72 | TabType currentTab() const; | 72 | TabType currentTab() const; |