aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui')
-rw-r--r--launcher/ui/GuiUtil.cpp40
-rw-r--r--launcher/ui/pages/global/APIPage.cpp93
-rw-r--r--launcher/ui/pages/global/APIPage.h5
-rw-r--r--launcher/ui/pages/global/APIPage.ui128
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp37
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h6
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp18
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlPage.h3
-rw-r--r--launcher/ui/setupwizard/PasteWizardPage.cpp42
-rw-r--r--launcher/ui/setupwizard/PasteWizardPage.h27
-rw-r--r--launcher/ui/setupwizard/PasteWizardPage.ui80
11 files changed, 407 insertions, 72 deletions
diff --git a/launcher/ui/GuiUtil.cpp b/launcher/ui/GuiUtil.cpp
index 9eb658e2..320f1502 100644
--- a/launcher/ui/GuiUtil.cpp
+++ b/launcher/ui/GuiUtil.cpp
@@ -1,3 +1,38 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Lenny McLennington <lenny@sneed.church>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "GuiUtil.h"
#include <QClipboard>
@@ -16,8 +51,9 @@
QString GuiUtil::uploadPaste(const QString &text, QWidget *parentWidget)
{
ProgressDialog dialog(parentWidget);
- auto pasteUrlSetting = APPLICATION->settings()->get("PastebinURL").toString();
- std::unique_ptr<PasteUpload> paste(new PasteUpload(parentWidget, text, pasteUrlSetting));
+ auto pasteTypeSetting = static_cast<PasteUpload::PasteType>(APPLICATION->settings()->get("PastebinType").toInt());
+ auto pasteCustomAPIBaseSetting = APPLICATION->settings()->get("PastebinCustomAPIBase").toString();
+ std::unique_ptr<PasteUpload> paste(new PasteUpload(parentWidget, text, pasteCustomAPIBaseSetting, pasteTypeSetting));
dialog.execWithTask(paste.get());
if (!paste->wasSuccessful())
diff --git a/launcher/ui/pages/global/APIPage.cpp b/launcher/ui/pages/global/APIPage.cpp
index 8b806bcf..6ad243dd 100644
--- a/launcher/ui/pages/global/APIPage.cpp
+++ b/launcher/ui/pages/global/APIPage.cpp
@@ -3,6 +3,7 @@
* PolyMC - Minecraft Launcher
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
* Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org>
+ * Copyright (c) 2022 Lenny McLennington <lenny@sneed.church>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,16 +47,40 @@
#include "settings/SettingsObject.h"
#include "tools/BaseProfiler.h"
#include "Application.h"
+#include "net/PasteUpload.h"
APIPage::APIPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::APIPage)
{
+ // This is here so you can reorder the entries in the combobox without messing stuff up
+ int comboBoxEntries[] = {
+ PasteUpload::PasteType::Mclogs,
+ PasteUpload::PasteType::NullPointer,
+ PasteUpload::PasteType::PasteGG,
+ PasteUpload::PasteType::Hastebin
+ };
+
static QRegularExpression validUrlRegExp("https?://.+");
+
ui->setupUi(this);
- ui->urlChoices->setValidator(new QRegularExpressionValidator(validUrlRegExp, ui->urlChoices));
- ui->tabWidget->tabBar()->hide();\
+
+ for (auto pasteType : comboBoxEntries) {
+ ui->pasteTypeComboBox->addItem(PasteUpload::PasteTypes.at(pasteType).name, pasteType);
+ }
+
+ void (QComboBox::*currentIndexChangedSignal)(int) (&QComboBox::currentIndexChanged);
+ connect(ui->pasteTypeComboBox, currentIndexChangedSignal, this, &APIPage::updateBaseURLPlaceholder);
+ // This function needs to be called even when the ComboBox's index is still in its default state.
+ updateBaseURLPlaceholder(ui->pasteTypeComboBox->currentIndex());
+ ui->baseURLEntry->setValidator(new QRegularExpressionValidator(validUrlRegExp, ui->baseURLEntry));
+ ui->tabWidget->tabBar()->hide();
+
loadSettings();
+
+ resetBaseURLNote();
+ connect(ui->pasteTypeComboBox, currentIndexChangedSignal, this, &APIPage::updateBaseURLNote);
+ connect(ui->baseURLEntry, &QLineEdit::textEdited, this, &APIPage::resetBaseURLNote);
}
APIPage::~APIPage()
@@ -63,13 +88,52 @@ APIPage::~APIPage()
delete ui;
}
+void APIPage::resetBaseURLNote()
+{
+ ui->baseURLNote->hide();
+ baseURLPasteType = ui->pasteTypeComboBox->currentIndex();
+}
+
+void APIPage::updateBaseURLNote(int index)
+{
+ if (baseURLPasteType == index)
+ {
+ ui->baseURLNote->hide();
+ }
+ else if (!ui->baseURLEntry->text().isEmpty())
+ {
+ ui->baseURLNote->show();
+ }
+}
+
+void APIPage::updateBaseURLPlaceholder(int index)
+{
+ int pasteType = ui->pasteTypeComboBox->itemData(index).toInt();
+ QString pasteDefaultURL = PasteUpload::PasteTypes.at(pasteType).defaultBase;
+ ui->baseURLEntry->setPlaceholderText(pasteDefaultURL);
+}
+
void APIPage::loadSettings()
{
auto s = APPLICATION->settings();
- QString pastebinURL = s->get("PastebinURL").toString();
- ui->urlChoices->setCurrentText(pastebinURL);
+
+ int pasteType = s->get("PastebinType").toInt();
+ QString pastebinURL = s->get("PastebinCustomAPIBase").toString();
+
+ ui->baseURLEntry->setText(pastebinURL);
+ int pasteTypeIndex = ui->pasteTypeComboBox->findData(pasteType);
+ if (pasteTypeIndex == -1)
+ {
+ pasteTypeIndex = ui->pasteTypeComboBox->findData(PasteUpload::PasteType::Mclogs);
+ ui->baseURLEntry->clear();
+ }
+
+ ui->pasteTypeComboBox->setCurrentIndex(pasteTypeIndex);
+
QString msaClientID = s->get("MSAClientIDOverride").toString();
ui->msaClientID->setText(msaClientID);
+ QString metaURL = s->get("MetaURLOverride").toString();
+ ui->metaURL->setText(metaURL);
QString curseKey = s->get("CFKeyOverride").toString();
ui->curseKey->setText(curseKey);
}
@@ -77,10 +141,27 @@ void APIPage::loadSettings()
void APIPage::applySettings()
{
auto s = APPLICATION->settings();
- QString pastebinURL = ui->urlChoices->currentText();
- s->set("PastebinURL", pastebinURL);
+
+ s->set("PastebinType", ui->pasteTypeComboBox->currentData().toInt());
+ s->set("PastebinCustomAPIBase", ui->baseURLEntry->text());
+
QString msaClientID = ui->msaClientID->text();
s->set("MSAClientIDOverride", msaClientID);
+ QUrl metaURL = ui->metaURL->text();
+ // Add required trailing slash
+ if (!metaURL.isEmpty() && !metaURL.path().endsWith('/'))
+ {
+ QString path = metaURL.path();
+ path.append('/');
+ metaURL.setPath(path);
+ }
+ // Don't allow HTTP, since meta is basically RCE with all the jar files.
+ if(!metaURL.isEmpty() && metaURL.scheme() == "http")
+ {
+ metaURL.setScheme("https");
+ }
+
+ s->set("MetaURLOverride", metaURL);
QString curseKey = ui->curseKey->text();
s->set("CFKeyOverride", curseKey);
}
diff --git a/launcher/ui/pages/global/APIPage.h b/launcher/ui/pages/global/APIPage.h
index 20356009..17e62ae7 100644
--- a/launcher/ui/pages/global/APIPage.h
+++ b/launcher/ui/pages/global/APIPage.h
@@ -3,6 +3,7 @@
* PolyMC - Minecraft Launcher
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
* Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org>
+ * Copyright (c) 2022 Lenny McLennington <lenny@sneed.church>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -73,6 +74,10 @@ public:
void retranslate() override;
private:
+ int baseURLPasteType;
+ void resetBaseURLNote();
+ void updateBaseURLNote(int index);
+ void updateBaseURLPlaceholder(int index);
void loadSettings();
void applySettings();
diff --git a/launcher/ui/pages/global/APIPage.ui b/launcher/ui/pages/global/APIPage.ui
index eaa44c88..24189c5c 100644
--- a/launcher/ui/pages/global/APIPage.ui
+++ b/launcher/ui/pages/global/APIPage.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>603</width>
- <height>530</height>
+ <width>800</width>
+ <height>600</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -36,60 +36,44 @@
<item>
<widget class="QGroupBox" name="groupBox_paste">
<property name="title">
- <string>&amp;Pastebin URL</string>
+ <string>Pastebin Service</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="Line" name="line">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <widget class="QLabel" name="pasteServiceTypeLabel">
+ <property name="text">
+ <string>Paste Service Type</string>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="label_2">
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- </font>
- </property>
+ <widget class="QComboBox" name="pasteTypeComboBox"/>
+ </item>
+ <item>
+ <widget class="QLabel" name="baseURLLabel">
<property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Note: only input that starts with &lt;span style=&quot; font-weight:600;&quot;&gt;http://&lt;/span&gt; or &lt;span style=&quot; font-weight:600;&quot;&gt;https://&lt;/span&gt; will be accepted.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="scaledContents">
- <bool>false</bool>
+ <string>Base URL</string>
</property>
</widget>
</item>
<item>
- <widget class="QComboBox" name="urlChoices">
- <property name="editable">
- <bool>true</bool>
+ <widget class="QLineEdit" name="baseURLEntry">
+ <property name="placeholderText">
+ <string/>
</property>
- <property name="insertPolicy">
- <enum>QComboBox::NoInsert</enum>
+ <property name="clearButtonEnabled">
+ <bool>true</bool>
</property>
- <item>
- <property name="text">
- <string notr="true">https://0x0.st</string>
- </property>
- </item>
</widget>
</item>
<item>
- <widget class="QLabel" name="label">
+ <widget class="QLabel" name="baseURLNote">
<property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Here you can choose from a predefined list of paste services, or input the URL of a different paste service of your choice, provided it supports the same protocol as 0x0.st, that is POST a file parameter to the URL and return a link in the response body.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="textFormat">
- <enum>Qt::RichText</enum>
+ <string>Note: you probably want to change or clear the Base URL after changing the paste service type.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
</widget>
</item>
</layout>
@@ -102,13 +86,6 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
- <widget class="Line" name="line_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Note: you probably don't need to set this if logging in via Microsoft Authentication already works.</string>
@@ -148,24 +125,62 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox_curse">
- <property name="enabled">
- <bool>true</bool>
- </property>
+ <widget class="QGroupBox" name="groupBox_meta">
<property name="title">
- <string>&amp;CurseForge Core API</string>
+ <string>Meta&amp;data Server</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
- <widget class="Line" name="line_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>You can set this to a third-party metadata server to use patched libraries or other hacks.</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="metaURL">
+ <property name="placeholderText">
+ <string>(Default)</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
+ <string>Enter a custom URL for meta here.</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ <property name="openExternalLinks">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_curse">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="title">
+ <string>&amp;CurseForge Core API</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_6">
+ <item>
+ <widget class="QLabel" name="label_8">
+ <property name="text">
<string>Note: you probably don't need to set this if CurseForge already works.</string>
</property>
</widget>
@@ -181,7 +196,7 @@
</widget>
</item>
<item>
- <widget class="QLabel" name="label_5">
+ <widget class="QLabel" name="label_7">
<property name="text">
<string>Enter a custom API Key for CurseForge here. </string>
</property>
@@ -199,6 +214,19 @@
</layout>
</widget>
</item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
</widget>
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp
index 26aa60af..004fdc57 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp
@@ -43,8 +43,11 @@
#include "modplatform/atlauncher/ATLShareCode.h"
#include "Application.h"
-AtlOptionalModListModel::AtlOptionalModListModel(QWidget *parent, QVector<ATLauncher::VersionMod> mods)
- : QAbstractListModel(parent), m_mods(mods) {
+AtlOptionalModListModel::AtlOptionalModListModel(QWidget* parent, ATLauncher::PackVersion version, QVector<ATLauncher::VersionMod> mods)
+ : QAbstractListModel(parent)
+ , m_version(version)
+ , m_mods(mods)
+{
// fill mod index
for (int i = 0; i < m_mods.size(); i++) {
auto mod = m_mods.at(i);
@@ -97,6 +100,11 @@ QVariant AtlOptionalModListModel::data(const QModelIndex &index, int role) const
return mod.description;
}
}
+ else if (role == Qt::ForegroundRole) {
+ if (!mod.colour.isEmpty() && m_version.colours.contains(mod.colour)) {
+ return QColor(QString("#%1").arg(m_version.colours[mod.colour]));
+ }
+ }
else if (role == Qt::CheckStateRole) {
if (index.column() == EnabledColumn) {
return m_selection[mod.name] ? Qt::Checked : Qt::Unchecked;
@@ -223,7 +231,21 @@ void AtlOptionalModListModel::clearAll() {
}
void AtlOptionalModListModel::toggleMod(ATLauncher::VersionMod mod, int index) {
- setMod(mod, index, !m_selection[mod.name]);
+ auto enable = !m_selection[mod.name];
+
+ // If there is a warning for the mod, display that first (if we would be enabling the mod)
+ if (enable && !mod.warning.isEmpty() && m_version.warnings.contains(mod.warning)) {
+ auto message = QString("%1<br><br>%2")
+ .arg(m_version.warnings[mod.warning], tr("Are you sure that you want to enable this mod?"));
+
+ // fixme: avoid casting here
+ auto result = QMessageBox::warning((QWidget*) this->parent(), tr("Warning"), message, QMessageBox::Yes | QMessageBox::No);
+ if (result != QMessageBox::Yes) {
+ return;
+ }
+ }
+
+ setMod(mod, index, enable);
}
void AtlOptionalModListModel::setMod(ATLauncher::VersionMod mod, int index, bool enable, bool shouldEmit) {
@@ -287,12 +309,13 @@ void AtlOptionalModListModel::setMod(ATLauncher::VersionMod mod, int index, bool
}
}
-
-AtlOptionalModDialog::AtlOptionalModDialog(QWidget *parent, QVector<ATLauncher::VersionMod> mods)
- : QDialog(parent), ui(new Ui::AtlOptionalModDialog) {
+AtlOptionalModDialog::AtlOptionalModDialog(QWidget* parent, ATLauncher::PackVersion version, QVector<ATLauncher::VersionMod> mods)
+ : QDialog(parent)
+ , ui(new Ui::AtlOptionalModDialog)
+{
ui->setupUi(this);
- listModel = new AtlOptionalModListModel(this, mods);
+ listModel = new AtlOptionalModListModel(this, version, mods);
ui->treeView->setModel(listModel);
ui->treeView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h
index 953b288e..8e02444e 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h
@@ -56,7 +56,7 @@ public:
DescriptionColumn,
};
- AtlOptionalModListModel(QWidget *parent, QVector<ATLauncher::VersionMod> mods);
+ AtlOptionalModListModel(QWidget *parent, ATLauncher::PackVersion version, QVector<ATLauncher::VersionMod> mods);
QVector<QString> getResult();
@@ -86,7 +86,9 @@ private:
NetJob::Ptr m_jobPtr;
QByteArray m_response;
+ ATLauncher::PackVersion m_version;
QVector<ATLauncher::VersionMod> m_mods;
+
QMap<QString, bool> m_selection;
QMap<QString, int> m_index;
QMap<QString, QVector<QString>> m_dependants;
@@ -96,7 +98,7 @@ class AtlOptionalModDialog : public QDialog {
Q_OBJECT
public:
- AtlOptionalModDialog(QWidget *parent, QVector<ATLauncher::VersionMod> mods);
+ AtlOptionalModDialog(QWidget *parent, ATLauncher::PackVersion version, QVector<ATLauncher::VersionMod> mods);
~AtlOptionalModDialog() override;
QVector<QString> getResult() {
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp
index df9b9207..7bc6fc6b 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp
@@ -45,8 +45,12 @@
#include <BuildConfig.h>
-AtlPage::AtlPage(NewInstanceDialog* dialog, QWidget *parent)
- : QWidget(parent), ui(new Ui::AtlPage), dialog(dialog)
+#include <QMessageBox>
+
+AtlPage::AtlPage(NewInstanceDialog* dialog, QWidget* parent)
+ : QWidget(parent)
+ , ui(new Ui::AtlPage)
+ , dialog(dialog)
{
ui->setupUi(this);
@@ -169,8 +173,9 @@ void AtlPage::onVersionSelectionChanged(QString data)
suggestCurrent();
}
-QVector<QString> AtlPage::chooseOptionalMods(QVector<ATLauncher::VersionMod> mods) {
- AtlOptionalModDialog optionalModDialog(this, mods);
+QVector<QString> AtlPage::chooseOptionalMods(ATLauncher::PackVersion version, QVector<ATLauncher::VersionMod> mods)
+{
+ AtlOptionalModDialog optionalModDialog(this, version, mods);
optionalModDialog.exec();
return optionalModDialog.getResult();
}
@@ -210,3 +215,8 @@ QString AtlPage::chooseVersion(Meta::VersionListPtr vlist, QString minecraftVers
vselect.exec();
return vselect.selectedVersion()->descriptor();
}
+
+void AtlPage::displayMessage(QString message)
+{
+ QMessageBox::information(this, tr("Installing"), message);
+}
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlPage.h b/launcher/ui/pages/modplatform/atlauncher/AtlPage.h
index c95b0127..aa6d5da1 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlPage.h
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlPage.h
@@ -84,7 +84,8 @@ private:
void suggestCurrent();
QString chooseVersion(Meta::VersionListPtr vlist, QString minecraftVersion) override;
- QVector<QString> chooseOptionalMods(QVector<ATLauncher::VersionMod> mods) override;
+ QVector<QString> chooseOptionalMods(ATLauncher::PackVersion version, QVector<ATLauncher::VersionMod> mods) override;
+ void displayMessage(QString message) override;
private slots:
void triggerSearch();
diff --git a/launcher/ui/setupwizard/PasteWizardPage.cpp b/launcher/ui/setupwizard/PasteWizardPage.cpp
new file mode 100644
index 00000000..0f47da4b
--- /dev/null
+++ b/launcher/ui/setupwizard/PasteWizardPage.cpp
@@ -0,0 +1,42 @@
+#include "PasteWizardPage.h"
+#include "ui_PasteWizardPage.h"
+
+#include "Application.h"
+#include "net/PasteUpload.h"
+
+PasteWizardPage::PasteWizardPage(QWidget *parent) :
+ BaseWizardPage(parent),
+ ui(new Ui::PasteWizardPage)
+{
+ ui->setupUi(this);
+}
+
+PasteWizardPage::~PasteWizardPage()
+{
+ delete ui;
+}
+
+void PasteWizardPage::initializePage()
+{
+}
+
+bool PasteWizardPage::validatePage()
+{
+ auto s = APPLICATION->settings();
+ QString prevPasteURL = s->get("PastebinURL").toString();
+ s->reset("PastebinURL");
+ if (ui->previousSettingsRadioButton->isChecked())
+ {
+ bool usingDefaultBase = prevPasteURL == PasteUpload::PasteTypes.at(PasteUpload::PasteType::NullPointer).defaultBase;
+ s->set("PastebinType", PasteUpload::PasteType::NullPointer);
+ if (!usingDefaultBase)
+ s->set("PastebinCustomAPIBase", prevPasteURL);
+ }
+
+ return true;
+}
+
+void PasteWizardPage::retranslate()
+{
+ ui->retranslateUi(this);
+}
diff --git a/launcher/ui/setupwizard/PasteWizardPage.h b/launcher/ui/setupwizard/PasteWizardPage.h
new file mode 100644
index 00000000..513a14cb
--- /dev/null
+++ b/launcher/ui/setupwizard/PasteWizardPage.h
@@ -0,0 +1,27 @@
+#ifndef PASTEDEFAULTSCONFIRMATIONWIZARD_H
+#define PASTEDEFAULTSCONFIRMATIONWIZARD_H
+
+#include <QWidget>
+#include "BaseWizardPage.h"
+
+namespace Ui {
+class PasteWizardPage;
+}
+
+class PasteWizardPage : public BaseWizardPage
+{
+ Q_OBJECT
+
+public:
+ explicit PasteWizardPage(QWidget *parent = nullptr);
+ ~PasteWizardPage();
+
+ void initializePage() override;
+ bool validatePage() override;
+ void retranslate() override;
+
+private:
+ Ui::PasteWizardPage *ui;
+};
+
+#endif // PASTEDEFAULTSCONFIRMATIONWIZARD_H
diff --git a/launcher/ui/setupwizard/PasteWizardPage.ui b/launcher/ui/setupwizard/PasteWizardPage.ui
new file mode 100644
index 00000000..247d3a75
--- /dev/null
+++ b/launcher/ui/setupwizard/PasteWizardPage.ui
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PasteWizardPage</class>
+ <widget class="QWidget" name="PasteWizardPage">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>The default paste service has changed to mclo.gs, please choose what you want to do with your settings.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="defaultSettingsRadioButton">
+ <property name="text">
+ <string>Use new default service</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="previousSettingsRadioButton">
+ <property name="text">
+ <string>Keep previous settings</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">buttonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>156</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+ <buttongroups>
+ <buttongroup name="buttonGroup"/>
+ </buttongroups>
+</ui>