aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui
diff options
context:
space:
mode:
authorflow <thiagodonato300@gmail.com>2022-03-24 18:24:51 -0300
committerflow <thiagodonato300@gmail.com>2022-03-24 18:24:51 -0300
commite13ca94061c7fdfec9bd18b982b56a8d5a1f80b0 (patch)
treec04986ab61f789e4a01b854c374dc8ee15f4dffa /launcher/ui
parentda43ed8ce1d804fe20c44788577a0387a698ed6e (diff)
parent92f3154e8f7c1421541a00ae7cf57f188cfe46a5 (diff)
downloadPrismLauncher-e13ca94061c7fdfec9bd18b982b56a8d5a1f80b0.tar.gz
PrismLauncher-e13ca94061c7fdfec9bd18b982b56a8d5a1f80b0.tar.bz2
PrismLauncher-e13ca94061c7fdfec9bd18b982b56a8d5a1f80b0.zip
chore: resolve conflicts and merge upstream
Diffstat (limited to 'launcher/ui')
-rw-r--r--launcher/ui/MainWindow.cpp21
-rw-r--r--launcher/ui/dialogs/ExportInstanceDialog.cpp40
-rw-r--r--launcher/ui/dialogs/MSALoginDialog.cpp40
-rw-r--r--launcher/ui/dialogs/NewInstanceDialog.ui6
-rw-r--r--launcher/ui/dialogs/OfflineLoginDialog.cpp9
-rw-r--r--launcher/ui/dialogs/OfflineLoginDialog.h1
-rw-r--r--launcher/ui/dialogs/OfflineLoginDialog.ui13
-rw-r--r--launcher/ui/instanceview/InstanceDelegate.cpp2
-rw-r--r--launcher/ui/pages/BasePage.h42
-rw-r--r--launcher/ui/pages/global/APIPage.cpp46
-rw-r--r--launcher/ui/pages/global/APIPage.h42
-rw-r--r--launcher/ui/pages/global/APIPage.ui7
-rw-r--r--launcher/ui/pages/global/AccountListPage.cpp46
-rw-r--r--launcher/ui/pages/global/AccountListPage.h42
-rw-r--r--launcher/ui/pages/global/CustomCommandsPage.cpp41
-rw-r--r--launcher/ui/pages/global/CustomCommandsPage.h41
-rw-r--r--launcher/ui/pages/global/ExternalToolsPage.cpp45
-rw-r--r--launcher/ui/pages/global/ExternalToolsPage.h41
-rw-r--r--launcher/ui/pages/global/JavaPage.cpp45
-rw-r--r--launcher/ui/pages/global/JavaPage.h41
-rw-r--r--launcher/ui/pages/global/LanguagePage.cpp44
-rw-r--r--launcher/ui/pages/global/LanguagePage.h43
-rw-r--r--launcher/ui/pages/global/LauncherPage.cpp45
-rw-r--r--launcher/ui/pages/global/LauncherPage.h41
-rw-r--r--launcher/ui/pages/global/MinecraftPage.cpp45
-rw-r--r--launcher/ui/pages/global/MinecraftPage.h41
-rw-r--r--launcher/ui/pages/global/ProxyPage.cpp45
-rw-r--r--launcher/ui/pages/global/ProxyPage.h41
-rw-r--r--launcher/ui/pages/instance/GameOptionsPage.cpp40
-rw-r--r--launcher/ui/pages/instance/GameOptionsPage.h41
-rw-r--r--launcher/ui/pages/instance/InstanceSettingsPage.cpp42
-rw-r--r--launcher/ui/pages/instance/InstanceSettingsPage.h41
-rw-r--r--launcher/ui/pages/instance/LogPage.cpp40
-rw-r--r--launcher/ui/pages/instance/LogPage.h41
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.cpp50
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.h41
-rw-r--r--launcher/ui/pages/instance/NotesPage.cpp40
-rw-r--r--launcher/ui/pages/instance/NotesPage.h41
-rw-r--r--launcher/ui/pages/instance/OtherLogsPage.cpp45
-rw-r--r--launcher/ui/pages/instance/OtherLogsPage.h42
-rw-r--r--launcher/ui/pages/instance/ResourcePackPage.h35
-rw-r--r--launcher/ui/pages/instance/ScreenshotsPage.cpp40
-rw-r--r--launcher/ui/pages/instance/ScreenshotsPage.h41
-rw-r--r--launcher/ui/pages/instance/ServersPage.cpp40
-rw-r--r--launcher/ui/pages/instance/ServersPage.h41
-rw-r--r--launcher/ui/pages/instance/ShaderPackPage.h35
-rw-r--r--launcher/ui/pages/instance/TexturePackPage.h35
-rw-r--r--launcher/ui/pages/instance/VersionPage.cpp47
-rw-r--r--launcher/ui/pages/instance/VersionPage.h41
-rw-r--r--launcher/ui/pages/instance/WorldListPage.cpp45
-rw-r--r--launcher/ui/pages/instance/WorldListPage.h41
-rw-r--r--launcher/ui/pages/modplatform/ImportPage.cpp40
-rw-r--r--launcher/ui/pages/modplatform/ImportPage.h41
-rw-r--r--launcher/ui/pages/modplatform/ModPage.cpp7
-rw-r--r--launcher/ui/pages/modplatform/ModPage.h2
-rw-r--r--launcher/ui/pages/modplatform/ModPage.ui2
-rw-r--r--launcher/ui/pages/modplatform/VanillaPage.cpp40
-rw-r--r--launcher/ui/pages/modplatform/VanillaPage.h42
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp46
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlPage.h42
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlPage.ui2
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.cpp35
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.h39
-rw-r--r--launcher/ui/pages/modplatform/flame/FlamePage.cpp40
-rw-r--r--launcher/ui/pages/modplatform/flame/FlamePage.h43
-rw-r--r--launcher/ui/pages/modplatform/flame/FlamePage.ui2
-rw-r--r--launcher/ui/pages/modplatform/ftb/FtbPage.cpp46
-rw-r--r--launcher/ui/pages/modplatform/ftb/FtbPage.h43
-rw-r--r--launcher/ui/pages/modplatform/ftb/FtbPage.ui2
-rw-r--r--launcher/ui/pages/modplatform/legacy_ftb/Page.cpp40
-rw-r--r--launcher/ui/pages/modplatform/legacy_ftb/Page.h43
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp35
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthPage.h39
-rw-r--r--launcher/ui/pages/modplatform/technic/TechnicPage.cpp45
-rw-r--r--launcher/ui/pages/modplatform/technic/TechnicPage.h43
-rw-r--r--launcher/ui/pages/modplatform/technic/TechnicPage.ui2
-rw-r--r--launcher/ui/setupwizard/JavaWizardPage.cpp2
-rw-r--r--launcher/ui/widgets/CustomCommands.cpp39
-rw-r--r--launcher/ui/widgets/CustomCommands.h41
-rw-r--r--launcher/ui/widgets/CustomCommands.ui2
-rw-r--r--launcher/ui/widgets/JavaSettingsWidget.cpp4
-rw-r--r--launcher/ui/widgets/PageContainer.cpp58
-rw-r--r--launcher/ui/widgets/PageContainer.h43
83 files changed, 2338 insertions, 513 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 7b758e05..47c469e9 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -273,8 +273,8 @@ public:
{
mainToolBar = TranslatedToolbar(MainWindow);
mainToolBar->setObjectName(QStringLiteral("mainToolBar"));
- mainToolBar->setMovable(false);
- mainToolBar->setAllowedAreas(Qt::TopToolBarArea);
+ mainToolBar->setMovable(true);
+ mainToolBar->setAllowedAreas(Qt::TopToolBarArea | Qt::BottomToolBarArea);
mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
mainToolBar->setFloatable(false);
mainToolBar.setWindowTitleId(QT_TRANSLATE_NOOP("MainWindow", "Main Toolbar"));
@@ -347,7 +347,7 @@ public:
actionMATRIX = TranslatedAction(MainWindow);
actionMATRIX->setObjectName(QStringLiteral("actionMATRIX"));
actionMATRIX->setIcon(APPLICATION->getThemedIcon("matrix"));
- actionMATRIX.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Matrix"));
+ actionMATRIX.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Matrix space"));
actionMATRIX.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 Matrix space"));
all_actions.append(&actionMATRIX);
helpMenu->addAction(actionMATRIX);
@@ -357,7 +357,7 @@ public:
actionDISCORD = TranslatedAction(MainWindow);
actionDISCORD->setObjectName(QStringLiteral("actionDISCORD"));
actionDISCORD->setIcon(APPLICATION->getThemedIcon("discord"));
- actionDISCORD.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Discord"));
+ actionDISCORD.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Discord guild"));
actionDISCORD.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 Discord guild."));
all_actions.append(&actionDISCORD);
helpMenu->addAction(actionDISCORD);
@@ -367,7 +367,7 @@ public:
actionREDDIT = TranslatedAction(MainWindow);
actionREDDIT->setObjectName(QStringLiteral("actionREDDIT"));
actionREDDIT->setIcon(APPLICATION->getThemedIcon("reddit-alien"));
- actionREDDIT.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Reddit"));
+ actionREDDIT.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Subreddit"));
actionREDDIT.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 subreddit."));
all_actions.append(&actionREDDIT);
helpMenu->addAction(actionREDDIT);
@@ -442,8 +442,8 @@ public:
{
newsToolBar = TranslatedToolbar(MainWindow);
newsToolBar->setObjectName(QStringLiteral("newsToolBar"));
- newsToolBar->setMovable(false);
- newsToolBar->setAllowedAreas(Qt::BottomToolBarArea);
+ newsToolBar->setMovable(true);
+ newsToolBar->setAllowedAreas(Qt::TopToolBarArea | Qt::BottomToolBarArea);
newsToolBar->setIconSize(QSize(16, 16));
newsToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
newsToolBar->setFloatable(false);
@@ -467,6 +467,7 @@ public:
instanceToolBar->setObjectName(QStringLiteral("instanceToolBar"));
// disabled until we have an instance selected
instanceToolBar->setEnabled(false);
+ instanceToolBar->setMovable(true);
instanceToolBar->setAllowedAreas(Qt::LeftToolBarArea | Qt::RightToolBarArea);
instanceToolBar->setToolButtonStyle(Qt::ToolButtonTextOnly);
instanceToolBar->setFloatable(false);
@@ -565,7 +566,7 @@ public:
actionViewSelectedMCFolder = TranslatedAction(MainWindow);
actionViewSelectedMCFolder->setObjectName(QStringLiteral("actionViewSelectedMCFolder"));
actionViewSelectedMCFolder.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Minecraft Folder"));
- actionViewSelectedMCFolder.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the selected instance's minecraft folder in a file browser."));
+ actionViewSelectedMCFolder.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the selected instance's Minecraft folder in a file browser."));
all_actions.append(&actionViewSelectedMCFolder);
instanceToolBar->addAction(actionViewSelectedMCFolder);
@@ -603,7 +604,7 @@ public:
actionDeleteInstance = TranslatedAction(MainWindow);
actionDeleteInstance->setObjectName(QStringLiteral("actionDeleteInstance"));
- actionDeleteInstance.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Delete"));
+ actionDeleteInstance.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Delete Instance"));
actionDeleteInstance.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Delete the selected instance."));
all_actions.append(&actionDeleteInstance);
instanceToolBar->addAction(actionDeleteInstance);
@@ -1567,7 +1568,7 @@ void MainWindow::deleteGroup()
QString groupName = map["group"].toString();
if(!groupName.isEmpty())
{
- auto reply = QMessageBox::question(this, tr("Delete group"), tr("Are you sure you want to delete the group %1")
+ auto reply = QMessageBox::question(this, tr("Delete group"), tr("Are you sure you want to delete the group %1?")
.arg(groupName), QMessageBox::Yes | QMessageBox::No);
if(reply == QMessageBox::Yes)
{
diff --git a/launcher/ui/dialogs/ExportInstanceDialog.cpp b/launcher/ui/dialogs/ExportInstanceDialog.cpp
index f3bf7abe..5fac1015 100644
--- a/launcher/ui/dialogs/ExportInstanceDialog.cpp
+++ b/launcher/ui/dialogs/ExportInstanceDialog.cpp
@@ -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.
*/
#include "ExportInstanceDialog.h"
diff --git a/launcher/ui/dialogs/MSALoginDialog.cpp b/launcher/ui/dialogs/MSALoginDialog.cpp
index 174ad46c..b11b6980 100644
--- a/launcher/ui/dialogs/MSALoginDialog.cpp
+++ b/launcher/ui/dialogs/MSALoginDialog.cpp
@@ -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.
*/
#include "MSALoginDialog.h"
diff --git a/launcher/ui/dialogs/NewInstanceDialog.ui b/launcher/ui/dialogs/NewInstanceDialog.ui
index 7fb19ff5..8ca0b786 100644
--- a/launcher/ui/dialogs/NewInstanceDialog.ui
+++ b/launcher/ui/dialogs/NewInstanceDialog.ui
@@ -44,7 +44,11 @@
</widget>
</item>
<item row="0" column="2">
- <widget class="QLineEdit" name="instNameTextBox"/>
+ <widget class="QLineEdit" name="instNameTextBox">
+ <property name="maxLength">
+ <number>128</number>
+ </property>
+ </widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="nameLabel">
diff --git a/launcher/ui/dialogs/OfflineLoginDialog.cpp b/launcher/ui/dialogs/OfflineLoginDialog.cpp
index 345ed40a..4f3d8be4 100644
--- a/launcher/ui/dialogs/OfflineLoginDialog.cpp
+++ b/launcher/ui/dialogs/OfflineLoginDialog.cpp
@@ -42,6 +42,15 @@ void OfflineLoginDialog::setUserInputsEnabled(bool enable)
ui->buttonBox->setEnabled(enable);
}
+void OfflineLoginDialog::on_allowLongUsernames_stateChanged(int value)
+{
+ if (value == Qt::Checked) {
+ ui->userTextBox->setMaxLength(INT_MAX);
+ } else {
+ ui->userTextBox->setMaxLength(16);
+ }
+}
+
// Enable the OK button only when the textbox contains something.
void OfflineLoginDialog::on_userTextBox_textEdited(const QString &newText)
{
diff --git a/launcher/ui/dialogs/OfflineLoginDialog.h b/launcher/ui/dialogs/OfflineLoginDialog.h
index 5e608379..fdb3d91f 100644
--- a/launcher/ui/dialogs/OfflineLoginDialog.h
+++ b/launcher/ui/dialogs/OfflineLoginDialog.h
@@ -35,6 +35,7 @@ slots:
void onTaskProgress(qint64 current, qint64 total);
void on_userTextBox_textEdited(const QString &newText);
+ void on_allowLongUsernames_stateChanged(int value);
private:
Ui::OfflineLoginDialog *ui;
diff --git a/launcher/ui/dialogs/OfflineLoginDialog.ui b/launcher/ui/dialogs/OfflineLoginDialog.ui
index d8964a2e..4633cbe3 100644
--- a/launcher/ui/dialogs/OfflineLoginDialog.ui
+++ b/launcher/ui/dialogs/OfflineLoginDialog.ui
@@ -35,12 +35,25 @@
</item>
<item>
<widget class="QLineEdit" name="userTextBox">
+ <property name="maxLength">
+ <number>16</number>
+ </property>
<property name="placeholderText">
<string>Username</string>
</property>
</widget>
</item>
<item>
+ <widget class="QCheckBox" name="allowLongUsernames">
+ <property name="toolTip">
+ <string>Usernames longer tha