From 3b97e3c363711c96a0198fa57695eaaa021c82ba Mon Sep 17 00:00:00 2001 From: Jan Dalheimer Date: Sat, 4 Jan 2014 11:49:06 +0100 Subject: Fix a few things related to the translations --- gui/dialogs/ModEditDialogCommon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/dialogs/ModEditDialogCommon.cpp b/gui/dialogs/ModEditDialogCommon.cpp index 9a15d92d..eee42e5e 100644 --- a/gui/dialogs/ModEditDialogCommon.cpp +++ b/gui/dialogs/ModEditDialogCommon.cpp @@ -50,8 +50,8 @@ void showWebsiteForMod(QWidget *parentDlg, Mod &m) else { CustomMessageBox::selectable( - parentDlg, parentDlg->tr("How sad!"), - parentDlg->tr("The mod author didn't provide a website link for this mod."), + parentDlg, QObject::tr("How sad!"), + QObject::tr("The mod author didn't provide a website link for this mod."), QMessageBox::Warning); } } -- cgit v1.2.3 From 7f6b344b49506462a63453bc79ae1b82536dc138 Mon Sep 17 00:00:00 2001 From: Jan Dalheimer Date: Sat, 4 Jan 2014 16:13:28 +0100 Subject: Clean up/update translation code and made language selectable in the settings dialog --- gui/dialogs/SettingsDialog.cpp | 16 ++++++++++++++++ gui/dialogs/SettingsDialog.ui | 17 +++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) (limited to 'gui') diff --git a/gui/dialogs/SettingsDialog.cpp b/gui/dialogs/SettingsDialog.cpp index 9362075e..e0e1b82c 100644 --- a/gui/dialogs/SettingsDialog.cpp +++ b/gui/dialogs/SettingsDialog.cpp @@ -219,6 +219,9 @@ void SettingsDialog::applySettings(SettingsObject *s) } } + // Language + s->set("Language", ui->languageBox->currentData().toLocale().bcp47Name()); + // Updates s->set("AutoUpdate", ui->autoUpdateCheckBox->isChecked()); @@ -286,6 +289,19 @@ void SettingsDialog::applySettings(SettingsObject *s) void SettingsDialog::loadSettings(SettingsObject *s) { + // Language + ui->languageBox->clear(); + ui->languageBox->addItem(tr("English"), QLocale(QLocale::English)); + foreach(const QString & lang, + QDir(MMC->root() + "/translations").entryList(QStringList() << "*.qm", QDir::Files)) + { + QLocale locale(lang.section(QRegExp("[_\.]"), 1)); + ui->languageBox->addItem( + QLocale::languageToString(locale.language()), + locale); + } + ui->languageBox->setCurrentIndex(ui->languageBox->findData(QLocale(s->get("Language").toString()))); + // Updates ui->autoUpdateCheckBox->setChecked(s->get("AutoUpdate").toBool()); ui->devBuildsCheckBox->setChecked(s->get("UseDevBuilds").toBool()); diff --git a/gui/dialogs/SettingsDialog.ui b/gui/dialogs/SettingsDialog.ui index dbc8ca88..c1008c75 100644 --- a/gui/dialogs/SettingsDialog.ui +++ b/gui/dialogs/SettingsDialog.ui @@ -7,7 +7,7 @@ 0 0 526 - 628 + 701 @@ -40,6 +40,20 @@ General + + + + + + Language (needs restart): + + + + + + + + @@ -644,7 +658,6 @@ - settingsTab buttonBox sortLastLaunchedBtn sortByNameBtn -- cgit v1.2.3 From 8950953d915ba234f62da93b520a1b82594cb9dc Mon Sep 17 00:00:00 2001 From: Jan Dalheimer Date: Sat, 4 Jan 2014 19:20:20 +0100 Subject: Hopefully fix Qt 5.1 compilation --- gui/dialogs/SettingsDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/dialogs/SettingsDialog.cpp b/gui/dialogs/SettingsDialog.cpp index e0e1b82c..60a3e009 100644 --- a/gui/dialogs/SettingsDialog.cpp +++ b/gui/dialogs/SettingsDialog.cpp @@ -220,7 +220,7 @@ void SettingsDialog::applySettings(SettingsObject *s) } // Language - s->set("Language", ui->languageBox->currentData().toLocale().bcp47Name()); + s->set("Language", ui->languageBox->itemData(ui->languageBox->currentIndex()).toLocale().bcp47Name()); // Updates s->set("AutoUpdate", ui->autoUpdateCheckBox->isChecked()); -- cgit v1.2.3 From 52c9cd5497153365f5b3871b216e5828923f9b5f Mon Sep 17 00:00:00 2001 From: Forkk Date: Wed, 8 Jan 2014 23:38:34 -0600 Subject: Make the GitHub link in the about dialog clickable Fixes #38 --- gui/dialogs/AboutDialog.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gui') diff --git a/gui/dialogs/AboutDialog.cpp b/gui/dialogs/AboutDialog.cpp index efeea6f2..35c85815 100644 --- a/gui/dialogs/AboutDialog.cpp +++ b/gui/dialogs/AboutDialog.cpp @@ -24,6 +24,8 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia MultiMCPlatform::fixWM_CLASS(this); ui->setupUi(this); + ui->urlLabel->setOpenExternalLinks(true); + ui->icon->setPixmap(QIcon(":/icons/multimc/scalable/apps/multimc.svg").pixmap(64)); ui->title->setText("MultiMC 5 " + MMC->version().toString()); -- cgit v1.2.3 From e6201f9ff799a21faff15c61586f2da4e62b799f Mon Sep 17 00:00:00 2001 From: Sky Date: Thu, 9 Jan 2014 15:30:21 +0000 Subject: Add "MB" as a suffix to memory spinboxes --- gui/dialogs/InstanceSettings.ui | 9 +++++++++ gui/dialogs/SettingsDialog.ui | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/dialogs/InstanceSettings.ui b/gui/dialogs/InstanceSettings.ui index 9260caea..930b772a 100644 --- a/gui/dialogs/InstanceSettings.ui +++ b/gui/dialogs/InstanceSettings.ui @@ -168,6 +168,9 @@ + + MB + 512 @@ -198,6 +201,9 @@ + + MB + 256 @@ -214,6 +220,9 @@ + + MB + 64 diff --git a/gui/dialogs/SettingsDialog.ui b/gui/dialogs/SettingsDialog.ui index e7671cce..5f2614ed 100644 --- a/gui/dialogs/SettingsDialog.ui +++ b/gui/dialogs/SettingsDialog.ui @@ -596,6 +596,9 @@ + + MB + 512 @@ -626,6 +629,9 @@ + + MB + 256 @@ -649,6 +655,9 @@ + + MB + 64 @@ -895,7 +904,7 @@ - + -- cgit v1.2.3 From 9ddf2aec31e33e8e0fa450d0084f115471401ad4 Mon Sep 17 00:00:00 2001 From: Sky Date: Fri, 10 Jan 2014 13:16:31 +0000 Subject: Add tooltips to Java memory spinboxes --- gui/dialogs/InstanceSettings.ui | 9 +++++++++ gui/dialogs/SettingsDialog.ui | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/dialogs/InstanceSettings.ui b/gui/dialogs/InstanceSettings.ui index 930b772a..9c7e1757 100644 --- a/gui/dialogs/InstanceSettings.ui +++ b/gui/dialogs/InstanceSettings.ui @@ -168,6 +168,9 @@ + + The maximum amount of memory Minecraft is allowed to use. + MB @@ -201,6 +204,9 @@ + + The amount of memory Minecraft is started with. + MB @@ -220,6 +226,9 @@ + + The amount of memory available to store loaded Java classes. + MB diff --git a/gui/dialogs/SettingsDialog.ui b/gui/dialogs/SettingsDialog.ui index 840e9928..b95b3c8c 100644 --- a/gui/dialogs/SettingsDialog.ui +++ b/gui/dialogs/SettingsDialog.ui @@ -599,6 +599,9 @@ + + The maximum amount of memory Minecraft is allowed to use. + MB @@ -632,6 +635,9 @@ + + The amount of memory Minecraft is started with. + MB @@ -658,6 +664,9 @@ + + The amount of memory available to store loaded Java classes. + MB @@ -907,7 +916,7 @@ - + -- cgit v1.2.3 From 088ad07a8098d587aac54a582e1ef70f18ff5d17 Mon Sep 17 00:00:00 2001 From: Sky Date: Sat, 11 Jan 2014 00:22:08 +0000 Subject: Show active account skin whilst it's checked for updates --- gui/MainWindow.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gui') diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index 31e4b9e4..dba15e98 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -235,17 +235,20 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi connect(MMC->accounts().get(), &MojangAccountList::listChanged, [this] { repopulateAccountsMenu(); }); - std::shared_ptr accounts = MMC->accounts(); + // Show initial account + activeAccountChanged(); + + auto accounts = MMC->accounts(); // TODO: Nicer way to iterate? for (int i = 0; i < accounts->count(); i++) { - MojangAccountPtr account = accounts->at(i); + auto account = accounts->at(i); if (account != nullptr) { auto job = new NetJob("Startup player skins: " + account->username()); - for (AccountProfile profile : account->profiles()) + for (auto profile : account->profiles()) { auto meta = MMC->metacache()->resolveEntry("skins", profile.name + ".png"); auto action = CacheDownload::make( -- cgit v1.2.3 From a774b3d24816aa0010e1d5f67b20acb99e7181ac Mon Sep 17 00:00:00 2001 From: Sky Date: Sun, 12 Jan 2014 18:28:42 +0000 Subject: Show Mojang service statuses in status bar --- gui/MainWindow.cpp | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ gui/MainWindow.h | 11 ++++++++ 2 files changed, 90 insertions(+) (limited to 'gui') diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index dba15e98..cc6d4abb 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -77,6 +77,8 @@ #include "logic/news/NewsChecker.h" +#include "logic/status/StatusChecker.h" + #include "logic/net/URLConstants.h" #include "logic/BaseInstance.h" @@ -199,7 +201,27 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi connect(MMC->instances().get(), SIGNAL(dataIsInvalid()), SLOT(selectionBad())); m_statusLeft = new QLabel(tr("No instance selected"), this); + m_statusRight = new QLabel(tr("No status available"), this); + m_statusRefresh = new QToolButton(this); + m_statusRefresh->setToolButtonStyle(Qt::ToolButtonIconOnly); + m_statusRefresh->setIcon( + QPixmap(":/icons/toolbar/refresh").scaled(16, 16, Qt::KeepAspectRatio)); + statusBar()->addPermanentWidget(m_statusLeft, 1); + statusBar()->addPermanentWidget(m_statusRight, 0); + statusBar()->addPermanentWidget(m_statusRefresh, 0); + + // Start status checker + { + connect(MMC->statusChecker().get(), &StatusChecker::statusLoaded, this, &MainWindow::updateStatusUI); + connect(MMC->statusChecker().get(), &StatusChecker::statusLoadingFailed, this, &MainWindow::updateStatusFailedUI); + + connect(m_statusRefresh, &QAbstractButton::clicked, this, &MainWindow::reloadStatus); + connect(&statusTimer, &QTimer::timeout, this, &MainWindow::reloadStatus); + statusTimer.setSingleShot(true); + + reloadStatus(); + } // Add "manage accounts" button, right align QWidget *spacer = new QWidget(); @@ -498,6 +520,63 @@ void MainWindow::updateNewsLabel() } } +static QString convertStatus(const QString &status) +{ + if(status == "green") return "↑"; + else if(status == "yellow") return "-"; + else if(status == "red") return "↓"; + else return "?"; +} + +void MainWindow::reloadStatus() +{ + MMC->statusChecker()->reloadStatus(); + updateStatusUI(); +} + +static QString makeStatusString(const QMap statuses) +{ + QString status = ""; + status += "Web: " + convertStatus(statuses["minecraft.net"]); + status += " Account: " + convertStatus(statuses["account.mojang.com"]); + status += " Skins: " + convertStatus(statuses["skins.minecraft.net"]); + status += " Auth: " + convertStatus(statuses["authserver.mojang.com"]); + status += " Session: " + convertStatus(statuses["sessionserver.mojang.com"]); + + return status; +} + +void MainWindow::updateStatusUI() +{ + auto statusChecker = MMC->statusChecker(); + auto statuses = statusChecker->getStatusEntries(); + + QString status = makeStatusString(statuses); + if(statusChecker->isLoadingStatus()) + { + m_statusRefresh->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + m_statusRefresh->setText(tr("Loading...")); + } + else + { + m_statusRefresh->setToolButtonStyle(Qt::ToolButtonIconOnly); + m_statusRefresh->setText(tr("")); + } + + m_statusRight->setText(status); + + statusTimer.start(60 * 1000); +} + +void MainWindow::updateStatusFailedUI() +{ + m_statusRight->setText(makeStatusString(QMap())); + m_statusRefresh->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + m_statusRefresh->setText(tr("Failed.")); + + statusTimer.start(60 * 1000); +} + void MainWindow::updateAvailable(QString repo, QString versionName, int versionId) { UpdateDialog dlg; diff --git a/gui/MainWindow.h b/gui/MainWindow.h index 12d76da4..eb478776 100644 --- a/gui/MainWindow.h +++ b/gui/MainWindow.h @@ -17,6 +17,7 @@ #include #include +#include #include "logic/lists/InstanceList.h" #include "logic/BaseInstance.h" @@ -168,6 +169,12 @@ slots: void repopulateAccountsMenu(); void updateNewsLabel(); + + void updateStatusUI(); + + void updateStatusFailedUI(); + + void reloadStatus(); /*! * Runs the DownloadUpdateTask and installs updates. @@ -198,8 +205,12 @@ private: Task *m_versionLoadTask; QLabel *m_statusLeft; + QLabel *m_statusRight; + QToolButton *m_statusRefresh; QMenu *accountMenu; QToolButton *accountMenuButton; QAction *manageAccountsAction; + + QTimer statusTimer; }; -- cgit v1.2.3 From 398167e8b01732badaa2c757b1547e879a369945 Mon Sep 17 00:00:00 2001 From: Sky Date: Sun, 12 Jan 2014 18:44:54 +0000 Subject: More space between status items --- gui/MainWindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gui') diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index cc6d4abb..d5cc1d44 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -538,10 +538,10 @@ static QString makeStatusString(const QMap statuses) { QString status = ""; status += "Web: " + convertStatus(statuses["minecraft.net"]); - status += " Account: " + convertStatus(statuses["account.mojang.com"]); - status += " Skins: " + convertStatus(statuses["skins.minecraft.net"]); - status += " Auth: " + convertStatus(statuses["authserver.mojang.com"]); - status += " Session: " + convertStatus(statuses["sessionserver.mojang.com"]); + status += " Account: " + convertStatus(statuses["account.mojang.com"]); + status += " Skins: " + convertStatus(statuses["skins.minecraft.net"]); + status += " Auth: " + convertStatus(statuses["authserver.mojang.com"]); + status += " Session: " + convertStatus(statuses["sessionserver.mojang.com"]); return status; } -- cgit v1.2.3 From fca4441229808891f460d5fbc4affd51e8896aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 9 Jan 2014 01:22:34 +0100 Subject: Replace old launcher part with a shiny new one. No more garbage on the command line. --- gui/ConsoleWindow.cpp | 4 ++++ gui/dialogs/AboutDialog.ui | 55 +++++++++++++++++++++++++++++++++++----------- 2 files changed, 46 insertions(+), 13 deletions(-) (limited to 'gui') diff --git a/gui/ConsoleWindow.cpp b/gui/ConsoleWindow.cpp index 84a141ce..54a74bde 100644 --- a/gui/ConsoleWindow.cpp +++ b/gui/ConsoleWindow.cpp @@ -166,6 +166,10 @@ void ConsoleWindow::on_closeButton_clicked() void ConsoleWindow::setMayClose(bool mayclose) { + if(mayclose) + ui->closeButton->setText(tr("Close")); + else + ui->closeButton->setText(tr("Hide")); m_mayclose = mayclose; } diff --git a/gui/dialogs/AboutDialog.ui b/gui/dialogs/AboutDialog.ui index b0dafb06..64a355d3 100644 --- a/gui/dialogs/AboutDialog.ui +++ b/gui/dialogs/AboutDialog.ui @@ -104,7 +104,7 @@ 0 0 689 - 331 + 311 @@ -229,7 +229,7 @@ 0 0 689 - 331 + 311 @@ -245,7 +245,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Bitstream Vera Sans'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">MultiMC</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Andrew Okin &lt;</span><a href="mailto:forkk@forkk.net"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">forkk@forkk.net</span></a><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">&gt;</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Petr Mrázek &lt;</span><a href="mailto:peterix@gmail.com"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">peterix@gmail.com</span></a><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">&gt;</span></p> @@ -282,7 +282,7 @@ p, li { white-space: pre-wrap; } 0 0 689 - 331 + 311 @@ -309,7 +309,7 @@ p, li { white-space: pre-wrap; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'DejaVu Sans Mono'; font-size:9pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'DejaVu Sans Mono'; font-size:11pt; font-weight:400; font-style:normal;"> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Bitstream Vera Sans'; font-size:18pt; font-weight:600;">MultiMC</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Copyright 2012-2014 MultiMC Contributors</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></p> @@ -430,7 +430,36 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> *</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> * This file has been put into the public domain.</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> * You can do whatever you want with this file.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> */</span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> */</span></p> +<p style="-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:8pt;"><br /></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Bitstream Vera Sans'; font-size:18pt; font-weight:600;">Java IconLoader class</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Copyright (c) 2011, Chris Molini</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">All rights reserved.</span></p> +<p style="-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:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Redistribution and use in source and binary forms, with or without</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">modification, are permitted provided that the following conditions are met:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> * Redistributions of source code must retain the above copyright</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> notice, this list of conditions and the following disclaimer.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> * Redistributions in binary form must reproduce the above copyright</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> notice, this list of conditions and the following disclaimer in the</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> documentation and/or other materials provided with the distribution.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> * Neither the name of the &lt;organization&gt; nor the</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> names of its contributors may be used to endorse or promote products</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;"> derived from this software without specific prior written permission.</span></p> +<p style="-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:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">DISCLAIMED. IN NO EVENT SHALL &lt;COPYRIGHT HOLDER&gt; BE LIABLE FOR ANY</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></p> +<p style="-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:8pt;"><br /></p> +<p style="-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:8pt;"><br /></p></body></html> @@ -442,7 +471,7 @@ p, li { white-space: pre-wrap; } 0 0 689 - 331 + 311 @@ -455,12 +484,12 @@ p, li { white-space: pre-wrap; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Bitstream Vera Sans'; font-size:11pt;">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.</span></p> -<p style="-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;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Bitstream Vera Sans'; font-size:11pt;">Part of the reason for using the Apache license is we don't want people using the &quot;MultiMC&quot; name when redistributing the project. This means people must take the time to go through the source code and remove all references to &quot;MultiMC&quot;, including but not limited to the project icon and the title of windows, (no *MultiMC-fork* in the title).</span></p> -<p style="-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;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Bitstream Vera Sans'; font-size:11pt;">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 </span><span style=" font-family:'Bitstream Vera Sans'; font-size:11pt; font-weight:600;">without</span><span style=" font-family:'Bitstream Vera Sans'; font-size:11pt;"> implying that you have our blessing.</span></p></body></html> +</style></head><body style=" font-family:'Bitstream Vera Sans'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">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.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Part of the reason for using the Apache license is we don't want people using the &quot;MultiMC&quot; name when redistributing the project. This means people must take the time to go through the source code and remove all references to &quot;MultiMC&quot;, including but not limited to the project icon and the title of windows, (no *MultiMC-fork* in the title).</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">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 <span style=" font-weight:600;">without</span> implying that you have our blessing.</p></body></html> Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse -- cgit v1.2.3 From 188d0d58865f5e134b5803bda2cd631a61cf2915 Mon Sep 17 00:00:00 2001 From: Orochimarufan Date: Fri, 17 Jan 2014 22:55:10 +0100 Subject: Improve Console window output. -> Log Pre- and Post-Launch command happenings -> Enable the java part to specify the level TODO: fix logging with mc 1.7's log4j logging infrastructure Signed-off-by: Orochimarufan --- gui/ConsoleWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gui') diff --git a/gui/ConsoleWindow.cpp b/gui/ConsoleWindow.cpp index 54a74bde..dc36a8ff 100644 --- a/gui/ConsoleWindow.cpp +++ b/gui/ConsoleWindow.cpp @@ -140,6 +140,9 @@ void ConsoleWindow::write(QString data, MessageLevel::Enum mode) else if (mode == MessageLevel::Debug) while (iter.hasNext()) writeColor(iter.next(), "green"); + else if (mode == MessageLevel::PrePost) + while (iter.hasNext()) + writeColor(iter.next(), "grey"); // TODO: implement other MessageLevels else while (iter.hasNext()) -- cgit v1.2.3 From 8650aa81f06d9e229764b200f1dca135412c2ec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 18 Jan 2014 10:22:32 +0100 Subject: Fix settings dialog when offline --- gui/dialogs/SettingsDialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gui') diff --git a/gui/dialogs/SettingsDialog.cpp b/gui/dialogs/SettingsDialog.cpp index b90434b0..ef363f02 100644 --- a/gui/dialogs/SettingsDialog.cpp +++ b/gui/dialogs/SettingsDialog.cpp @@ -269,6 +269,10 @@ void SettingsDialog::refreshUpdateChannelDesc() // Get the channel list. QList channelList = MMC->updateChecker()->getChannelList(); int selectedIndex = ui->updateChannelComboBox->currentIndex(); + if(selectedIndex < 0) + { + return; + } if (selectedIndex < channelList.count()) { // Find the channel list entry with the given index. -- cgit v1.2.3 From e6ab57b8b1275137d873c0c465aeffe61c13c324 Mon Sep 17 00:00:00 2001 From: Sky Date: Sun, 19 Jan 2014 01:33:32 +0000 Subject: Try to improve status arrows a bit --- gui/MainWindow.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gui') diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index d5cc1d44..cca1ecac 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -522,10 +522,13 @@ void MainWindow::updateNewsLabel() static QString convertStatus(const QString &status) { - if(status == "green") return "↑"; - else if(status == "yellow") return "-"; - else if(status == "red") return "↓"; - else return "?"; + QString ret = "?"; + + if(status == "green") ret = "↑"; + else if(status == "yellow") ret = "-"; + else if(status == "red") ret="↓"; + + return "" + ret + ""; } void MainWindow::reloadStatus() -- cgit v1.2.3 From d8413fa5ec594455b3cdec86899b61adba39eb33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 19 Jan 2014 04:52:34 +0100 Subject: Use icon theme so we can have more than one icon size per icon --- gui/MainWindow.cpp | 31 ++++++++++--------------------- gui/MainWindow.ui | 41 ++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 46 deletions(-) (limited to 'gui') diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index cca1ecac..7c8562cd 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -128,7 +128,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi // Add the news label to the news toolbar. { newsLabel = new QToolButton(); - newsLabel->setIcon(QIcon(":/icons/toolbar/news")); + newsLabel->setIcon(QIcon::fromTheme("news")); newsLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); newsLabel->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); ui->newsToolBar->insertWidget(ui->actionMoreNews, newsLabel); @@ -203,9 +203,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi m_statusLeft = new QLabel(tr("No instance selected"), this); m_statusRight = new QLabel(tr("No status available"), this); m_statusRefresh = new QToolButton(this); + m_statusRefresh->setCheckable(true); m_statusRefresh->setToolButtonStyle(Qt::ToolButtonIconOnly); - m_statusRefresh->setIcon( - QPixmap(":/icons/toolbar/refresh").scaled(16, 16, Qt::KeepAspectRatio)); + m_statusRefresh->setIcon(QIcon::fromTheme("refresh")); statusBar()->addPermanentWidget(m_statusLeft, 1); statusBar()->addPermanentWidget(m_statusRight, 0); @@ -241,8 +241,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi accountMenuButton->setMenu(accountMenu); accountMenuButton->setPopupMode(QToolButton::InstantPopup); accountMenuButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - accountMenuButton->setIcon( - QPixmap(":/icons/toolbar/noaccount").scaled(48, 48, Qt::KeepAspectRatio)); + accountMenuButton->setIcon(QIcon::fromTheme("noaccount")); QWidgetAction *accountMenuButtonAction = new QWidgetAction(this); accountMenuButtonAction->setDefaultWidget(accountMenuButton); @@ -408,7 +407,7 @@ void MainWindow::repopulateAccountsMenu() QAction *action = new QAction(tr("No Default Account"), this); action->setCheckable(true); - action->setIcon(QPixmap(":/icons/toolbar/noaccount").scaled(48, 48, Qt::KeepAspectRatio)); + action->setIcon(QIcon::fromTheme("noaccount")); action->setData(""); if (active_username.isEmpty()) { @@ -462,8 +461,7 @@ void MainWindow::activeAccountChanged() } // Set the icon to the "no account" icon. - accountMenuButton->setIcon( - QPixmap(":/icons/toolbar/noaccount").scaled(48, 48, Qt::KeepAspectRatio)); + accountMenuButton->setIcon(QIcon::fromTheme("noaccount")); } bool MainWindow::eventFilter(QObject *obj, QEvent *ev) @@ -533,8 +531,9 @@ static QString convertStatus(const QString &status) void MainWindow::reloadStatus() { + m_statusRefresh->setChecked(true); MMC->statusChecker()->reloadStatus(); - updateStatusUI(); + //updateStatusUI(); } static QString makeStatusString(const QMap statuses) @@ -555,16 +554,7 @@ void MainWindow::updateStatusUI() auto statuses = statusChecker->getStatusEntries(); QString status = makeStatusString(statuses); - if(statusChecker->isLoadingStatus()) - { - m_statusRefresh->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - m_statusRefresh->setText(tr("Loading...")); - } - else - { - m_statusRefresh->setToolButtonStyle(Qt::ToolButtonIconOnly); - m_statusRefresh->setText(tr("")); - } + m_statusRefresh->setChecked(false); m_statusRight->setText(status); @@ -574,8 +564,7 @@ void MainWindow::updateStatusUI() void MainWindow::updateStatusFailedUI() { m_statusRight->setText(makeStatusString(QMap())); - m_statusRefresh->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - m_statusRefresh->setText(tr("Failed.")); + m_statusRefresh->setChecked(false); statusTimer.start(60 * 1000); } diff --git a/gui/MainWindow.ui b/gui/MainWindow.ui index 16e72c2f..5653907e 100644 --- a/gui/MainWindow.ui +++ b/gui/MainWindow.ui @@ -14,7 +14,7 @@ MultiMC 5 - + :/icons/multimc/scalable/apps/multimc.svg:/icons/multimc/scalable/apps/multimc.svg @@ -152,8 +152,7 @@ - - :/icons/toolbar/new:/icons/toolbar/new + Add Instance @@ -167,8 +166,7 @@ - - :/icons/toolbar/viewfolder:/icons/toolbar/viewfolder + View Instance Folder @@ -182,8 +180,7 @@ - - :/icons/toolbar/refresh:/icons/toolbar/refresh + Refresh @@ -197,8 +194,7 @@ - - :/icons/toolbar/centralmods:/icons/toolbar/centralmods + View Central Mods Folder @@ -212,8 +208,7 @@ - - :/icons/toolbar/checkupdate:/icons/toolbar/checkupdate + Check for Updates @@ -227,8 +222,7 @@ - - :/icons/toolbar/settings:/icons/toolbar/settings + Settings @@ -245,8 +239,7 @@ - - :/icons/toolbar/bug:/icons/toolbar/bug + Report a Bug @@ -260,8 +253,7 @@ - - :/icons/toolbar/news:/icons/toolbar/news + More News @@ -278,8 +270,7 @@ - - :/icons/toolbar/about:/icons/toolbar/about + About MultiMC @@ -332,7 +323,7 @@ true - + :/icons/instances/infinity:/icons/instances/infinity @@ -472,8 +463,7 @@ true - - :/icons/toolbar/cat:/icons/toolbar/cat + Meow @@ -484,8 +474,7 @@ - - :/icons/toolbar/copy:/icons/toolbar/copy + Copy Instance @@ -508,7 +497,9 @@ - + + + -- cgit v1.2.3 From 2fe033c4a0bcdb0972046e1b55b0cf463075dc24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 19 Jan 2014 05:21:09 +0100 Subject: Move a bunch of resources into the resources folder. Also, cat is no longer mysterious. It's just FLUFFY! --- gui/MainWindow.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/MainWindow.ui b/gui/MainWindow.ui index 5653907e..25af6f60 100644 --- a/gui/MainWindow.ui +++ b/gui/MainWindow.ui @@ -469,7 +469,7 @@ Meow - <html><head/><body><p align="center"><span style=" font-weight:600; color:#ff0004;">Catnarok!</span></p><p align="center">Or just a cat with a ball of yarn?</p><p align="center"><span style=" font-style:italic;">WHO KNOWS?!</span></p><p align="center"><img src=":/icons/instances/tnt"/></p></body></html> + <html><head/><body><p align="center">It's a fluffy kitty :3</p></body></html> -- cgit v1.2.3 From 3a3c9ac9515447941d383f2c4fe4b0225fdd8252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 20 Jan 2014 01:14:11 +0100 Subject: Update the changelog, version, scale the instance icon --- gui/MainWindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gui') diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index 7c8562cd..ee9c3fad 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -830,7 +830,7 @@ void MainWindow::on_actionChangeInstIcon_triggered() if (dlg.result() == QDialog::Accepted) { m_selectedInstance->setIconKey(dlg.selectedIconKey); - auto ico = MMC->icons()->getIcon(dlg.selectedIconKey); + auto ico = MMC->icons()->getBigIcon(dlg.selectedIconKey); ui->actionChangeInstIcon->setIcon(ico); } } @@ -839,14 +839,14 @@ void MainWindow::iconUpdated(QString icon) { if(icon == m_currentInstIcon) { - ui->actionChangeInstIcon->setIcon(MMC->icons()->getIcon(m_currentInstIcon)); + ui->actionChangeInstIcon->setIcon(MMC->icons()->getBigIcon(m_currentInstIcon)); } } void MainWindow::updateInstanceToolIcon(QString new_icon) { m_currentInstIcon = new_icon; - ui->actionChangeInstIcon->setIcon(MMC->icons()->getIcon(m_currentInstIcon)); + ui->actionChangeInstIcon->setIcon(MMC->icons()->getBigIcon(m_currentInstIcon)); } void MainWindow::setSelectedInstanceById(const QString &id) -- cgit v1.2.3