aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui
diff options
context:
space:
mode:
authordada513 <dada513@protonmail.com>2022-06-11 19:45:51 +0200
committerGitHub <noreply@github.com>2022-06-11 19:45:51 +0200
commit2bd8e7dca4aa55c836cb0bf33dc8d4be84fc938c (patch)
tree5fdde4907cc6c7c01c0192e35755e4546475c994 /launcher/ui
parentd75571ffa183c703033881b95fff085d3107ca7b (diff)
parent81daffe68e5f91e94a9850ee98fc6ad45d911e5b (diff)
downloadPrismLauncher-2bd8e7dca4aa55c836cb0bf33dc8d4be84fc938c.tar.gz
PrismLauncher-2bd8e7dca4aa55c836cb0bf33dc8d4be84fc938c.tar.bz2
PrismLauncher-2bd8e7dca4aa55c836cb0bf33dc8d4be84fc938c.zip
Merge pull request #780 from flowln/guo_ext_2
Diffstat (limited to 'launcher/ui')
-rw-r--r--launcher/ui/pages/modplatform/ImportPage.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/launcher/ui/pages/modplatform/ImportPage.cpp b/launcher/ui/pages/modplatform/ImportPage.cpp
index b3ed1b73..0b8577b1 100644
--- a/launcher/ui/pages/modplatform/ImportPage.cpp
+++ b/launcher/ui/pages/modplatform/ImportPage.cpp
@@ -110,11 +110,13 @@ void ImportPage::updateState()
{
// FIXME: actually do some validation of what's inside here... this is fake AF
QFileInfo fi(input);
- // mrpack is a modrinth pack
// Allow non-latin people to use ZIP files!
- auto zip = QMimeDatabase().mimeTypeForUrl(url).suffixes().contains("zip");
- if(fi.exists() && (zip || fi.suffix() == "mrpack"))
+ bool isZip = QMimeDatabase().mimeTypeForUrl(url).suffixes().contains("zip");
+ // mrpack is a modrinth pack
+ bool isMRPack = fi.suffix() == "mrpack";
+
+ if(fi.exists() && (isZip || isMRPack))
{
QFileInfo fi(url.fileName());
dialog->setSuggestedPack(fi.completeBaseName(), new InstanceImportTask(url,this));
@@ -149,7 +151,8 @@ void ImportPage::setUrl(const QString& url)
void ImportPage::on_modpackBtn_clicked()
{
auto filter = QMimeDatabase().mimeTypeForName("application/zip").filterString();
- filter += ";;" + tr("Modrinth pack (*.mrpack)");
+ //: Option for filtering for *.mrpack files when importing
+ filter += ";;" + tr("Modrinth pack") + " (*.mrpack)";
const QUrl url = QFileDialog::getOpenFileUrl(this, tr("Choose modpack"), modpackUrl(), filter);
if (url.isValid())
{