author | zecke <zecke> | 2004-06-29 20:04:17 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-06-29 20:04:17 (UTC) |
commit | c4405f8d22769e9881484d3f7640e4ba87ed75ee (patch) (unidiff) | |
tree | af997b01742c9b7762babca007edf1310c455289 | |
parent | 8bd9d5e9416166a1bb9a3f455ebf73a14628c628 (diff) | |
download | opie-c4405f8d22769e9881484d3f7640e4ba87ed75ee.zip opie-c4405f8d22769e9881484d3f7640e4ba87ed75ee.tar.gz opie-c4405f8d22769e9881484d3f7640e4ba87ed75ee.tar.bz2 |
As pointed out by bradc OpiePlayer2 is not able to open desktop files.
Now we check if it is a valid desktop file and then ask for the DocLnk::file()
and then use that for open.
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 6a15134..36f77be 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -322,19 +322,25 @@ void PlayListWidget::addAllVideoToList() { | |||
322 | d->selectedFiles->addToSelection( lnk); | 322 | d->selectedFiles->addToSelection( lnk); |
323 | } | 323 | } |
324 | tabWidget->setCurrentPage(0); | 324 | tabWidget->setCurrentPage(0); |
325 | writeCurrentM3u(); | 325 | writeCurrentM3u(); |
326 | d->selectedFiles->first(); | 326 | d->selectedFiles->first(); |
327 | } | 327 | } |
328 | 328 | ||
329 | 329 | ||
330 | void PlayListWidget::setDocument( const QString& fileref ) { | 330 | void PlayListWidget::setDocument( const QString& _fileref ) { |
331 | // odebug << "<<<<<<<<set document>>>>>>>>>> "+fileref << oendl; | 331 | // odebug << "<<<<<<<<set document>>>>>>>>>> "+fileref << oendl; |
332 | QString fileref = _fileref; | ||
332 | fromSetDocument = TRUE; | 333 | fromSetDocument = TRUE; |
334 | |||
335 | DocLnk lnk(_fileref); | ||
336 | if(lnk.isValid()) | ||
337 | fileref = lnk.file(); | ||
338 | |||
333 | QFileInfo fileInfo(fileref); | 339 | QFileInfo fileInfo(fileref); |
334 | 340 | ||
335 | if ( !fileInfo.exists() ) { | 341 | if ( !fileInfo.exists() ) { |
336 | QMessageBox::warning( this, tr( "Invalid File" ), | 342 | QMessageBox::warning( this, tr( "Invalid File" ), |
337 | tr( "There was a problem in getting the file." ) ); | 343 | tr( "There was a problem in getting the file." ) ); |
338 | return; | 344 | return; |
339 | } | 345 | } |
340 | 346 | ||