Skip to content

Commit

Permalink
Rename "Show in file manager" to "Open download directory"
Browse files Browse the repository at this point in the history
  • Loading branch information
equeim committed Nov 27, 2023
1 parent e91d01a commit 04fa479
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Changed
- "Open" and "Show in file manager" actions now show error dialog if file/directory does not exist,
instead if being inaccessible
- "Show in file manager" actions has been renamed to "Open download directory"

## [2.5.0] - 2023-10-15
### Added
Expand Down
10 changes: 5 additions & 5 deletions src/ui/screens/mainwindow/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ namespace tremotesf {
QAction* mRenameTorrentAction{};

QAction* mOpenTorrentFilesAction{};
QAction* mShowInFileManagerAction{};
QAction* mOpenTorrentDownloadDirectoryAction{};

QAction* mHighPriorityAction{};
QAction* mNormalPriorityAction{};
Expand Down Expand Up @@ -539,13 +539,13 @@ namespace tremotesf {
);
QObject::connect(mOpenTorrentFilesAction, &QAction::triggered, this, &MainWindow::Impl::openTorrentsFiles);

mShowInFileManagerAction = mTorrentMenu->addAction(
mOpenTorrentDownloadDirectoryAction = mTorrentMenu->addAction(
QIcon::fromTheme("go-jump"_l1),
//: Torrent's context menu item
qApp->translate("tremotesf", "Show In &File Manager")
qApp->translate("tremotesf", "Open &Download Directory")
);
QObject::connect(
mShowInFileManagerAction,
mOpenTorrentDownloadDirectoryAction,
&QAction::triggered,
this,
&MainWindow::Impl::showTorrentsInFileManager
Expand Down Expand Up @@ -798,7 +798,7 @@ namespace tremotesf {
}
}
mOpenTorrentFilesAction->setEnabled(localOrMounted);
mShowInFileManagerAction->setEnabled(localOrMounted);
mOpenTorrentDownloadDirectoryAction->setEnabled(localOrMounted);
}

void showTorrentsPropertiesDialogs() {
Expand Down
8 changes: 4 additions & 4 deletions src/ui/widgets/torrentfilesview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ namespace tremotesf {
}
});

QAction* showInFileManagerAction = contextMenu.addAction(
QAction* openDownloadDirectoryAction = contextMenu.addAction(
QIcon::fromTheme("go-jump"_l1),
//: Context menu item
qApp->translate("tremotesf", "Show In &File Manager")
qApp->translate("tremotesf", "Open &Download Directory")
);
showInFileManagerAction->setEnabled(localOrMounted);
QObject::connect(showInFileManagerAction, &QAction::triggered, this, [sourceIndexes, this] {
openDownloadDirectoryAction->setEnabled(localOrMounted);
QObject::connect(openDownloadDirectoryAction, &QAction::triggered, this, [sourceIndexes, this] {
std::vector<QString> files{};
files.reserve(static_cast<size_t>(sourceIndexes.size()));
for (const QModelIndex& index : sourceIndexes) {
Expand Down

0 comments on commit 04fa479

Please sign in to comment.