From e50d07f791b591b8a6055a76cfc072a34acc8bea Mon Sep 17 00:00:00 2001 From: swirl Date: Sun, 9 Jan 2022 13:51:46 -0500 Subject: remove patreon stuff Closes: #22 Update to 1.0.5 Remove "Forking/Redistribution" tab in About (why is it even there?) Metainfo now corresponds to version add discord Completely removed Patreon. --- launcher/ui/MainWindow.cpp | 14 ------------- launcher/ui/MainWindow.h | 3 +-- launcher/ui/dialogs/AboutDialog.cpp | 40 ++----------------------------------- launcher/ui/dialogs/AboutDialog.h | 9 +-------- launcher/ui/dialogs/AboutDialog.ui | 15 -------------- 5 files changed, 4 insertions(+), 77 deletions(-) (limited to 'launcher/ui') diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index b06f3d5a..3dcc8ee9 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -201,7 +201,6 @@ public: //TranslatedAction actionRefresh; TranslatedAction actionCheckUpdate; TranslatedAction actionSettings; - TranslatedAction actionPatreon; TranslatedAction actionMoreNews; TranslatedAction actionManageAccounts; TranslatedAction actionLaunchInstance; @@ -400,14 +399,6 @@ public: mainToolBar->addSeparator(); - actionPatreon = TranslatedAction(MainWindow); - actionPatreon->setObjectName(QStringLiteral("actionPatreon")); - actionPatreon->setIcon(APPLICATION->getThemedIcon("patreon")); - actionPatreon.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Support %1")); - actionPatreon.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the %1 Patreon page.")); - all_actions.append(&actionPatreon); - mainToolBar->addAction(actionPatreon); - actionCAT = TranslatedAction(MainWindow); actionCAT->setObjectName(QStringLiteral("actionCAT")); actionCAT->setCheckable(true); @@ -1694,11 +1685,6 @@ void MainWindow::on_actionReportBug_triggered() DesktopServices::openUrl(QUrl(BuildConfig.BUG_TRACKER_URL)); } -void MainWindow::on_actionPatreon_triggered() -{ - DesktopServices::openUrl(QUrl("https://www.patreon.com/multimc")); -} - void MainWindow::on_actionMoreNews_triggered() { DesktopServices::openUrl(QUrl("https://multimc.org/posts.html")); diff --git a/launcher/ui/MainWindow.h b/launcher/ui/MainWindow.h index e462c524..f6940ab0 100644 --- a/launcher/ui/MainWindow.h +++ b/launcher/ui/MainWindow.h @@ -109,8 +109,6 @@ private slots: void on_actionReportBug_triggered(); - void on_actionPatreon_triggered(); - void on_actionMoreNews_triggered(); void newsButtonClicked(); @@ -223,3 +221,4 @@ private: // managed by the application object Task *m_versionLoadTask = nullptr; }; + diff --git a/launcher/ui/dialogs/AboutDialog.cpp b/launcher/ui/dialogs/AboutDialog.cpp index 9795c38b..2ba34f1a 100644 --- a/launcher/ui/dialogs/AboutDialog.cpp +++ b/launcher/ui/dialogs/AboutDialog.cpp @@ -26,9 +26,8 @@ namespace { // Credits // This is a hack, but I can't think of a better way to do this easily without screwing with QTextDocument... -QString getCreditsHtml(QStringList patrons) +QString getCreditsHtml() { - QString patronsHeading = QObject::tr("Patrons", "About Credits"); QString output; QTextStream stream(&output); stream.setCodec(QTextCodec::codecForName("UTF-8")); @@ -50,13 +49,6 @@ QString getCreditsHtml(QStringList patrons) stream << "

Zeker Zhayard <@Zeker_Zhayard>

\n"; stream << "
\n"; - if(!patrons.isEmpty()) { - stream << "

" << QObject::tr("Patrons", "About Credits") << "

\n"; - for (QString patron : patrons) - { - stream << "

" << patron << "

\n"; - } - } stream << "\n"; return output; } @@ -80,7 +72,7 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia setWindowTitle(tr("About %1").arg(launcherName)); - QString chtml = getCreditsHtml(QStringList()); + QString chtml = getCreditsHtml(); ui->creditsText->setHtml(chtml); QString lhtml = getLicenseHtml(); @@ -104,15 +96,6 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia else ui->channelLabel->setVisible(false); - ui->redistributionText->setHtml(tr( -"

We keep MultiMC open source because we think it's important to be able to see the source code for a project like this, and we do so using the Apache license.

\n" -"

Part of the reason for using the Apache license is we don't want people using the "MultiMC" name when redistributing the project. " -"This means people must take the time to go through the source code and remove all references to "MultiMC", including but not limited to the project " -"icon and the title of windows, (no MultiMC-fork in the title).

\n" -"

The Apache license covers reasonable use for the name - a mention of the project's origins in the About dialog and the license is acceptable. " -"However, it should be abundantly clear that the project is a fork without implying that you have our blessing.

" - )); - QString urlText("

%1

"); ui->urlLabel->setText(urlText.arg(BuildConfig.LAUNCHER_GIT)); @@ -122,28 +105,9 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia connect(ui->closeButton, SIGNAL(clicked()), SLOT(close())); connect(ui->aboutQt, &QPushButton::clicked, &QApplication::aboutQt); - - loadPatronList(); } AboutDialog::~AboutDialog() { delete ui; } - -void AboutDialog::loadPatronList() -{ - netJob = new NetJob("Patreon Patron List", APPLICATION->network()); - netJob->addNetAction(Net::Download::makeByteArray(QUrl("https://files.multimc.org/patrons.txt"), &dataSink)); - connect(netJob.get(), &NetJob::succeeded, this, &AboutDialog::patronListLoaded); - netJob->start(); -} - -void AboutDialog::patronListLoaded() -{ - QString patronListStr(dataSink); - dataSink.clear(); - QString html = getCreditsHtml(patronListStr.split("\n", QString::SkipEmptyParts)); - ui->creditsText->setHtml(html); -} - diff --git a/launcher/ui/dialogs/AboutDialog.h b/launcher/ui/dialogs/AboutDialog.h index cc4b8850..814fd98c 100644 --- a/launcher/ui/dialogs/AboutDialog.h +++ b/launcher/ui/dialogs/AboutDialog.h @@ -31,17 +31,10 @@ public: explicit AboutDialog(QWidget *parent = 0); ~AboutDialog(); -public -slots: - /// Starts loading a list of Patreon patrons. - void loadPatronList(); - - /// Slot for when the patron list loads successfully. - void patronListLoaded(); - private: Ui::AboutDialog *ui; NetJob::Ptr netJob; QByteArray dataSink; }; + diff --git a/launcher/ui/dialogs/AboutDialog.ui b/launcher/ui/dialogs/AboutDialog.ui index 422e877b..4db533ff 100644 --- a/launcher/ui/dialogs/AboutDialog.ui +++ b/launcher/ui/dialogs/AboutDialog.ui @@ -251,20 +251,6 @@ - - - Forking/Redistribution - - - - - - Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - @@ -307,7 +293,6 @@ tabWidget creditsText licenseText - redistributionText aboutQt closeButton -- cgit