Mercurial > minori
comparison src/core/config.cc @ 108:2004b41d4a59
*: huge commit
1. WORKING LOCALIZATION + translation for Spanish and British English
2. idk like 2 changes for the dark theme :)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 05 Nov 2023 23:31:49 -0500 |
parents | b315f3759c56 |
children | 254b1d2b7096 |
comparison
equal
deleted
inserted
replaced
107:49c8d1976869 | 108:2004b41d4a59 |
---|---|
39 mINI::INIFile file(cfg_path.GetPath()); | 39 mINI::INIFile file(cfg_path.GetPath()); |
40 mINI::INIStructure ini; | 40 mINI::INIStructure ini; |
41 file.read(ini); | 41 file.read(ini); |
42 | 42 |
43 service = Translate::ToService(ini.get("General").get("Service")); | 43 service = Translate::ToService(ini.get("General").get("Service")); |
44 locale.SetActiveLocale(QLocale(Strings::ToQString(ini.get("General").get("Locale")))); | |
44 anime_list.language = Translate::ToLanguage(ini.get("Anime List").get("Title language")); | 45 anime_list.language = Translate::ToLanguage(ini.get("Anime List").get("Title language")); |
45 anime_list.display_aired_episodes = string_to_bool(ini.get("Anime List").get("Display only aired episodes"), true); | 46 anime_list.display_aired_episodes = string_to_bool(ini.get("Anime List").get("Display only aired episodes"), true); |
46 anime_list.display_available_episodes = string_to_bool(ini.get("Anime List").get("Display only available episodes in library"), true); | 47 anime_list.display_available_episodes = string_to_bool(ini.get("Anime List").get("Display only available episodes in library"), true); |
47 anime_list.highlight_anime_if_available = string_to_bool(ini.get("Anime List").get("Highlight anime if available"), true); | 48 anime_list.highlight_anime_if_available = string_to_bool(ini.get("Anime List").get("Highlight anime if available"), true); |
48 anime_list.highlighted_anime_above_others = string_to_bool(ini.get("Anime List").get("Display highlighted anime above others")); | 49 anime_list.highlighted_anime_above_others = string_to_bool(ini.get("Anime List").get("Display highlighted anime above others")); |
60 | 61 |
61 mINI::INIFile file(cfg_path.GetPath()); | 62 mINI::INIFile file(cfg_path.GetPath()); |
62 mINI::INIStructure ini; | 63 mINI::INIStructure ini; |
63 | 64 |
64 ini["General"]["Service"] = Translate::ToString(service); | 65 ini["General"]["Service"] = Translate::ToString(service); |
66 ini["General"]["Locale"] = Strings::ToUtf8String(locale.GetLocale().name()); | |
65 ini["Anime List"]["Title language"] = Translate::ToString(anime_list.language); | 67 ini["Anime List"]["Title language"] = Translate::ToString(anime_list.language); |
66 ini["Anime List"]["Display only aired episodes"] = bool_to_string(anime_list.display_aired_episodes); | 68 ini["Anime List"]["Display only aired episodes"] = bool_to_string(anime_list.display_aired_episodes); |
67 ini["Anime List"]["Display only available episodes in library"] = bool_to_string(anime_list.display_available_episodes); | 69 ini["Anime List"]["Display only available episodes in library"] = bool_to_string(anime_list.display_available_episodes); |
68 ini["Anime List"]["Highlight anime if available"] = bool_to_string(anime_list.highlight_anime_if_available); | 70 ini["Anime List"]["Highlight anime if available"] = bool_to_string(anime_list.highlight_anime_if_available); |
69 ini["Anime List"]["Display highlighted anime above others"] = bool_to_string(anime_list.highlighted_anime_above_others); | 71 ini["Anime List"]["Display highlighted anime above others"] = bool_to_string(anime_list.highlighted_anime_above_others); |