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
@@ -574,11 +574,8 @@ void PlayListWidget::addToSelection( QListViewItem *it) {
d->setDocumentUsed = FALSE;
if(it) {
- switch ( whichList()) {
- case 0: //playlist
- return;
- break;
- };
+ if ( currentTab() == CurrentPlayList )
+ return;
// case 1: {
DocLnk lnk;
QString filename;
@@ -597,8 +594,8 @@ void PlayListWidget::addToSelection( QListViewItem *it) {
void PlayListWidget::tabChanged(QWidget *) {
- switch ( whichList()) {
- case 0:
+ switch ( currentTab() ) {
+ case CurrentPlayList:
{
if( !tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->hide();
@@ -607,7 +604,7 @@ void PlayListWidget::tabChanged(QWidget *) {
d->tbAddToList->setEnabled(FALSE);
}
break;
- case 1:
+ case AudioFiles:
{
// audioView->clear();
if(!audioPopulated) populateAudioView();
@@ -619,7 +616,7 @@ void PlayListWidget::tabChanged(QWidget *) {
d->tbAddToList->setEnabled(TRUE);
}
break;
- case 2:
+ case VideoFiles:
{
// videoView->clear();
if(!videoPopulated) populateVideoView();
@@ -630,7 +627,7 @@ void PlayListWidget::tabChanged(QWidget *) {
d->tbAddToList->setEnabled(TRUE);
}
break;
- case 3:
+ case PlayLists:
{
if( tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->show();
@@ -1133,17 +1130,13 @@ void PlayListWidget::skinsMenuActivated( int item ) {
tr( "You must <b>restart</b> Opieplayer<br>to see your changes." ) );
}
-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 };
int index = tabWidget->currentPageIndex();
- assert( index < NumTabTypes && index >= 0 );
+ assert( index < TabTypeCount && index >= 0 );
return indexToTabType[ index ];
}
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
@@ -55,7 +55,8 @@ class QLabel;
class PlayListWidget : public PlayListWidgetGui {
Q_OBJECT
public:
- enum TabType { CurrentPlayList, AudioFiles, VideoFiles, PlayLists, NumTabTypes = 4 };
+ enum TabType { CurrentPlayList, AudioFiles, VideoFiles, PlayLists };
+ enum { TabTypeCount = 4 };
PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 );
~PlayListWidget();
@@ -68,7 +69,6 @@ public:
const DocLnk *current();
void useSelectedDocument();
int selected;
- int whichList() const;
TabType currentTab() const;
public slots: