Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 36f77be..d73f0cd 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -176,48 +176,45 @@ void PlayListWidget::initializeStates() { | |||
176 | d->tbShuffle->setOn( mediaPlayerState->isShuffled() ); | 176 | d->tbShuffle->setOn( mediaPlayerState->isShuffled() ); |
177 | d->playListFrame->show(); | 177 | d->playListFrame->show(); |
178 | } | 178 | } |
179 | 179 | ||
180 | void PlayListWidget::writeDefaultPlaylist() { | 180 | void PlayListWidget::writeDefaultPlaylist() { |
181 | 181 | ||
182 | Config config( "OpiePlayer" ); | 182 | Config config( "OpiePlayer" ); |
183 | config.setGroup( "PlayList" ); | 183 | config.setGroup( "PlayList" ); |
184 | QString filename=QPEApplication::documentDir() + "/default.m3u"; | 184 | QString filename=QPEApplication::documentDir() + "/default.m3u"; |
185 | QString currentString = config.readEntry( "CurrentPlaylist", filename); | 185 | QString currentString = config.readEntry( "CurrentPlaylist", filename); |
186 | if( currentString == filename) { | 186 | if( currentString == filename) { |
187 | Om3u *m3uList; | 187 | Om3u *m3uList; |
188 | // odebug << "<<<<<<<<<<<<<default>>>>>>>>>>>>>>>>>>>" << oendl; | ||
189 | if( d->selectedFiles->first() ) { | 188 | if( d->selectedFiles->first() ) { |
190 | m3uList = new Om3u(filename, IO_ReadWrite | IO_Truncate); | 189 | m3uList = new Om3u(filename, IO_ReadWrite | IO_Truncate); |
191 | do { | 190 | do { |
192 | // odebug << d->selectedFiles->current()->file() << oendl; | ||
193 | m3uList->add( d->selectedFiles->current()->file() ); | 191 | m3uList->add( d->selectedFiles->current()->file() ); |
194 | } | 192 | } |
195 | while ( d->selectedFiles->next() ); | 193 | while ( d->selectedFiles->next() ); |
196 | 194 | ||
197 | m3uList->write(); | 195 | m3uList->write(); |
198 | m3uList->close(); | 196 | m3uList->close(); |
199 | delete m3uList; | 197 | delete m3uList; |
200 | 198 | ||
201 | } | 199 | } |
202 | } | 200 | } |
203 | } | 201 | } |
204 | 202 | ||
205 | void PlayListWidget::addToSelection( const DocLnk& lnk ) { | 203 | void PlayListWidget::addToSelection( const DocLnk& lnk ) { |
206 | d->setDocumentUsed = FALSE; | 204 | d->setDocumentUsed = FALSE; |
207 | if( QFileInfo( lnk.file() ).exists() || | 205 | if( QFileInfo( lnk.file() ).exists() || |
208 | lnk.file().left(4) == "http" ) { | 206 | lnk.file().left(4) == "http" ) { |
209 | d->selectedFiles->addToSelection( lnk ); | 207 | d->selectedFiles->addToSelection( lnk ); |
210 | } | 208 | } |
211 | // writeCurrentM3u(); | ||
212 | } | 209 | } |
213 | 210 | ||
214 | 211 | ||
215 | void PlayListWidget::clearList() { | 212 | void PlayListWidget::clearList() { |
216 | while ( first() ) { | 213 | while ( first() ) { |
217 | d->selectedFiles->removeSelected(); | 214 | d->selectedFiles->removeSelected(); |
218 | } | 215 | } |
219 | Config cfg( "OpiePlayer" ); | 216 | Config cfg( "OpiePlayer" ); |
220 | cfg.setGroup("PlayList"); | 217 | cfg.setGroup("PlayList"); |
221 | cfg.writeEntry("CurrentPlaylist","default"); | 218 | cfg.writeEntry("CurrentPlaylist","default"); |
222 | setCaption("OpiePlayer"); | 219 | setCaption("OpiePlayer"); |
223 | } | 220 | } |