aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/pages')
-rw-r--r--launcher/ui/pages/global/AccountListPage.cpp2
-rw-r--r--launcher/ui/pages/global/LauncherPage.cpp2
-rw-r--r--launcher/ui/pages/instance/LogPage.cpp6
-rw-r--r--launcher/ui/pages/modplatform/ImportPage.ui2
-rw-r--r--launcher/ui/pages/modplatform/ModModel.cpp2
-rw-r--r--launcher/ui/pages/modplatform/ModPage.cpp4
-rw-r--r--launcher/ui/pages/modplatform/ModPage.h1
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.cpp5
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.h1
-rw-r--r--launcher/ui/pages/modplatform/flame/FlamePage.ui2
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp2
11 files changed, 19 insertions, 10 deletions
diff --git a/launcher/ui/pages/global/AccountListPage.cpp b/launcher/ui/pages/global/AccountListPage.cpp
index a4f4dfb9..278f45c4 100644
--- a/launcher/ui/pages/global/AccountListPage.cpp
+++ b/launcher/ui/pages/global/AccountListPage.cpp
@@ -167,7 +167,7 @@ void AccountListPage::on_actionAddMicrosoft_triggered()
tr(
"Microsoft accounts are only usable on macOS 10.13 or newer, with fully updated %1.\n\n"
"Please update both your operating system and %1."
- ).arg(BuildConfig.LAUNCHER_NAME),
+ ).arg(BuildConfig.LAUNCHER_DISPLAYNAME),
QMessageBox::Warning
)->exec();
return;
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp
index 73ef0024..1e5df5b2 100644
--- a/launcher/ui/pages/global/LauncherPage.cpp
+++ b/launcher/ui/pages/global/LauncherPage.cpp
@@ -151,7 +151,7 @@ void LauncherPage::on_instDirBrowseBtn_clicked()
"This is known to cause problems. "
"After a restart the launcher might break, "
"because it will no longer have access to that directory.\n\n"
- "Granting PolyMC access to it via Flatseal is recommended."));
+ "Granting %1 access to it via Flatseal is recommended.").arg(BuildConfig.LAUNCHER_DISPLAYNAME));
warning.setInformativeText(
tr("Do you want to proceed anyway?"));
warning.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
diff --git a/launcher/ui/pages/instance/LogPage.cpp b/launcher/ui/pages/instance/LogPage.cpp
index 3d9fb025..31c3e925 100644
--- a/launcher/ui/pages/instance/LogPage.cpp
+++ b/launcher/ui/pages/instance/LogPage.cpp
@@ -279,7 +279,7 @@ void LogPage::on_btnPaste_clicked()
MessageLevel::Launcher,
QString("%2: Log upload triggered at: %1").arg(
QDateTime::currentDateTime().toString(Qt::RFC2822Date),
- BuildConfig.LAUNCHER_NAME
+ BuildConfig.LAUNCHER_DISPLAYNAME
)
);
auto url = GuiUtil::uploadPaste(m_model->toPlainText(), this);
@@ -289,7 +289,7 @@ void LogPage::on_btnPaste_clicked()
MessageLevel::Launcher,
QString("%2: Log uploaded to: %1").arg(
url,
- BuildConfig.LAUNCHER_NAME
+ BuildConfig.LAUNCHER_DISPLAYNAME
)
);
}
@@ -297,7 +297,7 @@ void LogPage::on_btnPaste_clicked()
{
m_model->append(
MessageLevel::Error,
- QString("%1: Log upload failed!").arg(BuildConfig.LAUNCHER_NAME)
+ QString("%1: Log upload failed!").arg(BuildConfig.LAUNCHER_DISPLAYNAME)
);
}
}
diff --git a/launcher/ui/pages/modplatform/ImportPage.ui b/launcher/ui/pages/modplatform/ImportPage.ui
index 0a50e871..3583cf90 100644
--- a/launcher/ui/pages/modplatform/ImportPage.ui
+++ b/launcher/ui/pages/modplatform/ImportPage.ui
@@ -60,7 +60,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
- <string>- PolyMC / MultiMC exported instances (ZIP)</string>
+ <string>- Prism Launcher, PolyMC or MultiMC exported instances (ZIP)</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
diff --git a/launcher/ui/pages/modplatform/ModModel.cpp b/launcher/ui/pages/modplatform/ModModel.cpp
index 8961fadd..49766fa6 100644
--- a/launcher/ui/pages/modplatform/ModModel.cpp
+++ b/launcher/ui/pages/modplatform/ModModel.cpp
@@ -265,7 +265,7 @@ void ListModel::searchRequestFailed(QString reason)
//: %1 refers to the launcher itself
QString("%1 %2")
.arg(m_parent->displayName())
- .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_NAME)));
+ .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_DISPLAYNAME)));
}
jobPtr.reset();
diff --git a/launcher/ui/pages/modplatform/ModPage.cpp b/launcher/ui/pages/modplatform/ModPage.cpp
index 4fce0242..2af9a10a 100644
--- a/launcher/ui/pages/modplatform/ModPage.cpp
+++ b/launcher/ui/pages/modplatform/ModPage.cpp
@@ -265,7 +265,9 @@ void ModPage::updateModVersions(int prev_count)
break;
}
}
- if(valid || m_filter->versions.size() == 0)
+
+ // Only add the version if it's valid or using the 'Any' filter, but never if the version is opted out
+ if ((valid || m_filter->versions.empty()) && !optedOut(version))
ui->versionSelectionBox->addItem(version.version, QVariant(i));
}
if (ui->versionSelectionBox->count() == 0 && prev_count != 0) {
diff --git a/launcher/ui/pages/modplatform/ModPage.h b/launcher/ui/pages/modplatform/ModPage.h
index 3f31651c..ae3d7e77 100644
--- a/launcher/ui/pages/modplatform/ModPage.h
+++ b/launcher/ui/pages/modplatform/ModPage.h
@@ -51,6 +51,7 @@ class ModPage : public QWidget, public BasePage {
auto shouldDisplay() const -> bool override = 0;
virtual auto validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, ModAPI::ModLoaderTypes loaders = ModAPI::Unspecified) const -> bool = 0;
+ virtual bool optedOut(ModPlatform::IndexedVersion& ver) const { return false; };
auto apiProvider() -> ModAPI* { return api.get(); };
auto getFilter() const -> const std::shared_ptr<ModFilterWidget::Filter> { return m_filter; }
diff --git a/launcher/ui/pages/modplatform/flame/FlameModPage.cpp b/launcher/ui/pages/modplatform/flame/FlameModPage.cpp
index 772fd2e0..54a7be04 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModPage.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlameModPage.cpp
@@ -67,6 +67,11 @@ auto FlameModPage::validateVersion(ModPlatform::IndexedVersion& ver, QString min
return ver.mcVersion.contains(mineVer) && !ver.downloadUrl.isEmpty();
}
+bool FlameModPage::optedOut(ModPlatform::IndexedVersion& ver) const
+{
+ return ver.downloadUrl.isEmpty();
+}
+
// I don't know why, but doing this on the parent class makes it so that
// other mod providers start loading before being selected, at least with
// my Qt, so we need to implement this in every derived class...
diff --git a/launcher/ui/pages/modplatform/flame/FlameModPage.h b/launcher/ui/pages/modplatform/flame/FlameModPage.h
index 2cd484cb..50dedd6f 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModPage.h
+++ b/launcher/ui/pages/modplatform/flame/FlameModPage.h
@@ -61,6 +61,7 @@ class FlameModPage : public ModPage {
inline auto metaEntryBase() const -> QString override { return "FlameMods"; };
auto validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, ModAPI::ModLoaderTypes loaders = ModAPI::Unspecified) const -> bool override;
+ bool optedOut(ModPlatform::IndexedVersion& ver) const override;
auto shouldDisplay() const -> bool override;
};
diff --git a/launcher/ui/pages/modplatform/flame/FlamePage.ui b/launcher/ui/pages/modplatform/flame/FlamePage.ui
index aab16421..1a3d0225 100644
--- a/launcher/ui/pages/modplatform/flame/FlamePage.ui
+++ b/launcher/ui/pages/modplatform/flame/FlamePage.ui
@@ -19,7 +19,7 @@
</font>
</property>
<property name="text">
- <string>Note: CurseForge allows creators to block access to third-party tools like PolyMC. As such, you may need to manually download some mods to be able to install a modpack.</string>
+ <string>Note: CurseForge allows creators to block access to third-party tools like Prism Launcher. As such, you may need to manually download some mods to be able to install a modpack.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
index fd7a3537..43fda9de 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
@@ -321,7 +321,7 @@ void ModpackListModel::searchRequestFailed(QString reason)
//: %1 refers to the launcher itself
QString("%1 %2")
.arg(m_parent->displayName())
- .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_NAME)));
+ .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_DISPLAYNAME)));
}
jobPtr.reset();