-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 18 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 2 |
2 files changed, 12 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index a708cf6..92da73b 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -784,16 +784,25 @@ void PlayListWidget::populateVideoView() { | |||
784 | QString::number( QFile( Vdit.current()->file() ).size() ), | 784 | QString::number( QFile( Vdit.current()->file() ).size() ), |
785 | ""/*storage*/, Vdit.current()->file()); | 785 | ""/*storage*/, Vdit.current()->file()); |
786 | newItem->setPixmap(0, Resource::loadPixmap( "opieplayer2/videofile" ) ); | 786 | newItem->setPixmap(0, Resource::loadPixmap( "opieplayer2/videofile" ) ); |
787 | } | 787 | } |
788 | } | 788 | } |
789 | videoPopulated=true; | 789 | videoPopulated=true; |
790 | } | 790 | } |
791 | 791 | ||
792 | QListView *PlayListWidget::currentFileListView() const | ||
793 | { | ||
794 | switch ( currentTab() ) { | ||
795 | case AudioFiles: return audioView; | ||
796 | case VideoFiles: return videoView; | ||
797 | default: assert( false ); | ||
798 | } | ||
799 | return 0; | ||
800 | } | ||
792 | 801 | ||
793 | void PlayListWidget::openFile() { | 802 | void PlayListWidget::openFile() { |
794 | // http://66.28.164.33:2080 | 803 | // http://66.28.164.33:2080 |
795 | // http://somafm.com/star0242.m3u | 804 | // http://somafm.com/star0242.m3u |
796 | QString filename, name; | 805 | QString filename, name; |
797 | InputDialog *fileDlg; | 806 | InputDialog *fileDlg; |
798 | fileDlg = new InputDialog(this,tr("Open file or URL"),TRUE, 0); | 807 | fileDlg = new InputDialog(this,tr("Open file or URL"),TRUE, 0); |
799 | fileDlg->exec(); | 808 | fileDlg->exec(); |
@@ -1148,17 +1157,10 @@ PlayListWidget::TabType PlayListWidget::currentTab() const | |||
1148 | 1157 | ||
1149 | int index = tabWidget->currentPageIndex(); | 1158 | int index = tabWidget->currentPageIndex(); |
1150 | assert( index < NumTabTypes && index >= 0 ); | 1159 | assert( index < NumTabTypes && index >= 0 ); |
1151 | 1160 | ||
1152 | return indexToTabType[ index ]; | 1161 | return indexToTabType[ index ]; |
1153 | } | 1162 | } |
1154 | 1163 | ||
1155 | QString PlayListWidget::currentFileListPathName() const { | 1164 | QString PlayListWidget::currentFileListPathName() const { |
1156 | switch (currentTab()) { | 1165 | return currentFileListView()->currentItem()->text( 3 ); |
1157 | case AudioFiles: | ||
1158 | return audioView->currentItem()->text(3); | ||
1159 | case VideoFiles: | ||
1160 | return videoView->currentItem()->text(3); | ||
1161 | default: assert( false ); | ||
1162 | }; | ||
1163 | return QString::null; | ||
1164 | } | 1166 | } |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index 7044abe..a608eae 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h | |||
@@ -85,16 +85,18 @@ private: | |||
85 | int defaultSkinIndex; | 85 | int defaultSkinIndex; |
86 | bool audioScan, videoScan, audioPopulated, videoPopulated; | 86 | bool audioScan, videoScan, audioPopulated, videoPopulated; |
87 | void readm3u(const QString &); | 87 | void readm3u(const QString &); |
88 | void readPls(const QString &); | 88 | void readPls(const QString &); |
89 | void initializeStates(); | 89 | void initializeStates(); |
90 | void populateAudioView(); | 90 | void populateAudioView(); |
91 | void populateVideoView(); | 91 | void populateVideoView(); |
92 | 92 | ||
93 | QListView *currentFileListView() const; | ||
94 | |||
93 | private slots: | 95 | private slots: |
94 | void populateSkinsMenu(); | 96 | void populateSkinsMenu(); |
95 | void skinsMenuActivated(int); | 97 | void skinsMenuActivated(int); |
96 | void pmViewActivated(int); | 98 | void pmViewActivated(int); |
97 | void writem3u(); | 99 | void writem3u(); |
98 | void writeCurrentM3u(); | 100 | void writeCurrentM3u(); |
99 | void scanForAudio(); | 101 | void scanForAudio(); |
100 | void scanForVideo(); | 102 | void scanForVideo(); |