-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 20adf17..4c4a921 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -412,66 +412,66 @@ void PlayListWidget::saveList() { | |||
412 | InputDialog *fileDlg = 0l; | 412 | InputDialog *fileDlg = 0l; |
413 | fileDlg = new InputDialog(this,tr("Save Playlist"),TRUE, 0); | 413 | fileDlg = new InputDialog(this,tr("Save Playlist"),TRUE, 0); |
414 | fileDlg->exec(); | 414 | fileDlg->exec(); |
415 | if( fileDlg->result() == 1 ) { | 415 | if( fileDlg->result() == 1 ) { |
416 | if ( d->current ) | 416 | if ( d->current ) |
417 | delete d->current; | 417 | delete d->current; |
418 | filename = fileDlg->text();//+".playlist"; | 418 | filename = fileDlg->text();//+".playlist"; |
419 | // qDebug("saving playlist "+filename+".playlist"); | 419 | // qDebug("saving playlist "+filename+".playlist"); |
420 | Config cfg( filename +".playlist"); | 420 | Config cfg( filename +".playlist"); |
421 | writeConfig( cfg ); | 421 | writeConfig( cfg ); |
422 | 422 | ||
423 | DocLnk lnk; | 423 | DocLnk lnk; |
424 | lnk.setFile(QDir::homeDirPath()+"/Settings/"+filename+".playlist.conf"); //sets File property | 424 | lnk.setFile(QDir::homeDirPath()+"/Settings/"+filename+".playlist.conf"); //sets File property |
425 | lnk.setType("playlist/plain");// hey is this a REGISTERED mime type?!?!? ;D | 425 | lnk.setType("playlist/plain");// hey is this a REGISTERED mime type?!?!? ;D |
426 | lnk.setIcon("opieplayer2/playlist2"); | 426 | lnk.setIcon("opieplayer2/playlist2"); |
427 | lnk.setName( filename); //sets file name | 427 | lnk.setName( filename); //sets file name |
428 | // qDebug(filename); | 428 | // qDebug(filename); |
429 | if(!lnk.writeLink()) { | 429 | if(!lnk.writeLink()) { |
430 | qDebug("Writing doclink did not work"); | 430 | qDebug("Writing doclink did not work"); |
431 | } | 431 | } |
432 | } | 432 | } |
433 | Config config( "OpiePlayer" ); | 433 | Config config( "OpiePlayer" ); |
434 | config.writeEntry("CurrentPlaylist",filename); | 434 | config.writeEntry("CurrentPlaylist",filename); |
435 | setCaption(tr("OpiePlayer: ")+filename); | 435 | setCaption(tr("OpiePlayer: ")+filename); |
436 | d->selectedFiles->first(); | 436 | d->selectedFiles->first(); |
437 | if(fileDlg) { | 437 | if(fileDlg) { |
438 | delete fileDlg; | 438 | delete fileDlg; |
439 | } | 439 | } |
440 | } | 440 | } |
441 | 441 | ||
442 | void PlayListWidget::loadList( const DocLnk & lnk) { | 442 | void PlayListWidget::loadList( const DocLnk & lnk) { |
443 | QString name= lnk.name(); | 443 | QString name= lnk.name(); |
444 | // qDebug("currentList is "+name); | 444 | // qDebug("currentList is "+name); |
445 | if( name.length()>1) { | 445 | if( name.length()>0) { |
446 | setCaption("OpiePlayer: "+name); | 446 | setCaption("OpiePlayer: "+name); |
447 | // qDebug("load list "+ name+".playlist"); | 447 | // qDebug("load list "+ name+".playlist"); |
448 | clearList(); | 448 | clearList(); |
449 | Config cfg( name+".playlist"); | 449 | Config cfg( name+".playlist"); |
450 | readConfig(cfg); | 450 | readConfig(cfg); |
451 | 451 | ||
452 | tabWidget->setCurrentPage(0); | 452 | tabWidget->setCurrentPage(0); |
453 | 453 | ||
454 | Config config( "OpiePlayer" ); | 454 | Config config( "OpiePlayer" ); |
455 | config.writeEntry("CurrentPlaylist", name); | 455 | config.writeEntry("CurrentPlaylist", name); |
456 | // d->selectedFiles->first(); | 456 | // d->selectedFiles->first(); |
457 | } | 457 | } |
458 | } | 458 | } |
459 | 459 | ||
460 | 460 | ||
461 | void PlayListWidget::setPlaylist( bool shown ) { | 461 | void PlayListWidget::setPlaylist( bool shown ) { |
462 | if ( shown ) { | 462 | if ( shown ) { |
463 | d->playListFrame->show(); | 463 | d->playListFrame->show(); |
464 | } else { | 464 | } else { |
465 | d->playListFrame->hide(); | 465 | d->playListFrame->hide(); |
466 | } | 466 | } |
467 | } | 467 | } |
468 | 468 | ||
469 | 469 | ||
470 | void PlayListWidget::addSelected() { | 470 | void PlayListWidget::addSelected() { |
471 | 471 | ||
472 | Config cfg( "OpiePlayer" ); | 472 | Config cfg( "OpiePlayer" ); |
473 | cfg.setGroup("PlayList"); | 473 | cfg.setGroup("PlayList"); |
474 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); | 474 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); |
475 | // int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); | 475 | // int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); |
476 | 476 | ||
477 | switch (whichList()) { | 477 | switch (whichList()) { |