aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/settings/SettingsGeneral.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/settings/SettingsGeneral.cpp')
-rw-r--r--src/ui/settings/SettingsGeneral.cpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/ui/settings/SettingsGeneral.cpp b/src/ui/settings/SettingsGeneral.cpp
index a5ae124e..c0db08a5 100644
--- a/src/ui/settings/SettingsGeneral.cpp
+++ b/src/ui/settings/SettingsGeneral.cpp
@@ -204,8 +204,9 @@ void GeneralTab::setSettings() {
try {
std::string lang_key = settings.lookup("general.lang");
QString lang_value = lang.value(lang_key.c_str());
+ LOG(INFO) << "lang settings current" << lang_value.toStdString();
if (!lang.empty()) {
- langSelectBox->setCurrentIndex(langSelectBox->findText(lang_value));
+ langSelectBox->setCurrentIndex(langSelectBox->findText(lang_key.c_str()));
}
} catch (...) {
LOG(ERROR) << _("Setting Operation Error") << _("lang");
@@ -272,33 +273,29 @@ void GeneralTab::applySettings() {
#endif
#ifdef MULTI_LANG_SUPPORT
-
if (!general.exists("lang"))
general.add("lang", libconfig::Setting::TypeBoolean) =
langSelectBox->currentText().toStdString();
else {
general["lang"] = langSelectBox->currentText().toStdString();
- }
-
#endif
#ifdef SERVER_SUPPORT
- settings.setValue(
- "general/ownKeyId",
- QString::fromStdString(keyIdsList[ownKeySelectBox->currentIndex()]));
+ settings.setValue(
+ "general/ownKeyId",
+ QString::fromStdString(keyIdsList[ownKeySelectBox->currentIndex()]));
- settings.setValue("general/serviceToken",
- QString::fromStdString(serviceToken));
+ settings.setValue("general/serviceToken",
+ QString::fromStdString(serviceToken));
#endif
- if (!general.exists("confirm_import_keys"))
- general.add("confirm_import_keys", libconfig::Setting::TypeBoolean) =
- importConfirmationCheckBox->isChecked();
- else {
- general["confirm_import_keys"] = importConfirmationCheckBox->isChecked();
+ if (!general.exists("confirm_import_keys"))
+ general.add("confirm_import_keys", libconfig::Setting::TypeBoolean) =
+ importConfirmationCheckBox->isChecked();
+ else {
+ general["confirm_import_keys"] = importConfirmationCheckBox->isChecked();
+ }
}
-
- GlobalSettingStation::GetInstance().Sync();
}
#ifdef MULTI_LANG_SUPPORT