mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-05 01:25:39 -05:00
enabled file preview again for non windows users, using a direct call to the file in partials
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4139 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1dfa0c4155
commit
f841ffcf13
@ -514,7 +514,7 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
||||
if (addOpenFileOption)
|
||||
contextMnu.addAction( openfileAct);
|
||||
|
||||
#ifndef RS_RELEASE_VERSION
|
||||
#ifndef WIN32
|
||||
contextMnu.addAction( previewfileAct);
|
||||
#endif
|
||||
contextMnu.addAction( openfolderAct);
|
||||
@ -1376,6 +1376,10 @@ void TransfersDialog::previewTransfer()
|
||||
path = rsFiles->getPartialsDirectory() + "/" + info.hash;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
if (!QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromUtf8(path.c_str()))))
|
||||
QMessageBox::warning(this, tr("File preview"), tr("File %1 preview failed.").arg(QString::fromUtf8(path.c_str())));
|
||||
#else
|
||||
/* open or preview them with a suitable application */
|
||||
QFileInfo qinfo;
|
||||
if (complete) {
|
||||
@ -1406,6 +1410,7 @@ void TransfersDialog::previewTransfer()
|
||||
std::cerr << "previewTransfer(): can't create link for file " << path << std::endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void TransfersDialog::openTransfer()
|
||||
|
Loading…
x
Reference in New Issue
Block a user