Merge pull request #678 from Scrumplex/improvements-around-proprietary-services
This commit is contained in:
@ -1,9 +1,28 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
/*
|
||||
* PolyMC - Minecraft Launcher
|
||||
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "ModDownloadDialog.h"
|
||||
|
||||
#include <BaseVersion.h>
|
||||
#include <icons/IconList.h>
|
||||
#include <InstanceList.h>
|
||||
|
||||
#include "Application.h"
|
||||
#include "ProgressDialog.h"
|
||||
#include "ReviewMessageBox.h"
|
||||
|
||||
@ -100,13 +119,13 @@ void ModDownloadDialog::accept()
|
||||
|
||||
QList<BasePage *> ModDownloadDialog::getPages()
|
||||
{
|
||||
modrinthPage = new ModrinthModPage(this, m_instance);
|
||||
flameModPage = new FlameModPage(this, m_instance);
|
||||
return
|
||||
{
|
||||
modrinthPage,
|
||||
flameModPage
|
||||
};
|
||||
QList<BasePage *> pages;
|
||||
|
||||
pages.append(new ModrinthModPage(this, m_instance));
|
||||
if (APPLICATION->currentCapabilities() & Application::SupportsFlame)
|
||||
pages.append(new FlameModPage(this, m_instance));
|
||||
|
||||
return pages;
|
||||
}
|
||||
|
||||
void ModDownloadDialog::addSelectedMod(const QString& name, ModDownloadTask* task)
|
||||
|
@ -1,3 +1,21 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
/*
|
||||
* PolyMC - Minecraft Launcher
|
||||
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
@ -48,9 +66,6 @@ private:
|
||||
QDialogButtonBox * m_buttons = nullptr;
|
||||
QVBoxLayout *m_verticalLayout = nullptr;
|
||||
|
||||
|
||||
ModrinthModPage *modrinthPage = nullptr;
|
||||
FlameModPage *flameModPage = nullptr;
|
||||
QHash<QString, ModDownloadTask*> modTask;
|
||||
BaseInstance *m_instance;
|
||||
};
|
||||
|
@ -150,20 +150,21 @@ void NewInstanceDialog::accept()
|
||||
|
||||
QList<BasePage *> NewInstanceDialog::getPages()
|
||||
{
|
||||
QList<BasePage *> pages;
|
||||
|
||||
importPage = new ImportPage(this);
|
||||
flamePage = new FlamePage(this);
|
||||
auto technicPage = new TechnicPage(this);
|
||||
return
|
||||
{
|
||||
new VanillaPage(this),
|
||||
importPage,
|
||||
new AtlPage(this),
|
||||
flamePage,
|
||||
new FtbPage(this),
|
||||
new LegacyFTB::Page(this),
|
||||
new ModrinthPage(this),
|
||||
technicPage
|
||||
};
|
||||
|
||||
pages.append(new VanillaPage(this));
|
||||
pages.append(importPage);
|
||||
pages.append(new AtlPage(this));
|
||||
if (APPLICATION->currentCapabilities() & Application::SupportsFlame)
|
||||
pages.append(new FlamePage(this));
|
||||
pages.append(new FtbPage(this));
|
||||
pages.append(new LegacyFTB::Page(this));
|
||||
pages.append(new ModrinthPage(this));
|
||||
pages.append(new TechnicPage(this));
|
||||
|
||||
return pages;
|
||||
}
|
||||
|
||||
QString NewInstanceDialog::dialogTitle()
|
||||
|
@ -1,16 +1,36 @@
|
||||
/* Copyright 2013-2021 MultiMC Contributors
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
/*
|
||||
* PolyMC - Minecraft Launcher
|
||||
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
|
||||
*
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
@ -69,7 +89,6 @@ private:
|
||||
|
||||
QString InstIconKey;
|
||||
ImportPage *importPage = nullptr;
|
||||
FlamePage *flamePage = nullptr;
|
||||
std::unique_ptr<InstanceTask> creationTask;
|
||||
|
||||
bool importIcon = false;
|
||||
|
Reference in New Issue
Block a user