From 04fa47911d20e59ced9a28dbcb30ee2aa6df9862 Mon Sep 17 00:00:00 2001 From: Alexey Rochev Date: Sun, 26 Nov 2023 21:49:08 +0300 Subject: [PATCH] Rename "Show in file manager" to "Open download directory" --- CHANGELOG.md | 1 + src/ui/screens/mainwindow/mainwindow.cpp | 10 +++++----- src/ui/widgets/torrentfilesview.cpp | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11a6f4f2..25e91fe8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/ui/screens/mainwindow/mainwindow.cpp b/src/ui/screens/mainwindow/mainwindow.cpp index 8cc4153c..19318cab 100644 --- a/src/ui/screens/mainwindow/mainwindow.cpp +++ b/src/ui/screens/mainwindow/mainwindow.cpp @@ -344,7 +344,7 @@ namespace tremotesf { QAction* mRenameTorrentAction{}; QAction* mOpenTorrentFilesAction{}; - QAction* mShowInFileManagerAction{}; + QAction* mOpenTorrentDownloadDirectoryAction{}; QAction* mHighPriorityAction{}; QAction* mNormalPriorityAction{}; @@ -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 @@ -798,7 +798,7 @@ namespace tremotesf { } } mOpenTorrentFilesAction->setEnabled(localOrMounted); - mShowInFileManagerAction->setEnabled(localOrMounted); + mOpenTorrentDownloadDirectoryAction->setEnabled(localOrMounted); } void showTorrentsPropertiesDialogs() { diff --git a/src/ui/widgets/torrentfilesview.cpp b/src/ui/widgets/torrentfilesview.cpp index f1eea854..46d9d731 100644 --- a/src/ui/widgets/torrentfilesview.cpp +++ b/src/ui/widgets/torrentfilesview.cpp @@ -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 files{}; files.reserve(static_cast(sourceIndexes.size())); for (const QModelIndex& index : sourceIndexes) {