feat: add language setting

This commit is contained in:
Curve 2021-06-17 16:49:39 +02:00
parent 95d3b30210
commit 19ef2bb0c0
No known key found for this signature in database
GPG Key ID: 460F6C466BD35813
2 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@ namespace Soundux
Enums::BackendType audioBackend = Enums::BackendType::PulseAudio; Enums::BackendType audioBackend = Enums::BackendType::PulseAudio;
Enums::ViewMode viewMode = Enums::ViewMode::List; Enums::ViewMode viewMode = Enums::ViewMode::List;
Enums::Theme theme = Enums::Theme::System; Enums::Theme theme = Enums::Theme::System;
std::optional<std::string> language;
std::vector<Key> pushToTalkKeys; std::vector<Key> pushToTalkKeys;
std::vector<Key> stopHotkey; std::vector<Key> stopHotkey;

View File

@ -152,6 +152,7 @@ namespace nlohmann
{"theme", obj.theme}, {"theme", obj.theme},
{"outputs", obj.outputs}, {"outputs", obj.outputs},
{"viewMode", obj.viewMode}, {"viewMode", obj.viewMode},
{"language", obj.language},
{"stopHotkey", obj.stopHotkey}, {"stopHotkey", obj.stopHotkey},
{"syncVolumes", obj.syncVolumes}, {"syncVolumes", obj.syncVolumes},
{"selectedTab", obj.selectedTab}, {"selectedTab", obj.selectedTab},
@ -199,6 +200,7 @@ namespace nlohmann
{ {
get_to_safe(j, "theme", obj.theme); get_to_safe(j, "theme", obj.theme);
get_to_safe(j, "outputs", obj.outputs); get_to_safe(j, "outputs", obj.outputs);
get_to_safe(j, "language", obj.language);
get_to_safe(j, "viewMode", obj.viewMode); get_to_safe(j, "viewMode", obj.viewMode);
get_to_safe(j, "stopHotkey", obj.stopHotkey); get_to_safe(j, "stopHotkey", obj.stopHotkey);
get_to_safe(j, "localVolume", obj.localVolume); get_to_safe(j, "localVolume", obj.localVolume);