author | harlekin <harlekin> | 2002-07-31 23:56:39 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-31 23:56:39 (UTC) |
commit | b2978cf32ae5e6954fb118c89c1f70ee05d53ef4 (patch) (side-by-side diff) | |
tree | c9a90786a9676014cc1abba61bc0828cf61beb67 | |
parent | 3a4d367a8e5e9f599e0487326c105de9aa773bfe (diff) | |
download | opie-b2978cf32ae5e6954fb118c89c1f70ee05d53ef4.zip opie-b2978cf32ae5e6954fb118c89c1f70ee05d53ef4.tar.gz opie-b2978cf32ae5e6954fb118c89c1f70ee05d53ef4.tar.bz2 |
fix
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 9373f6b..cd53748 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -910,102 +910,97 @@ void PlayListWidget::populateAudioView() { } } void PlayListWidget::populateVideoView() { videoView->clear(); StorageInfo storageInfo; const QList<FileSystem> &fs = storageInfo.fileSystems(); if(!videoScan ) scanForVideo(); QListIterator<DocLnk> Vdit( vFiles.children() ); QListIterator<FileSystem> it ( fs ); videoView->clear(); QString storage; for ( ; Vdit.current(); ++Vdit ) { for( ; it.current(); ++it ){ const QString name = (*it)->name(); const QString path = (*it)->path(); if( Vdit.current()->file().find(path) != -1 ) storage=name; } QListViewItem * newItem; if ( QFile( Vdit.current()->file()).exists() ) { newItem= /*(void)*/ new QListViewItem( videoView, Vdit.current()->name(), QString::number( QFile( Vdit.current()->file()).size() ), storage); newItem->setPixmap(0, Resource::loadPixmap( "opieplayer/videofile" )); } } } void PlayListWidget::openFile() { QString filename, name; InputDialog *fileDlg; fileDlg = new InputDialog(this,tr("Open file or URL"),TRUE, 0); fileDlg->exec(); if( fileDlg->result() == 1 ) { filename = fileDlg->LineEdit1->text(); qDebug("Selected filename is "+filename); if(filename.right(3) == "m3u") { readm3u( filename ); } else if(filename.right(3) == "pls") { readPls( filename ); } else { DocLnk lnk; lnk.setName(filename); //sets file name - // probably not needed anymore either - if(filename.right(1) != "/" && filename.right(3) != "mp3" && filename.right(3) != "MP3") { - filename += "/"; - } lnk.setFile(filename); //sets File property - lnk.setType("audio/x-mpegurl"); lnk.setExec("opieplayer"); lnk.setIcon("opieplayer/MPEGPlayer"); if(!lnk.writeLink()) { qDebug("Writing doclink did not work"); } d->selectedFiles->addToSelection( lnk); } } if(fileDlg) { delete fileDlg; } } void PlayListWidget::keyReleaseEvent( QKeyEvent *e) { switch ( e->key() ) { ////////////////////////////// Zaurus keys case Key_F9: //activity // if(audioUI->isHidden()) // audioUI->showMaximized(); break; case Key_F10: //contacts // if( videoUI->isHidden()) // videoUI->showMaximized(); break; case Key_F11: //menu break; case Key_F12: //home // doBlank(); break; case Key_F13: //mail // doUnblank(); break; case Key_Q: //add to playlist qDebug("Add"); addSelected(); break; case Key_R: //remove from playlist removeSelected(); break; // case Key_P: //play // qDebug("Play"); // playSelected(); // break; case Key_Space: qDebug("Play"); |