summary refs log tree commit diff
diff options
context:
space:
mode:
authorSateallia <mail@satealliasdomain.net>2023-04-25 17:50:00 +0000
committerNicolas Werner <nicolas.werner@hotmail.de>2023-04-25 22:44:53 +0200
commitb0e4841cafee1d464a74b1c451f8c86d66115467 (patch)
tree6128463822a71dc56d2c274f5c550097b7637678
parentMerge pull request #1446 from LuckyTurtleDev/patch-1 (diff)
downloadnheko-b0e4841cafee1d464a74b1c451f8c86d66115467.tar.xz
Allow picking multiple files to upload
-rw-r--r--resources/langs/nheko_en.ts4
-rw-r--r--src/timeline/InputBar.cpp9
2 files changed, 7 insertions, 6 deletions
diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts

index d0197fea..52f57a0c 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts
@@ -1395,8 +1395,8 @@ You may optionally provide a reason for others to accept your knock:</translatio <name>InputBar</name> <message> <location filename="../../src/timeline/InputBar.cpp" line="+372"/> - <source>Select a file</source> - <translation>Select a file</translation> + <source>Select file(s)</source> + <translation>Select file(s)</translation> </message> <message> <location line="+0"/> diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index 3a626a3c..dd6813c2 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp
@@ -417,13 +417,14 @@ void InputBar::openFileSelection() { const QString homeFolder = QStandardPaths::writableLocation(QStandardPaths::HomeLocation); - const auto fileName = - QFileDialog::getOpenFileName(nullptr, tr("Select a file"), homeFolder, tr("All Files (*)")); + const QStringList fileNames = + QFileDialog::getOpenFileNames(nullptr, tr("Select file(s)"), homeFolder, tr("All Files (*)")); - if (fileName.isEmpty()) + if (fileNames.isEmpty()) return; - startUploadFromPath(fileName); + for (const auto &fileName : fileNames) + startUploadFromPath(fileName); } QString