author | harlekin <harlekin> | 2002-08-19 21:11:10 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-19 21:11:10 (UTC) |
commit | 0d336f310b310ba18af70185eed58be6e07c26d8 (patch) (unidiff) | |
tree | 4084cce27741e5e3ae1bc309d539b7db2ecc8e99 /noncore/multimedia/opieplayer2/playlistwidget.cpp | |
parent | 7f1a7e9b3272f7848423583ea5fc04eb67d97f14 (diff) | |
download | opie-0d336f310b310ba18af70185eed58be6e07c26d8.zip opie-0d336f310b310ba18af70185eed58be6e07c26d8.tar.gz opie-0d336f310b310ba18af70185eed58be6e07c26d8.tar.bz2 |
fixes
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 10f1792..251c2e5 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -580,25 +580,25 @@ bool PlayListWidget::last() { | |||
580 | } | 580 | } |
581 | 581 | ||
582 | 582 | ||
583 | void PlayListWidget::saveList() { | 583 | void PlayListWidget::saveList() { |
584 | 584 | ||
585 | QString filename; | 585 | QString filename; |
586 | InputDialog *fileDlg = 0l; | 586 | InputDialog *fileDlg = 0l; |
587 | fileDlg = new InputDialog(this,tr("Save Playlist"),TRUE, 0); | 587 | fileDlg = new InputDialog(this,tr("Save Playlist"),TRUE, 0); |
588 | fileDlg->exec(); | 588 | fileDlg->exec(); |
589 | if( fileDlg->result() == 1 ) { | 589 | if( fileDlg->result() == 1 ) { |
590 | if ( d->current ) | 590 | if ( d->current ) |
591 | delete d->current; | 591 | delete d->current; |
592 | filename = fileDlg->LineEdit1->text();//+".playlist"; | 592 | filename = fileDlg->text();//+".playlist"; |
593 | // qDebug("saving playlist "+filename+".playlist"); | 593 | // qDebug("saving playlist "+filename+".playlist"); |
594 | Config cfg( filename +".playlist"); | 594 | Config cfg( filename +".playlist"); |
595 | writeConfig( cfg ); | 595 | writeConfig( cfg ); |
596 | 596 | ||
597 | DocLnk lnk; | 597 | DocLnk lnk; |
598 | lnk.setFile(QDir::homeDirPath()+"/Settings/"+filename+".playlist.conf"); //sets File property | 598 | lnk.setFile(QDir::homeDirPath()+"/Settings/"+filename+".playlist.conf"); //sets File property |
599 | lnk.setType("playlist/plain");// hey is this a REGISTERED mime type?!?!? ;D | 599 | lnk.setType("playlist/plain");// hey is this a REGISTERED mime type?!?!? ;D |
600 | lnk.setIcon("opieplayer2/playlist2"); | 600 | lnk.setIcon("opieplayer2/playlist2"); |
601 | lnk.setName( filename); //sets file name | 601 | lnk.setName( filename); //sets file name |
602 | // qDebug(filename); | 602 | // qDebug(filename); |
603 | if(!lnk.writeLink()) { | 603 | if(!lnk.writeLink()) { |
604 | qDebug("Writing doclink did not work"); | 604 | qDebug("Writing doclink did not work"); |
@@ -939,25 +939,25 @@ void PlayListWidget::populateVideoView() { | |||
939 | QString::number( QFile( Vdit.current()->file()).size() ), storage); | 939 | QString::number( QFile( Vdit.current()->file()).size() ), storage); |
940 | newItem->setPixmap(0, Resource::loadPixmap( "opieplayer2/videofile" )); | 940 | newItem->setPixmap(0, Resource::loadPixmap( "opieplayer2/videofile" )); |
941 | } | 941 | } |
942 | } | 942 | } |
943 | } | 943 | } |
944 | 944 | ||
945 | void PlayListWidget::openFile() { | 945 | void PlayListWidget::openFile() { |
946 | QString filename, name; | 946 | QString filename, name; |
947 | InputDialog *fileDlg; | 947 | InputDialog *fileDlg; |
948 | fileDlg = new InputDialog(this,tr("Open file or URL"),TRUE, 0); | 948 | fileDlg = new InputDialog(this,tr("Open file or URL"),TRUE, 0); |
949 | fileDlg->exec(); | 949 | fileDlg->exec(); |
950 | if( fileDlg->result() == 1 ) { | 950 | if( fileDlg->result() == 1 ) { |
951 | filename = fileDlg->LineEdit1->text(); | 951 | filename = fileDlg->text(); |
952 | 952 | ||
953 | qDebug("Selected filename is "+filename); | 953 | qDebug("Selected filename is "+filename); |
954 | if(filename.right(3) == "m3u") { | 954 | if(filename.right(3) == "m3u") { |
955 | readm3u( filename ); | 955 | readm3u( filename ); |
956 | } else if(filename.right(3) == "pls") { | 956 | } else if(filename.right(3) == "pls") { |
957 | readPls( filename ); | 957 | readPls( filename ); |
958 | } else { | 958 | } else { |
959 | DocLnk lnk; | 959 | DocLnk lnk; |
960 | 960 | ||
961 | lnk.setName(filename); //sets file name | 961 | lnk.setName(filename); //sets file name |
962 | lnk.setFile(filename); //sets File property | 962 | lnk.setFile(filename); //sets File property |
963 | lnk.setType("audio/x-mpegurl"); | 963 | lnk.setType("audio/x-mpegurl"); |
@@ -1114,25 +1114,25 @@ void PlayListWidget::readm3u(const QString &filename) { | |||
1114 | } | 1114 | } |
1115 | } | 1115 | } |
1116 | f.close(); | 1116 | f.close(); |
1117 | } | 1117 | } |
1118 | 1118 | ||
1119 | void PlayListWidget::writem3u() { | 1119 | void PlayListWidget::writem3u() { |
1120 | 1120 | ||
1121 | InputDialog *fileDlg; | 1121 | InputDialog *fileDlg; |
1122 | fileDlg = new InputDialog(this,tr("Save m3u Playlist "),TRUE, 0); | 1122 | fileDlg = new InputDialog(this,tr("Save m3u Playlist "),TRUE, 0); |
1123 | fileDlg->exec(); | 1123 | fileDlg->exec(); |
1124 | QString filename,list; | 1124 | QString filename,list; |
1125 | if( fileDlg->result() == 1 ) { | 1125 | if( fileDlg->result() == 1 ) { |
1126 | filename = fileDlg->LineEdit1->text(); | 1126 | filename = fileDlg->text(); |
1127 | qDebug(filename); | 1127 | qDebug(filename); |
1128 | int noOfFiles = 0; | 1128 | int noOfFiles = 0; |
1129 | d->selectedFiles->first(); | 1129 | d->selectedFiles->first(); |
1130 | do { | 1130 | do { |
1131 | // we dont check for existance because of url's | 1131 | // we dont check for existance because of url's |
1132 | // qDebug(d->selectedFiles->current()->file()); | 1132 | // qDebug(d->selectedFiles->current()->file()); |
1133 | list += d->selectedFiles->current()->file()+"\n"; | 1133 | list += d->selectedFiles->current()->file()+"\n"; |
1134 | noOfFiles++; | 1134 | noOfFiles++; |
1135 | } | 1135 | } |
1136 | while ( d->selectedFiles->next() ); | 1136 | while ( d->selectedFiles->next() ); |
1137 | qDebug(list); | 1137 | qDebug(list); |
1138 | if(filename.left(1) != "/") | 1138 | if(filename.left(1) != "/") |