Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into skin_selector

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2023-10-10 19:46:27 +03:00
76 changed files with 420 additions and 1376 deletions

View File

@ -44,7 +44,6 @@
#include <QDebug>
#include "ui/dialogs/CustomMessageBox.h"
#include "ui/dialogs/LoginDialog.h"
#include "ui/dialogs/MSALoginDialog.h"
#include "ui/dialogs/OfflineLoginDialog.h"
@ -55,8 +54,7 @@ AccountListPage::AccountListPage(QWidget* parent) : QMainWindow(parent), ui(new
ui->setupUi(this);
ui->listView->setEmptyString(
tr("Welcome!\n"
"If you're new here, you can select the \"Add Microsoft\" or \"Add Mojang\" buttons to link your Microsoft and/or Mojang "
"accounts."));
"If you're new here, you can select the \"Add Microsoft\" button to link your Microsoft account."));
ui->listView->setEmptyMode(VersionListView::String);
ui->listView->setContextMenuPolicy(Qt::CustomContextMenu);
@ -65,7 +63,6 @@ AccountListPage::AccountListPage(QWidget* parent) : QMainWindow(parent), ui(new
ui->listView->setModel(m_accounts.get());
ui->listView->header()->setSectionResizeMode(AccountList::VListColumns::ProfileNameColumn, QHeaderView::Stretch);
ui->listView->header()->setSectionResizeMode(AccountList::VListColumns::NameColumn, QHeaderView::Stretch);
ui->listView->header()->setSectionResizeMode(AccountList::VListColumns::MigrationColumn, QHeaderView::ResizeToContents);
ui->listView->header()->setSectionResizeMode(AccountList::VListColumns::TypeColumn, QHeaderView::ResizeToContents);
ui->listView->header()->setSectionResizeMode(AccountList::VListColumns::StatusColumn, QHeaderView::ResizeToContents);
ui->listView->setSelectionMode(QAbstractItemView::SingleSelection);
@ -130,19 +127,6 @@ void AccountListPage::listChanged()
updateButtonStates();
}
void AccountListPage::on_actionAddMojang_triggered()
{
MinecraftAccountPtr account =
LoginDialog::newAccount(this, tr("Please enter your Mojang account email and password to add your account."));
if (account) {
m_accounts->addAccount(account);
if (m_accounts->count() == 1) {
m_accounts->setDefaultAccount(account);
}
}
}
void AccountListPage::on_actionAddMicrosoft_triggered()
{
MinecraftAccountPtr account =
@ -160,7 +144,7 @@ void AccountListPage::on_actionAddOffline_triggered()
{
if (!m_accounts->anyAccountIsValid()) {
QMessageBox::warning(this, tr("Error"),
tr("You must add a Microsoft or Mojang account that owns Minecraft before you can add an offline account."
tr("You must add a Microsoft account that owns Minecraft before you can add an offline account."
"<br><br>"
"If you have lost your account you can contact Microsoft for support."));
return;

View File

@ -70,7 +70,6 @@ class AccountListPage : public QMainWindow, public BasePage {
void retranslate() override;
public slots:
void on_actionAddMojang_triggered();
void on_actionAddMicrosoft_triggered();
void on_actionAddOffline_triggered();
void on_actionRemove_triggered();

View File

@ -53,7 +53,6 @@
<bool>false</bool>
</attribute>
<addaction name="actionAddMicrosoft"/>
<addaction name="actionAddMojang"/>
<addaction name="actionAddOffline"/>
<addaction name="actionRefresh"/>
<addaction name="actionRemove"/>
@ -62,11 +61,6 @@
<addaction name="separator"/>
<addaction name="actionManageSkins"/>
</widget>
<action name="actionAddMojang">
<property name="text">
<string>Add &amp;Mojang</string>
</property>
</action>
<action name="actionSetDefault">
<property name="text">
<string>&amp;Set Default</string>