| 78 | } |
| 79 | |
| 80 | void OwnSettingsLayout::custom_lang_DefaultKey() { |
| 81 | std::vector<std::string> lang_opts = { cfg::Strings.GetString(521) }; |
| 82 | for(u32 i = 0; i < static_cast<u32>(Language::Count); i++) { |
| 83 | lang_opts.push_back(LanguageNameList[i]); |
| 84 | } |
| 85 | lang_opts.push_back(cfg::Strings.GetString(18)); |
| 86 | |
| 87 | const auto option = g_MainApplication->DisplayDialog(cfg::Strings.GetString(441), cfg::Strings.GetString(443), lang_opts, true); |
| 88 | if(option >= 0) { |
| 89 | if(option == 0) { |
| 90 | g_Settings.lang = Language::Auto; |
| 91 | } |
| 92 | else { |
| 93 | g_Settings.lang = static_cast<Language>(option - 1); |
| 94 | } |
| 95 | SaveChanges(true); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | void OwnSettingsLayout::use_12h_time_DefaultKey() { |
| 100 | g_Settings.json_settings.general.value().use_12h_time.value() = !g_Settings.json_settings.general.value().use_12h_time.value(); |
nothing calls this directly
no test coverage detected