Fix "Auto Login" instance specific setting, tweak UI
This commit is contained in:
parent
605423b8e4
commit
51dee3745f
@ -537,7 +537,7 @@ void MainWindow::instanceActivated(QModelIndex index)
|
|||||||
|
|
||||||
NagUtils::checkJVMArgs(MMC->settings()->get("JvmArgs").toString(), this);
|
NagUtils::checkJVMArgs(MMC->settings()->get("JvmArgs").toString(), this);
|
||||||
|
|
||||||
bool autoLogin = MMC->settings()->get("AutoLogin").toBool();
|
bool autoLogin = inst->settings().get("AutoLogin").toBool();
|
||||||
if (autoLogin)
|
if (autoLogin)
|
||||||
doAutoLogin();
|
doAutoLogin();
|
||||||
else
|
else
|
||||||
@ -826,7 +826,7 @@ void MainWindow::on_actionInstanceSettings_triggered()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
InstanceSettings settings(&m_selectedInstance->settings(), this);
|
InstanceSettings settings(&m_selectedInstance->settings(), this);
|
||||||
settings.setWindowTitle(QString("Instance settings"));
|
settings.setWindowTitle(tr("Instance settings"));
|
||||||
settings.exec();
|
settings.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,11 +89,11 @@ void InstanceSettings::applySettings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Auto Login
|
// Auto Login
|
||||||
bool login = ui->accountSettingsGroupBox->isChecked();
|
bool login = ui->accountSettingsBox->isChecked();
|
||||||
m_obj->set("OverrideLogin", login);
|
m_obj->set("OverrideLogin", login);
|
||||||
if (login)
|
if (login)
|
||||||
{
|
{
|
||||||
m_obj->set("AutoLogin", ui->autoLoginChecBox->isChecked());
|
m_obj->set("AutoLogin", ui->autoLoginCheckBox->isChecked());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -159,8 +159,8 @@ void InstanceSettings::loadSettings()
|
|||||||
ui->windowHeightSpinBox->setValue(m_obj->get("MinecraftWinHeight").toInt());
|
ui->windowHeightSpinBox->setValue(m_obj->get("MinecraftWinHeight").toInt());
|
||||||
|
|
||||||
// Auto Login
|
// Auto Login
|
||||||
ui->accountSettingsGroupBox->setChecked(m_obj->get("OverrideLogin").toBool());
|
ui->accountSettingsBox->setChecked(m_obj->get("OverrideLogin").toBool());
|
||||||
ui->autoLoginChecBox->setChecked(m_obj->get("AutoLogin").toBool());
|
ui->autoLoginCheckBox->setChecked(m_obj->get("AutoLogin").toBool());
|
||||||
|
|
||||||
// Memory
|
// Memory
|
||||||
ui->memoryGroupBox->setChecked(m_obj->get("OverrideMemory").toBool());
|
ui->memoryGroupBox->setChecked(m_obj->get("OverrideMemory").toBool());
|
||||||
|
@ -132,7 +132,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="accountSettingsGroupBox">
|
<widget class="QGroupBox" name="accountSettingsBox">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -147,16 +147,10 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="autoLoginChecBox">
|
<widget class="QCheckBox" name="autoLoginCheckBox">
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Login automatically when an instance icon is double clicked?</string>
|
<string>Login automatically when an instance icon is double clicked?</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -403,8 +397,7 @@
|
|||||||
<tabstop>consoleSettingsBox</tabstop>
|
<tabstop>consoleSettingsBox</tabstop>
|
||||||
<tabstop>showConsoleCheck</tabstop>
|
<tabstop>showConsoleCheck</tabstop>
|
||||||
<tabstop>autoCloseConsoleCheck</tabstop>
|
<tabstop>autoCloseConsoleCheck</tabstop>
|
||||||
<tabstop>accountSettingsGroupBox</tabstop>
|
<tabstop>accountSettingsBox</tabstop>
|
||||||
<tabstop>autoLoginChecBox</tabstop>
|
|
||||||
<tabstop>memoryGroupBox</tabstop>
|
<tabstop>memoryGroupBox</tabstop>
|
||||||
<tabstop>minMemSpinBox</tabstop>
|
<tabstop>minMemSpinBox</tabstop>
|
||||||
<tabstop>maxMemSpinBox</tabstop>
|
<tabstop>maxMemSpinBox</tabstop>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<enum>QTabWidget::Rounded</enum>
|
<enum>QTabWidget::Rounded</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="generalTab">
|
<widget class="QWidget" name="generalTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -261,6 +261,12 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="accountSettingsBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Account Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="autoLoginCheckBox">
|
<widget class="QCheckBox" name="autoLoginCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -268,6 +274,9 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacerMinecraft">
|
<spacer name="verticalSpacerMinecraft">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -515,7 +524,6 @@
|
|||||||
<tabstop>windowHeightSpinBox</tabstop>
|
<tabstop>windowHeightSpinBox</tabstop>
|
||||||
<tabstop>showConsoleCheck</tabstop>
|
<tabstop>showConsoleCheck</tabstop>
|
||||||
<tabstop>autoCloseConsoleCheck</tabstop>
|
<tabstop>autoCloseConsoleCheck</tabstop>
|
||||||
<tabstop>autoLoginCheckBox</tabstop>
|
|
||||||
<tabstop>minMemSpinBox</tabstop>
|
<tabstop>minMemSpinBox</tabstop>
|
||||||
<tabstop>maxMemSpinBox</tabstop>
|
<tabstop>maxMemSpinBox</tabstop>
|
||||||
<tabstop>permGenSpinBox</tabstop>
|
<tabstop>permGenSpinBox</tabstop>
|
||||||
|
Loading…
Reference in New Issue
Block a user