Fix Finder reveal in preview and torrent contents

This commit is contained in:
vit9696 2017-12-17 02:16:36 +03:00
parent d7fa5b6b6b
commit ed154d35ba
2 changed files with 12 additions and 0 deletions

View file

@ -65,6 +65,10 @@
#include "ui_propertieswidget.h"
#ifdef Q_OS_MAC
#include "macutilities.h"
#endif
PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow *mainWindow, TransferListWidget *transferList)
: QWidget(parent)
, m_ui(new Ui::PropertiesWidget())
@ -574,10 +578,14 @@ void PropertiesWidget::openFolder(const QModelIndex &index, bool containingFolde
// Flush data
m_torrent->flushCache();
#ifdef Q_OS_MAC
MacUtils::openFiles(QSet<QString>{absolutePath});
#else
if (containingFolder)
Utils::Misc::openFolderSelect(absolutePath);
else
Utils::Misc::openPath(absolutePath);
#endif
}
void PropertiesWidget::displayFilesListMenu(const QPoint &)

View file

@ -362,10 +362,14 @@ void TransferListWidget::torrentDoubleClicked()
torrent->pause();
break;
case OPEN_DEST:
#ifdef Q_OS_MAC
MacUtils::openFiles(QSet<QString>{torrent->contentPath(true)});
#else
if (torrent->filesCount() == 1)
Utils::Misc::openFolderSelect(torrent->contentPath(true));
else
Utils::Misc::openPath(torrent->contentPath(true));
#endif
break;
}
}