Mercurial > minori
annotate include/core/config.h @ 112:80f49f623d30
locale: allow switching locales without restarting
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 06 Nov 2023 13:41:30 -0500 |
parents | 2004b41d4a59 |
children | ab191e28e69d |
rev | line source |
---|---|
9 | 1 #ifndef __core__config_h |
2 #define __core__config_h | |
85 | 3 |
9 | 4 #include "core/anime.h" |
102 | 5 #include "gui/theme.h" |
108 | 6 #include "gui/locale.h" |
9 | 7 |
8 class Config { | |
9 public: | |
10 int Load(); | |
11 int Save(); | |
12 | |
13 Anime::Services service; | |
102 | 14 Theme::Theme theme; |
108 | 15 Locale::Locale locale; |
9 | 16 |
17 struct { | |
18 public: | |
19 Anime::TitleLanguage language; | |
20 bool display_aired_episodes; | |
21 bool display_available_episodes; | |
22 bool highlight_anime_if_available; | |
23 bool highlighted_anime_above_others; | |
24 } anime_list; | |
25 | |
26 struct { | |
27 public: | |
28 std::string auth_token; | |
29 std::string username; | |
30 int user_id; | |
31 } anilist; | |
32 }; | |
11 | 33 |
102 | 34 #define WIDEIFY_EX(x) L##x |
35 #define WIDEIFY(x) WIDEIFY_EX(x) | |
63 | 36 #define CONFIG_DIR "minori" |
102 | 37 #define CONFIG_WDIR WIDEIFY(CONFIG_DIR) |
101
c537996cf67b
*: multitude of config changes
Paper <mrpapersonic@gmail.com>
parents:
85
diff
changeset
|
38 #define CONFIG_NAME "config.ini" |
102 | 39 #define CONFIG_WNAME WIDEIFY(CONFIG_NAME) |
62 | 40 |
9 | 41 #define MAX_LINE_LENGTH 256 |
85 | 42 |
9 | 43 #endif // __core__config_h |