NOISSUE debranding for real, initial work
This is probably very broken on macOS and Windows and will need a lot of work to complete fully.
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
#include <QString>
|
||||
|
||||
#include "pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
#include <Launcher.h>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@ -46,7 +46,7 @@ public:
|
||||
}
|
||||
virtual QIcon icon() const override
|
||||
{
|
||||
return MMC->getThemedIcon("settings");
|
||||
return LAUNCHER->getThemedIcon("settings");
|
||||
}
|
||||
virtual QString id() const override
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "dialogs/VersionSelectDialog.h"
|
||||
#include "JavaCommon.h"
|
||||
#include "MultiMC.h"
|
||||
#include "Launcher.h"
|
||||
|
||||
#include <java/JavaInstallList.h>
|
||||
#include <FileSystem.h>
|
||||
@ -22,8 +22,8 @@ InstanceSettingsPage::InstanceSettingsPage(BaseInstance *inst, QWidget *parent)
|
||||
auto sysMB = Sys::getSystemRam() / Sys::mebibyte;
|
||||
ui->maxMemSpinBox->setMaximum(sysMB);
|
||||
connect(ui->openGlobalJavaSettingsButton, &QCommandLinkButton::clicked, this, &InstanceSettingsPage::globalSettingsButtonClicked);
|
||||
connect(MMC, &MultiMC::globalSettingsAboutToOpen, this, &InstanceSettingsPage::applySettings);
|
||||
connect(MMC, &MultiMC::globalSettingsClosed, this, &InstanceSettingsPage::loadSettings);
|
||||
connect(LAUNCHER, &Launcher::globalSettingsAboutToOpen, this, &InstanceSettingsPage::applySettings);
|
||||
connect(LAUNCHER, &Launcher::globalSettingsClosed, this, &InstanceSettingsPage::loadSettings);
|
||||
loadSettings();
|
||||
}
|
||||
|
||||
@ -41,13 +41,13 @@ void InstanceSettingsPage::globalSettingsButtonClicked(bool)
|
||||
{
|
||||
switch(ui->settingsTabs->currentIndex()) {
|
||||
case 0:
|
||||
MMC->ShowGlobalSettings(this, "java-settings");
|
||||
LAUNCHER->ShowGlobalSettings(this, "java-settings");
|
||||
return;
|
||||
case 1:
|
||||
MMC->ShowGlobalSettings(this, "minecraft-settings");
|
||||
LAUNCHER->ShowGlobalSettings(this, "minecraft-settings");
|
||||
return;
|
||||
case 2:
|
||||
MMC->ShowGlobalSettings(this, "custom-commands");
|
||||
LAUNCHER->ShowGlobalSettings(this, "custom-commands");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -278,7 +278,7 @@ void InstanceSettingsPage::on_javaDetectBtn_clicked()
|
||||
{
|
||||
JavaInstallPtr java;
|
||||
|
||||
VersionSelectDialog vselect(MMC->javalist().get(), tr("Select a Java version"), this, true);
|
||||
VersionSelectDialog vselect(LAUNCHER->javalist().get(), tr("Select a Java version"), this, true);
|
||||
vselect.setResizeOn(2);
|
||||
vselect.exec();
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <QObjectPtr.h>
|
||||
#include "pages/BasePage.h"
|
||||
#include "JavaCommon.h"
|
||||
#include "MultiMC.h"
|
||||
#include "Launcher.h"
|
||||
|
||||
class JavaChecker;
|
||||
namespace Ui
|
||||
@ -43,7 +43,7 @@ public:
|
||||
}
|
||||
virtual QIcon icon() const override
|
||||
{
|
||||
return MMC->getThemedIcon("instance-settings");
|
||||
return LAUNCHER->getThemedIcon("instance-settings");
|
||||
}
|
||||
virtual QString id() const override
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "InstanceList.h"
|
||||
#include "minecraft/legacy/LegacyInstance.h"
|
||||
#include "minecraft/legacy/LegacyUpgradeTask.h"
|
||||
#include "MultiMC.h"
|
||||
#include "Launcher.h"
|
||||
#include "dialogs/CustomMessageBox.h"
|
||||
#include "dialogs/ProgressDialog.h"
|
||||
|
||||
@ -38,9 +38,9 @@ void LegacyUpgradePage::on_upgradeButton_clicked()
|
||||
QString newName = tr("%1 (Migrated)").arg(m_inst->name());
|
||||
auto upgradeTask = new LegacyUpgradeTask(m_inst);
|
||||
upgradeTask->setName(newName);
|
||||
upgradeTask->setGroup(MMC->instances()->getInstanceGroup(m_inst->id()));
|
||||
upgradeTask->setGroup(LAUNCHER->instances()->getInstanceGroup(m_inst->id()));
|
||||
upgradeTask->setIcon(m_inst->iconKey());
|
||||
unique_qobject_ptr<Task> task(MMC->instances()->wrapInstanceTask(upgradeTask));
|
||||
unique_qobject_ptr<Task> task(LAUNCHER->instances()->wrapInstanceTask(upgradeTask));
|
||||
runModalTask(task.get());
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "minecraft/legacy/LegacyInstance.h"
|
||||
#include "pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
#include <Launcher.h>
|
||||
#include "tasks/Task.h"
|
||||
|
||||
namespace Ui
|
||||
@ -40,7 +40,7 @@ public:
|
||||
}
|
||||
virtual QIcon icon() const override
|
||||
{
|
||||
return MMC->getThemedIcon("checkupdate");
|
||||
return LAUNCHER->getThemedIcon("checkupdate");
|
||||
}
|
||||
virtual QString id() const override
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "LogPage.h"
|
||||
#include "ui_LogPage.h"
|
||||
|
||||
#include "MultiMC.h"
|
||||
#include "Launcher.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QScrollBar>
|
||||
@ -124,9 +124,9 @@ LogPage::LogPage(InstancePtr instance, QWidget *parent)
|
||||
|
||||
// set up fonts in the log proxy
|
||||
{
|
||||
QString fontFamily = MMC->settings()->get("ConsoleFont").toString();
|
||||
QString fontFamily = LAUNCHER->settings()->get("ConsoleFont").toString();
|
||||
bool conversionOk = false;
|
||||
int fontSize = MMC->settings()->get("ConsoleFontSize").toInt(&conversionOk);
|
||||
int fontSize = LAUNCHER->settings()->get("ConsoleFontSize").toInt(&conversionOk);
|
||||
if(!conversionOk)
|
||||
{
|
||||
fontSize = 11;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "BaseInstance.h"
|
||||
#include "launch/LaunchTask.h"
|
||||
#include "pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
#include <Launcher.h>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@ -42,7 +42,7 @@ public:
|
||||
}
|
||||
virtual QIcon icon() const override
|
||||
{
|
||||
return MMC->getThemedIcon("log");
|
||||
return LAUNCHER->getThemedIcon("log");
|
||||
}
|
||||
virtual QString id() const override
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <QAbstractItemModel>
|
||||
#include <QMenu>
|
||||
|
||||
#include "MultiMC.h"
|
||||
#include "Launcher.h"
|
||||
#include "dialogs/CustomMessageBox.h"
|
||||
#include <GuiUtil.h>
|
||||
#include "minecraft/mod/ModFolderModel.h"
|
||||
@ -301,7 +301,7 @@ void ModFolderPage::on_actionAdd_triggered()
|
||||
tr("Select %1",
|
||||
"Select whatever type of files the page contains. Example: 'Loader Mods'")
|
||||
.arg(m_displayName),
|
||||
m_fileSelectionFilter.arg(m_displayName), MMC->settings()->get("CentralModsDir").toString(),
|
||||
m_fileSelectionFilter.arg(m_displayName), LAUNCHER->settings()->get("CentralModsDir").toString(),
|
||||
this->parentWidget());
|
||||
if (!list.empty())
|
||||
{
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "minecraft/MinecraftInstance.h"
|
||||
#include "pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
#include <Launcher.h>
|
||||
|
||||
class ModFolderModel;
|
||||
namespace Ui
|
||||
@ -54,7 +54,7 @@ public:
|
||||
}
|
||||
virtual QIcon icon() const override
|
||||
{
|
||||
return MMC->getThemedIcon(m_iconName);
|
||||
return LAUNCHER->getThemedIcon(m_iconName);
|
||||
}
|
||||
virtual QString id() const override
|
||||
{
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "BaseInstance.h"
|
||||
#include "pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
#include <Launcher.h>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@ -39,9 +39,9 @@ public:
|
||||
}
|
||||
virtual QIcon icon() const override
|
||||
{
|
||||
auto icon = MMC->getThemedIcon("notes");
|
||||
auto icon = LAUNCHER->getThemedIcon("notes");
|
||||
if(icon.isNull())
|
||||
icon = MMC->getThemedIcon("news");
|
||||
icon = LAUNCHER->getThemedIcon("news");
|
||||
return icon;
|
||||
}
|
||||
virtual QString id() const override
|
||||
|
@ -129,9 +129,9 @@ void OtherLogsPage::on_btnReload_clicked()
|
||||
{
|
||||
auto setPlainText = [&](const QString & text)
|
||||
{
|
||||
QString fontFamily = MMC->settings()->get("ConsoleFont").toString();
|
||||
QString fontFamily = LAUNCHER->settings()->get("ConsoleFont").toString();
|
||||
bool conversionOk = false;
|
||||
int fontSize = MMC->settings()->get("ConsoleFontSize").toInt(&conversionOk);
|
||||
int fontSize = LAUNCHER->settings()->get("ConsoleFontSize").toInt(&conversionOk);
|
||||
if(!conversionOk)
|
||||
{
|
||||
fontSize = 11;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <QWidget>
|
||||
|
||||
#include "pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
#include <Launcher.h>
|
||||
#include <pathmatcher/IPathMatcher.h>
|
||||
|
||||
namespace Ui
|
||||
@ -46,7 +46,7 @@ public:
|
||||
}
|
||||
QIcon icon() const override
|
||||
{
|
||||
return MMC->getThemedIcon("log");
|
||||
return LAUNCHER->getThemedIcon("log");
|
||||
}
|
||||
QString helpPage() const override
|
||||
{
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
|
||||
#include <MultiMC.h>
|
||||
#include <Launcher.h>
|
||||
|
||||
#include "dialogs/ProgressDialog.h"
|
||||
#include "dialogs/CustomMessageBox.h"
|
||||
@ -104,7 +104,7 @@ public:
|
||||
{
|
||||
m_thumbnailingPool.setMaxThreadCount(4);
|
||||
m_thumbnailCache = std::make_shared<SharedIconCache>();
|
||||
m_thumbnailCache->add("placeholder", MMC->getThemedIcon("screenshot-placeholder"));
|
||||
m_thumbnailCache->add("placeholder", LAUNCHER->getThemedIcon("screenshot-placeholder"));
|
||||
connect(&watcher, SIGNAL(fileChanged(QString)), SLOT(fileChanged(QString)));
|
||||
// FIXME: the watched file set is not updated when files are removed
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <QMainWindow>
|
||||
|
||||
#include "pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
#include <Launcher.h>
|
||||
|
||||
class QFileSystemModel;
|
||||
class QIdentityProxyModel;
|
||||
@ -53,7 +53,7 @@ public:
|
||||
}
|
||||
virtual QIcon icon() const override
|
||||
{
|
||||
return MMC->getThemedIcon("screenshots");
|
||||
return LAUNCHER->getThemedIcon("screenshots");
|
||||
}
|
||||
virtual QString id() const override
|
||||
{
|
||||
|
@ -324,7 +324,7 @@ public:
|
||||
if(px.loadFromData(bytes))
|
||||
return QIcon(px);
|
||||
}
|
||||
return MMC->getThemedIcon("unknown_server");
|
||||
return LAUNCHER->getThemedIcon("unknown_server");
|
||||
}
|
||||
case Qt::DisplayRole:
|
||||
return m_servers[row].m_name;
|
||||
@ -762,7 +762,7 @@ void ServersPage::on_actionMove_Down_triggered()
|
||||
void ServersPage::on_actionJoin_triggered()
|
||||
{
|
||||
const auto &address = m_model->at(currentServer)->m_address;
|
||||
MMC->launch(m_inst, true, nullptr, std::make_shared<MinecraftServerTarget>(MinecraftServerTarget::parse(address)));
|
||||
LAUNCHER->launch(m_inst, true, nullptr, std::make_shared<MinecraftServerTarget>(MinecraftServerTarget::parse(address)));
|
||||
}
|
||||
|
||||
#include "ServersPage.moc"
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <QString>
|
||||
|
||||
#include "pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
#include <Launcher.h>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@ -47,7 +47,7 @@ public:
|
||||
}
|
||||
virtual QIcon icon() const override
|
||||
{
|
||||
return MMC->getThemedIcon("unknown_server");
|
||||
return LAUNCHER->getThemedIcon("unknown_server");
|
||||
}
|
||||
virtual QString id() const override
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "MultiMC.h"
|
||||
#include "Launcher.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QLabel>
|
||||
@ -70,14 +70,14 @@ public:
|
||||
auto string = var.toString();
|
||||
if(string == "warning")
|
||||
{
|
||||
return MMC->getThemedIcon("status-yellow");
|
||||
return LAUNCHER->getThemedIcon("status-yellow");
|
||||
}
|
||||
else if(string == "error")
|
||||
{
|
||||
return MMC->getThemedIcon("status-bad");
|
||||
return LAUNCHER->getThemedIcon("status-bad");
|
||||
}
|
||||
}
|
||||
return MMC->getThemedIcon("status-good");
|
||||
return LAUNCHER->getThemedIcon("status-good");
|
||||
}
|
||||
return var;
|
||||
}
|
||||
@ -93,7 +93,7 @@ private:
|
||||
|
||||
QIcon VersionPage::icon() const
|
||||
{
|
||||
return MMC->icons()->getIcon(m_inst->iconKey());
|
||||
return LAUNCHER->icons()->getIcon(m_inst->iconKey());
|
||||
}
|
||||
bool VersionPage::shouldDisplay() const
|
||||
{
|
||||
@ -297,7 +297,7 @@ void VersionPage::on_actionInstall_mods_triggered()
|
||||
|
||||
void VersionPage::on_actionAdd_to_Minecraft_jar_triggered()
|
||||
{
|
||||
auto list = GuiUtil::BrowseForFiles("jarmod", tr("Select jar mods"), tr("Minecraft.jar mods (*.zip *.jar)"), MMC->settings()->get("CentralModsDir").toString(), this->parentWidget());
|
||||
auto list = GuiUtil::BrowseForFiles("jarmod", tr("Select jar mods"), tr("Minecraft.jar mods (*.zip *.jar)"), LAUNCHER->settings()->get("CentralModsDir").toString(), this->parentWidget());
|
||||
if(!list.empty())
|
||||
{
|
||||
m_profile->installJarMods(list);
|
||||
@ -307,7 +307,7 @@ void VersionPage::on_actionAdd_to_Minecraft_jar_triggered()
|
||||
|
||||
void VersionPage::on_actionReplace_Minecraft_jar_triggered()
|
||||
{
|
||||
auto jarPath = GuiUtil::BrowseForFile("jar", tr("Select jar"), tr("Minecraft.jar replacement (*.jar)"), MMC->settings()->get("CentralModsDir").toString(), this->parentWidget());
|
||||
auto jarPath = GuiUtil::BrowseForFile("jar", tr("Select jar"), tr("Minecraft.jar replacement (*.jar)"), LAUNCHER->settings()->get("CentralModsDir").toString(), this->parentWidget());
|
||||
if(!jarPath.isEmpty())
|
||||
{
|
||||
m_profile->installCustomJar(jarPath);
|
||||
@ -395,7 +395,7 @@ void VersionPage::on_actionChange_version_triggered()
|
||||
|
||||
void VersionPage::on_actionDownload_All_triggered()
|
||||
{
|
||||
if (!MMC->accounts()->anyAccountIsValid())
|
||||
if (!LAUNCHER->accounts()->anyAccountIsValid())
|
||||
{
|
||||
CustomMessageBox::selectable(
|
||||
this, tr("Error"),
|
||||
@ -614,7 +614,7 @@ void VersionPage::on_actionEdit_triggered()
|
||||
qWarning() << "file" << filename << "can't be opened for editing, doesn't exist!";
|
||||
return;
|
||||
}
|
||||
MMC->openJsonEditor(filename);
|
||||
LAUNCHER->openJsonEditor(filename);
|
||||
}
|
||||
|
||||
void VersionPage::on_actionRevert_triggered()
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <QInputDialog>
|
||||
#include <tools/MCEditTool.h>
|
||||
|
||||
#include "MultiMC.h"
|
||||
#include "Launcher.h"
|
||||
#include <GuiUtil.h>
|
||||
#include <QProcess>
|
||||
#include <FileSystem.h>
|
||||
@ -48,7 +48,7 @@ public:
|
||||
auto iconFile = worlds->data(sourceIndex, WorldList::IconFileRole).toString();
|
||||
if(iconFile.isNull()) {
|
||||
// NOTE: Minecraft uses the same placeholder for servers AND worlds
|
||||
return MMC->getThemedIcon("unknown_server");
|
||||
return LAUNCHER->getThemedIcon("unknown_server");
|
||||
}
|
||||
return QIcon(iconFile);
|
||||
}
|
||||
@ -218,7 +218,7 @@ void WorldListPage::on_actionCopy_Seed_triggered()
|
||||
return;
|
||||
}
|
||||
int64_t seed = m_worlds->data(index, WorldList::SeedRole).toLongLong();
|
||||
MMC->clipboard()->setText(QString::number(seed));
|
||||
LAUNCHER->clipboard()->setText(QString::number(seed));
|
||||
}
|
||||
|
||||
void WorldListPage::on_actionMCEdit_triggered()
|
||||
@ -226,7 +226,7 @@ void WorldListPage::on_actionMCEdit_triggered()
|
||||
if(m_mceditStarting)
|
||||
return;
|
||||
|
||||
auto mcedit = MMC->mcedit();
|
||||
auto mcedit = LAUNCHER->mcedit();
|
||||
|
||||
const QString mceditPath = mcedit->path();
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "minecraft/MinecraftInstance.h"
|
||||
#include "pages/BasePage.h"
|
||||
#include <MultiMC.h>
|
||||
#include <Launcher.h>
|
||||
#include <LoggedProcess.h>
|
||||
|
||||
class WorldList;
|
||||
@ -46,7 +46,7 @@ public:
|
||||
}
|
||||
virtual QIcon icon() const override
|
||||
{
|
||||
return MMC->getThemedIcon("worlds");
|
||||
return LAUNCHER->getThemedIcon("worlds");
|
||||
}
|
||||
virtual QString id() const override
|
||||
{
|
||||
|
Reference in New Issue
Block a user