summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Groman <tgroman@nuegia.net>2019-09-19 01:11:17 -0700
committerThomas Groman <tgroman@nuegia.net>2019-09-19 01:11:17 -0700
commit0eac6faf8cb4ca66884487581eb4df2e44ce1a63 (patch)
tree9be57568777fb7657ff1c6ee94bddcdc0d825768
parent4c27a7cbe5f994b0616189e67042bc51c79c2547 (diff)
downloadMultiMC-0eac6faf8cb4ca66884487581eb4df2e44ce1a63.tar
MultiMC-0eac6faf8cb4ca66884487581eb4df2e44ce1a63.tar.gz
MultiMC-0eac6faf8cb4ca66884487581eb4df2e44ce1a63.tar.lz
MultiMC-0eac6faf8cb4ca66884487581eb4df2e44ce1a63.tar.xz
MultiMC-0eac6faf8cb4ca66884487581eb4df2e44ce1a63.zip
fixed leftover merge conflict
-rw-r--r--application/pages/global/MultiMCPage.cpp213
1 files changed, 0 insertions, 213 deletions
diff --git a/application/pages/global/MultiMCPage.cpp b/application/pages/global/MultiMCPage.cpp
index d10d4caa..613203bb 100644
--- a/application/pages/global/MultiMCPage.cpp
+++ b/application/pages/global/MultiMCPage.cpp
@@ -215,208 +215,6 @@ void MultiMCPage::refreshUpdateChannelDesc()
void MultiMCPage::applySettings()
{
-<<<<<<< HEAD
- auto s = MMC->settings();
-
- // Language
- s->set("Language", ui->languageBox->itemData(ui->languageBox->currentIndex()).toString());
-
- if (ui->resetNotificationsBtn->isChecked())
- {
- s->set("ShownNotifications", QString());
- }
-
- // Updates
- s->set("AutoUpdate", ui->autoUpdateCheckBox->isChecked());
- s->set("UpdateChannel", m_currentUpdateChannel);
- auto original = s->get("IconTheme").toString();
- //FIXME: make generic
- switch (ui->themeComboBox->currentIndex())
- {
- case 1:
- s->set("IconTheme", "pe_dark");
- break;
- case 2:
- s->set("IconTheme", "pe_light");
- break;
- case 3:
- s->set("IconTheme", "pe_blue");
- break;
- case 4:
- s->set("IconTheme", "pe_colored");
- break;
- case 5:
- s->set("IconTheme", "OSX");
- break;
- case 6:
- s->set("IconTheme", "iOS");
- break;
- case 7:
- s->set("IconTheme", "flat");
- break;
- case 8:
- s->set("IconTheme", "custom");
- break;
- case 0:
- default:
- s->set("IconTheme", "multimc");
- break;
- }
-
- if(original != s->get("IconTheme"))
- {
- MMC->setIconTheme(s->get("IconTheme").toString());
- }
-
- auto originalAppTheme = s->get("ApplicationTheme").toString();
- auto newAppTheme = ui->themeComboBoxColors->currentData().toString();
- if(originalAppTheme != newAppTheme)
- {
- s->set("ApplicationTheme", newAppTheme);
- MMC->setApplicationTheme(newAppTheme, false);
- }
-
- // Console settings
- s->set("ShowConsole", ui->showConsoleCheck->isChecked());
- s->set("AutoCloseConsole", ui->autoCloseConsoleCheck->isChecked());
- s->set("ShowConsoleOnError", ui->showConsoleErrorCheck->isChecked());
- QString consoleFontFamily = ui->consoleFont->currentFont().family();
- s->set("ConsoleFont", consoleFontFamily);
- s->set("ConsoleFontSize", ui->fontSizeBox->value());
- s->set("ConsoleMaxLines", ui->lineLimitSpinBox->value());
- s->set("ConsoleOverflowStop", ui->checkStopLogging->checkState() != Qt::Unchecked);
-
- // Folders
- // TODO: Offer to move instances to new instance folder.
- s->set("InstanceDir", ui->instDirTextBox->text());
- s->set("CentralModsDir", ui->modsDirTextBox->text());
- s->set("IconsDir", ui->iconsDirTextBox->text());
-
- auto sortMode = (InstSortMode)ui->sortingModeGroup->checkedId();
- switch (sortMode)
- {
- case Sort_LastLaunch:
- s->set("InstSortMode", "LastLaunch");
- break;
- case Sort_Name:
- default:
- s->set("InstSortMode", "Name");
- break;
- }
-
-/* // Analytics
- if(!BuildConfig.ANALYTICS_ID.isEmpty())
- {
- s->set("Analytics", ui->analyticsCheck->isChecked());
- } */
-}
-void MultiMCPage::loadSettings()
-{
- auto s = MMC->settings();
- // Language
- {
- ui->languageBox->setModel(m_languageModel.get());
- ui->languageBox->setCurrentIndex(ui->languageBox->findData(s->get("Language").toString()));
- }
-
- // Updates
- ui->autoUpdateCheckBox->setChecked(s->get("AutoUpdate").toBool());
- m_currentUpdateChannel = s->get("UpdateChannel").toString();
- //FIXME: make generic
- auto theme = s->get("IconTheme").toString();
- if (theme == "pe_dark")
- {
- ui->themeComboBox->setCurrentIndex(1);
- }
- else if (theme == "pe_light")
- {
- ui->themeComboBox->setCurrentIndex(2);
- }
- else if (theme == "pe_blue")
- {
- ui->themeComboBox->setCurrentIndex(3);
- }
- else if (theme == "pe_colored")
- {
- ui->themeComboBox->setCurrentIndex(4);
- }
- else if (theme == "OSX")
- {
- ui->themeComboBox->setCurrentIndex(5);
- }
- else if (theme == "iOS")
- {
- ui->themeComboBox->setCurrentIndex(6);
- }
- else if (theme == "flat")
- {
- ui->themeComboBox->setCurrentIndex(7);
- }
- else if (theme == "custom")
- {
- ui->themeComboBox->setCurrentIndex(8);
- }
- else
- {
- ui->themeComboBox->setCurrentIndex(0);
- }
-
- {
- auto currentTheme = s->get("ApplicationTheme").toString();
- auto themes = MMC->getValidApplicationThemes();
- int idx = 0;
- for(auto &theme: themes)
- {
- ui->themeComboBoxColors->addItem(theme->name(), theme->id());
- if(currentTheme == theme->id())
- {
- ui->themeComboBoxColors->setCurrentIndex(idx);
- }
- idx++;
- }
- }
-
- // Console settings
- ui->showConsoleCheck->setChecked(s->get("ShowConsole").toBool());
- ui->autoCloseConsoleCheck->setChecked(s->get("AutoCloseConsole").toBool());
- ui->showConsoleErrorCheck->setChecked(s->get("ShowConsoleOnError").toBool());
- QString fontFamily = MMC->settings()->get("ConsoleFont").toString();
- QFont consoleFont(fontFamily);
- ui->consoleFont->setCurrentFont(consoleFont);
-
- bool conversionOk = true;
- int fontSize = MMC->settings()->get("ConsoleFontSize").toInt(&conversionOk);
- if(!conversionOk)
- {
- fontSize = 11;
- }
- ui->fontSizeBox->setValue(fontSize);
- refreshFontPreview();
- ui->lineLimitSpinBox->setValue(s->get("ConsoleMaxLines").toInt());
- ui->checkStopLogging->setChecked(s->get("ConsoleOverflowStop").toBool());
-
- // Folders
- ui->instDirTextBox->setText(s->get("InstanceDir").toString());
- ui->modsDirTextBox->setText(s->get("CentralModsDir").toString());
- ui->iconsDirTextBox->setText(s->get("IconsDir").toString());
-
- QString sortMode = s->get("InstSortMode").toString();
-
- if (sortMode == "LastLaunch")
- {
- ui->sortLastLaunchedBtn->setChecked(true);
- }
- else
- {
- ui->sortByNameBtn->setChecked(true);
- }
-
-/* // Analytics
- if(!BuildConfig.ANALYTICS_ID.isEmpty())
- {
- ui->analyticsCheck->setChecked(s->get("Analytics").toBool());
- } */
-=======
auto s = MMC->settings();
if (ui->resetNotificationsBtn->isChecked())
@@ -502,11 +300,6 @@ void MultiMCPage::loadSettings()
break;
}
- // Analytics
- if(!BuildConfig.ANALYTICS_ID.isEmpty())
- {
- s->set("Analytics", ui->analyticsCheck->isChecked());
- }
}
void MultiMCPage::loadSettings()
{
@@ -603,12 +396,6 @@ void MultiMCPage::loadSettings()
ui->sortByNameBtn->setChecked(true);
}
- // Analytics
- if(!BuildConfig.ANALYTICS_ID.isEmpty())
- {
- ui->analyticsCheck->setChecked(s->get("Analytics").toBool());
- }
->>>>>>> origin/stable
}
void MultiMCPage::refreshFontPreview()