author | llornkcor <llornkcor> | 2002-10-08 19:37:34 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-10-08 19:37:34 (UTC) |
commit | b81a4afcb4d363bf1ee50aa7b43a1f1566addc9d (patch) (side-by-side diff) | |
tree | 60246a741e7895f5efe6755c2aee455376ca0939 | |
parent | de9496b2e6e2784dc4cc83dd5800f89f0954affc (diff) | |
download | opie-b81a4afcb4d363bf1ee50aa7b43a1f1566addc9d.zip opie-b81a4afcb4d363bf1ee50aa7b43a1f1566addc9d.tar.gz opie-b81a4afcb4d363bf1ee50aa7b43a1f1566addc9d.tar.bz2 |
more fixes 2
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index cc4be23..c0d3108 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -498,5 +498,5 @@ void PlayListWidget::playIt( QListViewItem *it) { void PlayListWidget::addToSelection( QListViewItem *it) { d->setDocumentUsed = FALSE; - qDebug("addToSelection2"); + if(it) { switch ( whichList()) { @@ -724,14 +724,10 @@ void PlayListWidget::openFile() { } - qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"+ m3uFile); - m3uList = new Om3u( cfg.readEntry("CurrentPlaylist",""), IO_Append | IO_ReadWrite ); - m3uList->add( filename); - m3uList->write(); - m3uList->close(); - if(m3uList) delete m3uList; +// qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"+ m3uFile); lnk.setName( filename ); //sets name lnk.setFile( filename ); //sets file name lnk.setIcon("opieplayer2/musicfile"); d->selectedFiles->addToSelection( lnk ); + writeCurrentM3u(); } else if( filename.right( 3) == "m3u" ) { @@ -740,12 +736,7 @@ void PlayListWidget::openFile() { } else if( filename.right(3) == "pls" ) { readPls( filename ); - } - else { - m3uList = new Om3u( cfg.readEntry("CurrentPlaylist",""), IO_Append | IO_ReadWrite ); - m3uList->add( filename); - m3uList->write(); - m3uList->close(); - if(m3uList) delete m3uList; + } else { d->selectedFiles->addToSelection( DocLnk(filename) ); + writeCurrentM3u(); } } @@ -850,5 +841,5 @@ void PlayListWidget::readPls( const QString &filename ) { writes current playlist to current m3u file */ void PlayListWidget::writeCurrentM3u() { - qDebug("writting to current m3u"); + qDebug("writing to current m3u"); Config cfg( "OpiePlayer" ); cfg.setGroup("PlayList"); @@ -863,5 +854,5 @@ void PlayListWidget::writeCurrentM3u() { } while ( d->selectedFiles->next() ); - // qDebug( list ); +// qDebug( list ); m3uList->write(); m3uList->close(); @@ -881,5 +872,5 @@ void PlayListWidget::writem3u() { if( fileDlg->result() == 1 ) { name = fileDlg->text(); - qDebug( filename ); +// qDebug( filename ); if( name.left( 1) != "/" ) { |