NOISSUE remove obsolete LWJGL folder setting

This commit is contained in:
Petr Mrázek 2017-09-20 23:43:55 +02:00
parent ba3cbb7330
commit 102804ef82
4 changed files with 3 additions and 41 deletions

View File

@ -427,7 +427,6 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
// Folders // Folders
m_settings->registerSetting("InstanceDir", "instances"); m_settings->registerSetting("InstanceDir", "instances");
m_settings->registerSetting({"CentralModsDir", "ModsDir"}, "mods"); m_settings->registerSetting({"CentralModsDir", "ModsDir"}, "mods");
m_settings->registerSetting({"LWJGLDir", "LwjglDir"}, "lwjgl");
m_settings->registerSetting("IconsDir", "icons"); m_settings->registerSetting("IconsDir", "icons");
// Editors // Editors

View File

@ -149,18 +149,6 @@ void MultiMCPage::on_modsDirBrowseBtn_clicked()
ui->modsDirTextBox->setText(cooked_dir); ui->modsDirTextBox->setText(cooked_dir);
} }
} }
void MultiMCPage::on_lwjglDirBrowseBtn_clicked()
{
QString raw_dir = QFileDialog::getExistingDirectory(this, tr("LWJGL Folder"),
ui->lwjglDirTextBox->text());
QString cooked_dir = FS::NormalizePath(raw_dir);
// do not allow current dir - it's dirty. Do not allow dirs that don't exist
if (!cooked_dir.isEmpty() && QDir(cooked_dir).exists())
{
ui->lwjglDirTextBox->setText(cooked_dir);
}
}
void MultiMCPage::languageIndexChanged(int index) void MultiMCPage::languageIndexChanged(int index)
{ {
@ -320,7 +308,6 @@ void MultiMCPage::applySettings()
// TODO: Offer to move instances to new instance folder. // TODO: Offer to move instances to new instance folder.
s->set("InstanceDir", ui->instDirTextBox->text()); s->set("InstanceDir", ui->instDirTextBox->text());
s->set("CentralModsDir", ui->modsDirTextBox->text()); s->set("CentralModsDir", ui->modsDirTextBox->text());
s->set("LWJGLDir", ui->lwjglDirTextBox->text());
s->set("IconsDir", ui->iconsDirTextBox->text()); s->set("IconsDir", ui->iconsDirTextBox->text());
auto sortMode = (InstSortMode)ui->sortingModeGroup->checkedId(); auto sortMode = (InstSortMode)ui->sortingModeGroup->checkedId();
@ -425,7 +412,6 @@ void MultiMCPage::loadSettings()
// Folders // Folders
ui->instDirTextBox->setText(s->get("InstanceDir").toString()); ui->instDirTextBox->setText(s->get("InstanceDir").toString());
ui->modsDirTextBox->setText(s->get("CentralModsDir").toString()); ui->modsDirTextBox->setText(s->get("CentralModsDir").toString());
ui->lwjglDirTextBox->setText(s->get("LWJGLDir").toString());
ui->iconsDirTextBox->setText(s->get("IconsDir").toString()); ui->iconsDirTextBox->setText(s->get("IconsDir").toString());
QString sortMode = s->get("InstSortMode").toString(); QString sortMode = s->get("InstSortMode").toString();

View File

@ -66,7 +66,6 @@ private
slots: slots:
void on_instDirBrowseBtn_clicked(); void on_instDirBrowseBtn_clicked();
void on_modsDirBrowseBtn_clicked(); void on_modsDirBrowseBtn_clicked();
void on_lwjglDirBrowseBtn_clicked();
void on_iconsDirBrowseBtn_clicked(); void on_iconsDirBrowseBtn_clicked();
void languageIndexChanged(int index); void languageIndexChanged(int index);

View File

@ -127,9 +127,6 @@
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLineEdit" name="modsDirTextBox"/> <widget class="QLineEdit" name="modsDirTextBox"/>
</item> </item>
<item row="2" column="1">
<widget class="QLineEdit" name="lwjglDirTextBox"/>
</item>
<item row="1" column="2"> <item row="1" column="2">
<widget class="QToolButton" name="modsDirBrowseBtn"> <widget class="QToolButton" name="modsDirBrowseBtn">
<property name="text"> <property name="text">
@ -137,27 +134,10 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="1">
<widget class="QLabel" name="labelLWJGLDir">
<property name="text">
<string notr="true">LW&amp;JGL:</string>
</property>
<property name="buddy">
<cstring>lwjglDirTextBox</cstring>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QToolButton" name="lwjglDirBrowseBtn">
<property name="text">
<string notr="true">...</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="iconsDirTextBox"/> <widget class="QLineEdit" name="iconsDirTextBox"/>
</item> </item>
<item row="3" column="0"> <item row="2" column="0">
<widget class="QLabel" name="labelIconsDir"> <widget class="QLabel" name="labelIconsDir">
<property name="text"> <property name="text">
<string>&amp;Icons:</string> <string>&amp;Icons:</string>
@ -167,7 +147,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="2"> <item row="2" column="2">
<widget class="QToolButton" name="iconsDirBrowseBtn"> <widget class="QToolButton" name="iconsDirBrowseBtn">
<property name="text"> <property name="text">
<string notr="true">...</string> <string notr="true">...</string>
@ -580,8 +560,6 @@
<tabstop>instDirBrowseBtn</tabstop> <tabstop>instDirBrowseBtn</tabstop>
<tabstop>modsDirTextBox</tabstop> <tabstop>modsDirTextBox</tabstop>
<tabstop>modsDirBrowseBtn</tabstop> <tabstop>modsDirBrowseBtn</tabstop>
<tabstop>lwjglDirTextBox</tabstop>
<tabstop>lwjglDirBrowseBtn</tabstop>
<tabstop>iconsDirTextBox</tabstop> <tabstop>iconsDirTextBox</tabstop>
<tabstop>iconsDirBrowseBtn</tabstop> <tabstop>iconsDirBrowseBtn</tabstop>
<tabstop>resetNotificationsBtn</tabstop> <tabstop>resetNotificationsBtn</tabstop>