Browse Source

Fix Finder reveal in preview and torrent contents

adaptive-webui-19844
vit9696 7 years ago
parent
commit
ed154d35ba
  1. 8
      src/gui/properties/propertieswidget.cpp
  2. 4
      src/gui/transferlistwidget.cpp

8
src/gui/properties/propertieswidget.cpp

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

4
src/gui/transferlistwidget.cpp

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

Loading…
Cancel
Save