Mercurial > minori
annotate src/gui/dialog/settings/application.cc @ 221:53211cb1e7f5
library: add initial library stuff
nice
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Mon, 08 Jan 2024 13:21:08 -0500 |
parents | 975a3f0965e2 |
children | ff0061e75f0f |
rev | line source |
---|---|
10 | 1 #include "core/session.h" |
108 | 2 #include "core/strings.h" |
10 | 3 #include "gui/dialog/settings.h" |
102 | 4 #include "gui/theme.h" |
108 | 5 #include "gui/locale.h" |
189 | 6 #include "gui/translate/anime.h" |
7 | |
10 | 8 #include <QCheckBox> |
9 #include <QComboBox> | |
10 #include <QGroupBox> | |
68
2417121d894e
*: normalize usage of layouts
Paper <mrpapersonic@gmail.com>
parents:
62
diff
changeset
|
11 #include <QHBoxLayout> |
2417121d894e
*: normalize usage of layouts
Paper <mrpapersonic@gmail.com>
parents:
62
diff
changeset
|
12 #include <QLabel> |
10 | 13 #include <QPushButton> |
14 #include <QSizePolicy> | |
68
2417121d894e
*: normalize usage of layouts
Paper <mrpapersonic@gmail.com>
parents:
62
diff
changeset
|
15 #include <QVBoxLayout> |
189 | 16 |
108 | 17 #include <algorithm> |
10 | 18 |
19 QWidget* SettingsPageApplication::CreateAnimeListWidget() { | |
20 QWidget* result = new QWidget(this); | |
105
6d8da6e64d61
theme: add dark stylesheet, make it actually usable
Paper <mrpapersonic@gmail.com>
parents:
102
diff
changeset
|
21 result->setAutoFillBackground(true); |
10 | 22 result->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); |
23 | |
108 | 24 QVBoxLayout* full_layout = new QVBoxLayout(result); |
10 | 25 |
108 | 26 { |
27 /* Actions */ | |
28 QGroupBox* actions_group_box = new QGroupBox(tr("Actions"), result); | |
29 actions_group_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); | |
30 | |
31 QHBoxLayout* actions_layout = new QHBoxLayout(actions_group_box); | |
10 | 32 |
108 | 33 { |
34 /* Actions/Double click */ | |
35 QWidget* double_click_widget = new QWidget(actions_group_box); | |
36 QLabel* dc_combo_box_label = new QLabel(tr("Double click:"), double_click_widget); | |
37 QComboBox* dc_combo_box = new QComboBox(double_click_widget); | |
38 dc_combo_box->addItem(tr("View anime info")); | |
10 | 39 |
108 | 40 QVBoxLayout* double_click_layout = new QVBoxLayout(double_click_widget); |
41 double_click_layout->addWidget(dc_combo_box_label); | |
42 double_click_layout->addWidget(dc_combo_box); | |
43 double_click_layout->setContentsMargins(0, 0, 0, 0); | |
44 | |
45 actions_layout->addWidget(double_click_widget); | |
46 } | |
47 | |
48 { | |
49 /* Actions/Middle click */ | |
50 QWidget* middle_click_widget = new QWidget(actions_group_box); | |
51 QLabel* mc_combo_box_label = new QLabel(tr("Middle click:"), middle_click_widget); | |
52 QComboBox* mc_combo_box = new QComboBox(middle_click_widget); | |
53 mc_combo_box->addItem(tr("Play next episode")); | |
10 | 54 |
108 | 55 QVBoxLayout* middle_click_layout = new QVBoxLayout(middle_click_widget); |
56 middle_click_layout->addWidget(mc_combo_box_label); | |
57 middle_click_layout->addWidget(mc_combo_box); | |
58 middle_click_layout->setContentsMargins(0, 0, 0, 0); | |
59 | |
60 actions_layout->addWidget(middle_click_widget); | |
61 } | |
10 | 62 |
108 | 63 full_layout->addWidget(actions_group_box); |
64 } | |
65 | |
66 { | |
67 /* Appearance */ | |
68 QGroupBox* appearance_group_box = new QGroupBox(tr("Appearance"), result); | |
69 appearance_group_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); | |
70 | |
71 QVBoxLayout* appearance_layout = new QVBoxLayout(appearance_group_box); | |
10 | 72 |
108 | 73 { |
74 /* Title language */ | |
75 { | |
76 QLabel* lang_combo_box_label = new QLabel(tr("Title language preference:"), appearance_group_box); | |
77 appearance_layout->addWidget(lang_combo_box_label); | |
78 } | |
79 { | |
80 QComboBox* lang_combo_box = new QComboBox(appearance_group_box); | |
81 lang_combo_box->addItem(tr("Romaji")); | |
82 lang_combo_box->addItem(tr("Native")); | |
83 lang_combo_box->addItem(tr("English")); | |
84 connect(lang_combo_box, QOverload<int>::of(&QComboBox::currentIndexChanged), this, | |
85 [this](int index) { language = static_cast<Anime::TitleLanguage>(index); }); | |
86 lang_combo_box->setCurrentIndex(static_cast<int>(language)); | |
87 appearance_layout->addWidget(lang_combo_box); | |
88 } | |
89 } | |
10 | 90 |
108 | 91 { |
92 /* Application theme */ | |
93 { | |
189 | 94 QLabel* rating_combo_box_label = new QLabel(tr("Rating system:"), appearance_group_box); |
95 appearance_layout->addWidget(rating_combo_box_label); | |
187
9613d72b097e
*: multiple performance improvements
Paper <mrpapersonic@gmail.com>
parents:
112
diff
changeset
|
96 } |
9613d72b097e
*: multiple performance improvements
Paper <mrpapersonic@gmail.com>
parents:
112
diff
changeset
|
97 |
9613d72b097e
*: multiple performance improvements
Paper <mrpapersonic@gmail.com>
parents:
112
diff
changeset
|
98 { |
189 | 99 QComboBox* rating_combo_box = new QComboBox(appearance_group_box); |
100 | |
101 for (const auto& score_format : Anime::ScoreFormats) | |
102 rating_combo_box->addItem(Strings::ToQString(Translate::ToLocalString(score_format)), static_cast<int>(score_format)); | |
103 | |
104 connect(rating_combo_box, QOverload<int>::of(&QComboBox::currentIndexChanged), this, | |
105 [this, rating_combo_box](int index) { format = static_cast<Anime::ScoreFormat>(rating_combo_box->itemData(index).toInt()); }); | |
106 | |
107 rating_combo_box->setCurrentIndex(static_cast<int>(format)); | |
108 appearance_layout->addWidget(rating_combo_box); | |
187
9613d72b097e
*: multiple performance improvements
Paper <mrpapersonic@gmail.com>
parents:
112
diff
changeset
|
109 } |
9613d72b097e
*: multiple performance improvements
Paper <mrpapersonic@gmail.com>
parents:
112
diff
changeset
|
110 } |
9613d72b097e
*: multiple performance improvements
Paper <mrpapersonic@gmail.com>
parents:
112
diff
changeset
|
111 |
9613d72b097e
*: multiple performance improvements
Paper <mrpapersonic@gmail.com>
parents:
112
diff
changeset
|
112 { |
108 | 113 /* Hopefully I made this easy to parse... */ |
114 QCheckBox* hl_above_anime_box = new QCheckBox(tr("Display highlighted anime above others"), appearance_group_box); | |
115 hl_above_anime_box->setCheckState(highlighted_anime_above_others ? Qt::Checked : Qt::Unchecked); | |
116 hl_above_anime_box->setEnabled(highlight_anime_if_available); | |
117 hl_above_anime_box->setContentsMargins(10, 0, 0, 0); | |
118 | |
119 connect(hl_above_anime_box, &QCheckBox::stateChanged, this, | |
120 [this](int state) { highlight_anime_if_available = !(state == Qt::Unchecked); }); | |
10 | 121 |
108 | 122 { |
123 /* This is here because the above checkbox actually depends on it to be checked. */ | |
124 QCheckBox* hl_anime_box = new QCheckBox(tr("Highlight anime if next episode is available in library folders"), appearance_group_box); | |
125 hl_anime_box->setCheckState(highlight_anime_if_available ? Qt::Checked : Qt::Unchecked); | |
10 | 126 |
108 | 127 connect(hl_anime_box, &QCheckBox::stateChanged, this, [this, hl_above_anime_box](int state) { |
128 highlight_anime_if_available = !(state == Qt::Unchecked); | |
129 hl_above_anime_box->setEnabled(state); | |
130 }); | |
131 | |
132 appearance_layout->addWidget(hl_anime_box); | |
133 } | |
134 | |
135 appearance_layout->addWidget(hl_above_anime_box); | |
136 } | |
137 | |
138 full_layout->addWidget(appearance_group_box); | |
139 } | |
10 | 140 |
108 | 141 { |
142 /* Progress */ | |
143 QGroupBox* progress_group_box = new QGroupBox(tr("Progress"), result); | |
144 progress_group_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); | |
145 | |
146 QVBoxLayout* progress_layout = new QVBoxLayout(progress_group_box); | |
10 | 147 |
108 | 148 { |
149 QCheckBox* progress_display_aired_episodes = | |
150 new QCheckBox(tr("Display aired episodes (estimated)"), progress_group_box); | |
151 connect(progress_display_aired_episodes, &QCheckBox::stateChanged, this, | |
152 [this](int state) { display_aired_episodes = !(state == Qt::Unchecked); }); | |
153 progress_display_aired_episodes->setCheckState(display_aired_episodes ? Qt::Checked : Qt::Unchecked); | |
154 progress_layout->addWidget(progress_display_aired_episodes); | |
155 } | |
156 { | |
157 QCheckBox* progress_display_available_episodes = | |
158 new QCheckBox(tr("Display available episodes in library folders"), progress_group_box); | |
159 connect(progress_display_available_episodes, &QCheckBox::stateChanged, this, | |
160 [this](int state) { display_available_episodes = !(state == Qt::Unchecked); }); | |
161 progress_display_available_episodes->setCheckState(display_available_episodes ? Qt::Checked : Qt::Unchecked); | |
162 progress_layout->addWidget(progress_display_available_episodes); | |
163 } | |
10 | 164 |
108 | 165 full_layout->addWidget(progress_group_box); |
166 } | |
10 | 167 |
168 full_layout->setSpacing(10); | |
169 full_layout->addStretch(); | |
68
2417121d894e
*: normalize usage of layouts
Paper <mrpapersonic@gmail.com>
parents:
62
diff
changeset
|
170 |
10 | 171 return result; |
172 } | |
173 | |
195
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
174 QWidget* SettingsPageApplication::CreateGeneralWidget() { |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
175 QWidget* result = new QWidget(this); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
176 result->setAutoFillBackground(true); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
177 result->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
178 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
179 QVBoxLayout* full_layout = new QVBoxLayout(result); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
180 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
181 { |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
182 /* Appearance */ |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
183 QGroupBox* appearance_group_box = new QGroupBox(tr("Appearance"), result); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
184 appearance_group_box->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
185 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
186 QVBoxLayout* appearance_layout = new QVBoxLayout(appearance_group_box); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
187 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
188 { |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
189 /* Application theme */ |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
190 { |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
191 QLabel* theme_combo_box_label = new QLabel(tr("Application theme:"), appearance_group_box); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
192 appearance_layout->addWidget(theme_combo_box_label); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
193 } |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
194 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
195 { |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
196 QComboBox* theme_combo_box = new QComboBox(appearance_group_box); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
197 theme_combo_box->addItem(tr("Default")); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
198 theme_combo_box->addItem(tr("Light")); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
199 theme_combo_box->addItem(tr("Dark")); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
200 connect(theme_combo_box, QOverload<int>::of(&QComboBox::currentIndexChanged), this, |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
201 [this](int index) { theme = static_cast<Themes>(index); }); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
202 theme_combo_box->setCurrentIndex(static_cast<int>(theme)); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
203 appearance_layout->addWidget(theme_combo_box); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
204 } |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
205 } |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
206 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
207 { |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
208 /* Application locale */ |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
209 { |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
210 QLabel* locale_combo_box_label = new QLabel(tr("Application locale:"), appearance_group_box); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
211 appearance_layout->addWidget(locale_combo_box_label); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
212 } |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
213 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
214 { |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
215 QComboBox* locale_combo_box = new QComboBox(appearance_group_box); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
216 const auto& available_locales = session.config.locale.GetAvailableLocales(); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
217 for (const auto& l : available_locales) |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
218 locale_combo_box->addItem(Strings::ToQString(Locale::GetLocaleFullName(l)), l); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
219 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
220 connect(locale_combo_box, QOverload<int>::of(&QComboBox::currentIndexChanged), this, |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
221 [this, locale_combo_box](int) { locale = locale_combo_box->currentData().toLocale(); }); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
222 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
223 for (size_t i = 0; i < available_locales.size(); i++) |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
224 if (available_locales[i] == locale) |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
225 locale_combo_box->setCurrentIndex(i); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
226 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
227 appearance_layout->addWidget(locale_combo_box); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
228 } |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
229 } |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
230 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
231 full_layout->addWidget(appearance_group_box); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
232 } |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
233 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
234 full_layout->setSpacing(10); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
235 full_layout->addStretch(); |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
236 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
237 return result; |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
238 } |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
239 |
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
240 |
10 | 241 void SettingsPageApplication::SaveInfo() { |
242 session.config.anime_list.language = language; | |
243 session.config.anime_list.highlighted_anime_above_others = highlighted_anime_above_others; | |
244 session.config.anime_list.highlight_anime_if_available = highlight_anime_if_available; | |
245 session.config.anime_list.display_aired_episodes = display_aired_episodes; | |
246 session.config.anime_list.display_available_episodes = display_available_episodes; | |
102 | 247 session.config.theme.SetTheme(theme); |
108 | 248 session.config.locale.SetActiveLocale(locale); |
10 | 249 } |
250 | |
251 SettingsPageApplication::SettingsPageApplication(QWidget* parent) : SettingsPage(parent, tr("Application")) { | |
252 language = session.config.anime_list.language; | |
189 | 253 format = session.config.anime_list.score_format; |
102 | 254 theme = session.config.theme.GetTheme(); |
108 | 255 locale = session.config.locale.GetLocale(); |
10 | 256 highlighted_anime_above_others = session.config.anime_list.highlighted_anime_above_others; |
257 highlight_anime_if_available = session.config.anime_list.highlight_anime_if_available; | |
258 display_aired_episodes = session.config.anime_list.display_aired_episodes; | |
259 display_available_episodes = session.config.anime_list.display_available_episodes; | |
195
975a3f0965e2
locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents:
189
diff
changeset
|
260 AddTab(CreateGeneralWidget(), tr("General")); |
10 | 261 AddTab(CreateAnimeListWidget(), tr("Anime list")); |
262 } |