summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-02 15:11:50 (UTC)
committer simon <simon>2002-12-02 15:11:50 (UTC)
commit9f770813346acbe7817b20c5fe0fea03827fc41a (patch) (side-by-side diff)
tree271e8091f19e5701576fa5f1503cca08f955a7b0
parent5380767372ecf3ab22f799abda32f414b0cc7ede (diff)
downloadopie-9f770813346acbe7817b20c5fe0fea03827fc41a.zip
opie-9f770813346acbe7817b20c5fe0fea03827fc41a.tar.gz
opie-9f770813346acbe7817b20c5fe0fea03827fc41a.tar.bz2
- removed whichList() alltogether
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp25
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h4
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) {
if(it) {
- switch ( whichList()) {
- case 0: //playlist
- return;
- break;
- };
+ if ( currentTab() == CurrentPlayList )
+ return;
// case 1: {
@@ -599,4 +596,4 @@ void PlayListWidget::tabChanged(QWidget *) {
- switch ( whichList()) {
- case 0:
+ switch ( currentTab() ) {
+ case CurrentPlayList:
{
@@ -609,3 +606,3 @@ void PlayListWidget::tabChanged(QWidget *) {
break;
- case 1:
+ case AudioFiles:
{
@@ -621,3 +618,3 @@ void PlayListWidget::tabChanged(QWidget *) {
break;
- case 2:
+ case VideoFiles:
{
@@ -632,3 +629,3 @@ void PlayListWidget::tabChanged(QWidget *) {
break;
- case 3:
+ case PlayLists:
{
@@ -1135,9 +1132,5 @@ void PlayListWidget::skinsMenuActivated( int item ) {
-int PlayListWidget::whichList() const {
- return tabWidget->currentPageIndex();
-}
-
PlayListWidget::TabType PlayListWidget::currentTab() const
{
- static const TabType indexToTabType[ NumTabTypes ] =
+ static const TabType indexToTabType[ TabTypeCount ] =
{ CurrentPlayList, AudioFiles, VideoFiles, PlayLists };
@@ -1145,3 +1138,3 @@ PlayListWidget::TabType PlayListWidget::currentTab() const
int index = tabWidget->currentPageIndex();
- assert( index < NumTabTypes && index >= 0 );
+ assert( index < TabTypeCount && index >= 0 );
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 {
public:
- enum TabType { CurrentPlayList, AudioFiles, VideoFiles, PlayLists, NumTabTypes = 4 };
+ enum TabType { CurrentPlayList, AudioFiles, VideoFiles, PlayLists };
+ enum { TabTypeCount = 4 };
@@ -70,3 +71,2 @@ public:
int selected;
- int whichList() const;
TabType currentTab() const;