aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorForkk <forkk@forkk.net>2014-01-02 13:38:20 -0600
committerForkk <forkk@forkk.net>2014-01-02 13:38:20 -0600
commit17f1864a71b69b9df14d8e06ed48a65e678d09c9 (patch)
tree4d98a2b3493a26017150d6ba8c5ae0419de3de7d /gui
parent4495e20cd7f7f2ab062f3b60f19ac4b79f32c350 (diff)
parentaa5f2c8120cc23de0d57c9f0280512adb9a531b3 (diff)
downloadPrismLauncher-17f1864a71b69b9df14d8e06ed48a65e678d09c9.tar.gz
PrismLauncher-17f1864a71b69b9df14d8e06ed48a65e678d09c9.tar.bz2
PrismLauncher-17f1864a71b69b9df14d8e06ed48a65e678d09c9.zip
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into feature_news
Conflicts: CMakeLists.txt gui/MainWindow.h
Diffstat (limited to 'gui')
-rw-r--r--gui/ConsoleWindow.cpp15
-rw-r--r--gui/ConsoleWindow.ui5
-rw-r--r--gui/MainWindow.cpp139
-rw-r--r--gui/MainWindow.h6
-rw-r--r--gui/dialogs/AboutDialog.ui79
-rw-r--r--gui/dialogs/AccountListDialog.cpp9
-rw-r--r--gui/dialogs/CopyInstanceDialog.cpp2
-rw-r--r--gui/dialogs/EditAccountDialog.cpp7
-rw-r--r--gui/dialogs/EditAccountDialog.h3
-rw-r--r--gui/dialogs/EditAccountDialog.ui6
-rw-r--r--gui/dialogs/IconPickerDialog.cpp4
-rw-r--r--gui/dialogs/InstanceSettings.cpp33
-rw-r--r--gui/dialogs/InstanceSettings.h1
-rw-r--r--gui/dialogs/InstanceSettings.ui26
-rw-r--r--gui/dialogs/NewInstanceDialog.cpp2
-rw-r--r--gui/dialogs/OneSixModEditDialog.cpp42
-rw-r--r--gui/dialogs/OneSixModEditDialog.h2
-rw-r--r--gui/dialogs/OneSixModEditDialog.ui21
-rw-r--r--gui/dialogs/SettingsDialog.cpp122
-rw-r--r--gui/dialogs/SettingsDialog.h14
-rw-r--r--gui/dialogs/SettingsDialog.ui216
-rw-r--r--gui/widgets/MCModInfoFrame.cpp2
-rw-r--r--gui/widgets/ModListView.cpp5
23 files changed, 594 insertions, 167 deletions
diff --git a/gui/ConsoleWindow.cpp b/gui/ConsoleWindow.cpp
index 24afbc0a..e640d261 100644
--- a/gui/ConsoleWindow.cpp
+++ b/gui/ConsoleWindow.cpp
@@ -58,10 +58,17 @@ ConsoleWindow::~ConsoleWindow()
void ConsoleWindow::writeColor(QString text, const char *color)
{
// append a paragraph
- if (color != nullptr)
- ui->text->appendHtml(QString("<font color=\"%1\">%2</font>").arg(color).arg(text));
- else
- ui->text->appendPlainText(text);
+ QString newtext;
+ newtext += "<span style=\"";
+ {
+ if(color)
+ newtext += QString("color:") + color + ";";
+ newtext += "font-family: monospace;";
+ }
+ newtext += "\">";
+ newtext += text.toHtmlEscaped();
+ newtext += "</span>";
+ ui->text->appendHtml(newtext);
}
void ConsoleWindow::write(QString data, MessageLevel::Enum mode)
diff --git a/gui/ConsoleWindow.ui b/gui/ConsoleWindow.ui
index 62cc89ac..c2307ecc 100644
--- a/gui/ConsoleWindow.ui
+++ b/gui/ConsoleWindow.ui
@@ -17,11 +17,6 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPlainTextEdit" name="text">
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- </font>
- </property>
<property name="undoRedoEnabled">
<bool>false</bool>
</property>
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index 85ad319b..42823fa5 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -66,7 +66,7 @@
#include "logic/lists/InstanceList.h"
#include "logic/lists/MinecraftVersionList.h"
#include "logic/lists/LwjglVersionList.h"
-#include "logic/lists/IconList.h"
+#include "logic/icons/IconList.h"
#include "logic/lists/JavaVersionList.h"
#include "logic/auth/flows/AuthenticateTask.h"
@@ -90,7 +90,9 @@
#include "logic/LegacyInstance.h"
#include "logic/assets/AssetsUtils.h"
+#include "logic/assets/AssetsMigrateTask.h"
#include <logic/updater/UpdateChecker.h>
+#include <logic/tasks/ThreadTask.h>
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
{
@@ -99,7 +101,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
setWindowTitle(QString("MultiMC %1").arg(MMC->version().toString()));
// OSX magic.
- setUnifiedTitleAndToolBarOnMac(true);
+ // setUnifiedTitleAndToolBarOnMac(true);
// The instance action toolbar customizations
{
@@ -178,6 +180,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
connect(view->selectionModel(),
SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), this,
SLOT(instanceChanged(const QModelIndex &, const QModelIndex &)));
+
+ // track icon changes and update the toolbar!
+ connect(MMC->icons().get(), SIGNAL(iconUpdated(QString)), SLOT(iconUpdated(QString)));
+
// model reset -> selection is invalid. All the instance pointers are wrong.
// FIXME: stop using POINTERS everywhere
connect(MMC->instances().get(), SIGNAL(dataIsInvalid()), SLOT(selectionBad()));
@@ -264,8 +270,14 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
// set up the updater object.
auto updater = MMC->updateChecker();
- QObject::connect(updater.get(), &UpdateChecker::updateAvailable, this,
- &MainWindow::updateAvailable);
+ connect(updater.get(), &UpdateChecker::updateAvailable, this,
+ &MainWindow::updateAvailable);
+ connect(updater.get(), &UpdateChecker::noUpdateFound, [this]()
+ {
+ CustomMessageBox::selectable(
+ this, tr("No update found."),
+ tr("No MultiMC update was found!\nYou are using the latest version."))->exec();
+ });
// if automatic update checks are allowed, start one.
if (MMC->settings()->get("AutoUpdate").toBool())
on_actionCheckUpdate_triggered();
@@ -292,8 +304,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
// removing this looks stupid
view->setFocus();
-
- AssetsUtils::migrateOldAssets();
}
MainWindow::~MainWindow()
@@ -502,7 +512,7 @@ void MainWindow::downloadUpdates(QString repo, int versionId, bool installOnExit
if (installOnExit)
MMC->setUpdateOnExit(updateTask.updateFilesDir());
else
- MMC->installUpdates(updateTask.updateFilesDir());
+ MMC->installUpdates(updateTask.updateFilesDir(), true);
}
}
@@ -674,6 +684,20 @@ void MainWindow::on_actionChangeInstIcon_triggered()
}
}
+void MainWindow::iconUpdated(QString icon)
+{
+ if(icon == m_currentInstIcon)
+ {
+ ui->actionChangeInstIcon->setIcon(MMC->icons()->getIcon(m_currentInstIcon));
+ }
+}
+
+void MainWindow::updateInstanceToolIcon(QString new_icon)
+{
+ m_currentInstIcon = new_icon;
+ ui->actionChangeInstIcon->setIcon(MMC->icons()->getIcon(m_currentInstIcon));
+}
+
void MainWindow::on_actionChangeInstGroup_triggered()
{
if (!m_selectedInstance)
@@ -721,7 +745,8 @@ void MainWindow::on_actionConfig_Folder_triggered()
void MainWindow::on_actionCheckUpdate_triggered()
{
auto updater = MMC->updateChecker();
- updater->checkForUpdate();
+
+ updater->checkForUpdate(true);
}
void MainWindow::on_actionSettings_triggered()
@@ -905,6 +930,8 @@ void MainWindow::doLaunch()
if (!account.get())
return;
+ QString failReason = tr("Your account is currently not logged in. Please enter "
+ "your password to log in again.");
// do the login. if the account has an access token, try to refresh it first.
if (account->accountStatus() != NotVerified)
{
@@ -919,13 +946,28 @@ void MainWindow::doLaunch()
{
updateInstance(m_selectedInstance, account);
}
- // revert from online to verified.
+ else
+ {
+ if (!task->successful())
+ {
+ failReason = task->failReason();
+ }
+ if (loginWithPassword(account, failReason))
+ updateInstance(m_selectedInstance, account);
+ }
+ // in any case, revert from online to verified.
+ account->downgrade();
+ }
+ else
+ {
+ if (loginWithPassword(account, failReason))
+ {
+ updateInstance(m_selectedInstance, account);
+ account->downgrade();
+ }
+ // in any case, revert from online to verified.
account->downgrade();
- return;
}
- if (loginWithPassword(account, tr("Your account is currently not logged in. Please enter "
- "your password to log in again.")))
- updateInstance(m_selectedInstance, account);
}
bool MainWindow::loginWithPassword(MojangAccountPtr account, const QString &errorMsg)
@@ -1042,22 +1084,9 @@ void MainWindow::on_actionChangeInstMCVersion_triggered()
VersionSelectDialog vselect(m_selectedInstance->versionList().get(),
tr("Change Minecraft version"), this);
vselect.setFilter(1, "OneSix");
- if (vselect.exec() && vselect.selectedVersion())
- {
- if (m_selectedInstance->versionIsCustom())
- {
- auto result = CustomMessageBox::selectable(
- this, tr("Are you sure?"),
- tr("This will remove any library/version customization you did previously. "
- "This includes things like Forge install and similar."),
- QMessageBox::Warning, QMessageBox::Ok | QMessageBox::Abort,
- QMessageBox::Abort)->exec();
-
- if (result != QMessageBox::Ok)
- return;
- }
- m_selectedInstance->setIntendedVersionId(vselect.selectedVersion()->descriptor());
- }
+ if(!vselect.exec() || !vselect.selectedVersion())
+ return;
+
if (!MMC->accounts()->anyAccountIsValid())
{
CustomMessageBox::selectable(
@@ -1067,7 +1096,22 @@ void MainWindow::on_actionChangeInstMCVersion_triggered()
QMessageBox::Warning)->show();
return;
}
- auto updateTask = m_selectedInstance->doUpdate(false /*only_prepare*/);
+
+ if (m_selectedInstance->versionIsCustom())
+ {
+ auto result = CustomMessageBox::selectable(
+ this, tr("Are you sure?"),
+ tr("This will remove any library/version customization you did previously. "
+ "This includes things like Forge install and similar."),
+ QMessageBox::Warning, QMessageBox::Ok | QMessageBox::Abort,
+ QMessageBox::Abort)->exec();
+
+ if (result != QMessageBox::Ok)
+ return;
+ }
+ m_selectedInstance->setIntendedVersionId(vselect.selectedVersion()->descriptor());
+
+ auto updateTask = m_selectedInstance->doUpdate(false);
if (!updateTask)
{
return;
@@ -1109,7 +1153,6 @@ void MainWindow::instanceChanged(const QModelIndex &current, const QModelIndex &
.value<void *>()))
{
ui->instanceToolBar->setEnabled(true);
- QString iconKey = m_selectedInstance->iconKey();
renameButton->setText(m_selectedInstance->name());
ui->actionChangeInstLWJGLVersion->setEnabled(
m_selectedInstance->menuActionEnabled("actionChangeInstLWJGLVersion"));
@@ -1118,8 +1161,7 @@ void MainWindow::instanceChanged(const QModelIndex &current, const QModelIndex &
ui->actionChangeInstMCVersion->setEnabled(
m_selectedInstance->menuActionEnabled("actionChangeInstMCVersion"));
m_statusLeft->setText(m_selectedInstance->getStatusbarDescription());
- auto ico = MMC->icons()->getIcon(iconKey);
- ui->actionChangeInstIcon->setIcon(ico);
+ updateInstanceToolIcon(m_selectedInstance->iconKey());
MMC->settings()->set("SelectedInstance", m_selectedInstance->id());
}
@@ -1134,12 +1176,11 @@ void MainWindow::instanceChanged(const QModelIndex &current, const QModelIndex &
void MainWindow::selectionBad()
{
m_selectedInstance = nullptr;
- QString iconKey = "infinity";
+
statusBar()->clearMessage();
ui->instanceToolBar->setEnabled(false);
renameButton->setText(tr("Rename Instance"));
- auto ico = MMC->icons()->getIcon(iconKey);
- ui->actionChangeInstIcon->setIcon(ico);
+ updateInstanceToolIcon("infinity");
}
void MainWindow::on_actionEditInstNotes_triggered()
@@ -1162,6 +1203,32 @@ void MainWindow::instanceEnded()
this->show();
}
+void MainWindow::checkMigrateLegacyAssets()
+{
+ int legacyAssets = AssetsUtils::findLegacyAssets();
+ if(legacyAssets > 0)
+ {
+ ProgressDialog migrateDlg(this);
+ AssetsMigrateTask migrateTask(legacyAssets, &migrateDlg);
+ {
+ ThreadTask threadTask(&migrateTask);
+
+ if (migrateDlg.exec(&threadTask))
+ {
+ QLOG_INFO() << "Assets migration task completed successfully";
+ }
+ else
+ {
+ QLOG_INFO() << "Assets migration task reported failure";
+ }
+ }
+ }
+ else
+ {
+ QLOG_INFO() << "Didn't find any legacy assets to migrate";
+ }
+}
+
void MainWindow::checkSetDefaultJava()
{
bool askForJava = false;
diff --git a/gui/MainWindow.h b/gui/MainWindow.h
index 60fde281..f5b25006 100644
--- a/gui/MainWindow.h
+++ b/gui/MainWindow.h
@@ -51,6 +51,7 @@ public:
void openWebPage(QUrl url);
void checkSetDefaultJava();
+ void checkMigrateLegacyAssets();
private
slots:
@@ -145,6 +146,9 @@ slots:
void assetsFailed();
void assetsFinished();
+ // called when an icon is changed in the icon model.
+ void iconUpdated(QString);
+
public
slots:
void instanceActivated(QModelIndex);
@@ -173,6 +177,7 @@ slots:
protected:
bool eventFilter(QObject *obj, QEvent *ev);
void setCatBackground(bool enabled);
+ void updateInstanceToolIcon(QString new_icon);
private:
Ui::MainWindow *ui;
@@ -186,6 +191,7 @@ private:
QToolButton* newsLabel;
BaseInstance *m_selectedInstance;
+ QString m_currentInstIcon;
Task *m_versionLoadTask;
diff --git a/gui/dialogs/AboutDialog.ui b/gui/dialogs/AboutDialog.ui
index 7b91ebc8..df9b1a53 100644
--- a/gui/dialogs/AboutDialog.ui
+++ b/gui/dialogs/AboutDialog.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>706</width>
- <height>579</height>
+ <width>707</width>
+ <height>593</height>
</rect>
</property>
<property name="minimumSize">
@@ -103,8 +103,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>688</width>
- <height>313</height>
+ <width>685</width>
+ <height>304</height>
</rect>
</property>
<attribute name="label">
@@ -113,6 +113,9 @@
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="aboutLabel">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;MultiMC is a custom launcher that makes managing Minecraft easier by allowing you to have multiple instances of Minecraft at once.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@@ -162,8 +165,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>688</width>
- <height>313</height>
+ <width>685</width>
+ <height>304</height>
</rect>
</property>
<attribute name="label">
@@ -179,13 +182,22 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Andrew Okin &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:forkk@forkk.net&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; text-decoration: underline; color:#0000ff;&quot;&gt;forkk@forkk.net&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Petr Mrázek &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:peterix@gmail.com&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; text-decoration: underline; color:#0000ff;&quot;&gt;peterix@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Orochimarufan &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:orochimarufan.x3@gmail.com&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; text-decoration: underline; color:#0000ff;&quot;&gt;orochimarufan.x3@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;TakSuyu &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:taksuyu@gmail.com&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; text-decoration: underline; color:#0000ff;&quot;&gt;taksuyu@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Sky (Drayshak) &amp;lt;&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; text-decoration: underline; color:#0000ff;&quot;&gt;multimc@bunnies.cc&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;Kilobyte &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:stiepen22@gmx.de&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; text-decoration: underline; color:#0000ff;&quot;&gt;stiepen22@gmx.de&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu';&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:7.8pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;MultiMC&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Andrew Okin &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:forkk@forkk.net&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;forkk@forkk.net&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Petr Mrázek &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:peterix@gmail.com&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;peterix@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Sky &amp;lt;&lt;/span&gt;&lt;a href=&quot;https://www.twitter.com/drayshak&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;@drayshak&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt; font-weight:600;&quot;&gt;With thanks to&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Orochimarufan &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:orochimarufan.x3@gmail.com&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;orochimarufan.x3@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;TakSuyu &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:taksuyu@gmail.com&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;taksuyu@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Kilobyte &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:stiepen22@gmx.de&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;stiepen22@gmx.de&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Jan (02JanDal) &amp;lt;&lt;/span&gt;&lt;a href=&quot;mailto:02jandal@gmail.com&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;02jandal@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Robotbrain &amp;lt;&lt;/span&gt;&lt;a href=&quot;https://twitter.com/skylordelros&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;@skylordelros&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Rootbear75 &amp;lt;&lt;/span&gt;&lt;a href=&quot;https://twitter.com/rootbear75&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;@rootbear75&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;&amp;gt; (build server)&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
@@ -206,8 +218,8 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
- <width>688</width>
- <height>313</height>
+ <width>684</width>
+ <height>290</height>
</rect>
</property>
<attribute name="label">
@@ -234,9 +246,9 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans Mono'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans Mono'; font-size:7.8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Bitstream Vera Sans'; font-size:18pt; font-weight:600;&quot;&gt;MultiMC&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Copyright 2012 MultiMC Contributors&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Copyright 2012-2014 MultiMC Contributors&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;);&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;you may not use this file except in compliance with the License.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;You may obtain a copy of the License at&lt;/span&gt;&lt;/p&gt;
@@ -361,6 +373,39 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
+ <widget class="QWidget" name="forkPage">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>684</width>
+ <height>290</height>
+ </rect>
+ </property>
+ <attribute name="label">
+ <string>Forking/Redistribution</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_33">
+ <item>
+ <widget class="QTextEdit" name="textEdit">
+ <property name="html">
+ <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:7.8pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Bitstream Vera Sans'; font-size:11pt;&quot;&gt;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.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Bitstream Vera Sans'; font-size:11pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Bitstream Vera Sans'; font-size:11pt;&quot;&gt;Part of the reason for using the Apache license is we don't want people using the &amp;quot;MultiMC&amp;quot; name when redistributing the project. This means people must take the time to go through the source code and remove all references to &amp;quot;MultiMC&amp;quot;, including but not limited to the project icon and the title of windows, (no *MultiMC-fork* in the title).&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Bitstream Vera Sans'; font-size:11pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Bitstream Vera Sans'; font-size:11pt;&quot;&gt;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 &lt;/span&gt;&lt;span style=&quot; font-family:'Bitstream Vera Sans'; font-size:11pt; font-weight:600;&quot;&gt;without&lt;/span&gt;&lt;span style=&quot; font-family:'Bitstream Vera Sans'; font-size:11pt;&quot;&gt; implying that you have our blessing.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
<item>
diff --git a/gui/dialogs/AccountListDialog.cpp b/gui/dialogs/AccountListDialog.cpp
index 242590fb..1712e352 100644
--- a/gui/dialogs/AccountListDialog.cpp
+++ b/gui/dialogs/AccountListDialog.cpp
@@ -26,7 +26,9 @@
#include <gui/dialogs/EditAccountDialog.h>
#include <gui/dialogs/ProgressDialog.h>
#include <gui/dialogs/AccountSelectDialog.h>
+#include "CustomMessageBox.h"
#include <logic/tasks/Task.h>
+#include <logic/auth/YggdrasilTask.h>
#include <MultiMC.h>
@@ -147,5 +149,12 @@ void AccountListDialog::addAccount(const QString& errMsg)
job->start();
}
+ else
+ {
+ auto reason = task->failReason();
+ auto dlg = CustomMessageBox::selectable(this, tr("Login error."), reason, QMessageBox::Critical);
+ dlg->exec();
+ delete dlg;
+ }
}
}
diff --git a/gui/dialogs/CopyInstanceDialog.cpp b/gui/dialogs/CopyInstanceDialog.cpp
index 9d7ac30c..4095408b 100644
--- a/gui/dialogs/CopyInstanceDialog.cpp
+++ b/gui/dialogs/CopyInstanceDialog.cpp
@@ -27,7 +27,7 @@
#include "logic/InstanceFactory.h"
#include "logic/BaseVersion.h"
-#include "logic/lists/IconList.h"
+#include "logic/icons/IconList.h"
#include "logic/lists/MinecraftVersionList.h"
#include "logic/tasks/Task.h"
#include "logic/BaseInstance.h"
diff --git a/gui/dialogs/EditAccountDialog.cpp b/gui/dialogs/EditAccountDialog.cpp
index dd3f0523..a1bd5591 100644
--- a/gui/dialogs/EditAccountDialog.cpp
+++ b/gui/dialogs/EditAccountDialog.cpp
@@ -15,6 +15,8 @@
#include "EditAccountDialog.h"
#include "ui_EditAccountDialog.h"
+#include <QDesktopServices>
+#include <QUrl>
EditAccountDialog::EditAccountDialog(const QString &text, QWidget *parent, int flags)
: QDialog(parent), ui(new Ui::EditAccountDialog)
@@ -33,6 +35,11 @@ EditAccountDialog::~EditAccountDialog()
delete ui;
}
+void EditAccountDialog::on_label_linkActivated(const QString &link)
+{
+ QDesktopServices::openUrl(QUrl(link));
+}
+
QString EditAccountDialog::username() const
{
return ui->userTextBox->text();
diff --git a/gui/dialogs/EditAccountDialog.h b/gui/dialogs/EditAccountDialog.h
index be3a88d8..83f25124 100644
--- a/gui/dialogs/EditAccountDialog.h
+++ b/gui/dialogs/EditAccountDialog.h
@@ -52,6 +52,9 @@ public:
PasswordField,
};
+private slots:
+ void on_label_linkActivated(const QString &link);
+
private:
Ui::EditAccountDialog *ui;
};
diff --git a/gui/dialogs/EditAccountDialog.ui b/gui/dialogs/EditAccountDialog.ui
index 1a8f9dba..5f727bd4 100644
--- a/gui/dialogs/EditAccountDialog.ui
+++ b/gu