summaryrefslogtreecommitdiffhomepage
path: root/gui/options-dialog.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-11-18 18:43:35 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-11-18 18:43:35 +0100
commit7cb57c1c72bd4dfd56367a7f1130de0dbd5415d5 (patch)
treed48a7d02990b8ebf80bf74f42cde5d8f59421b48 /gui/options-dialog.cpp
parent3e0038ee3e35fc161624a3c3f94daf3d4fd824b9 (diff)
gui: allow for disabling translation
Diffstat (limited to 'gui/options-dialog.cpp')
-rw-r--r--gui/options-dialog.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index 8f248dcf..79e0c2a0 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -36,6 +36,11 @@ QString OptionsDialog::kopts_to_string(const key_opts& kopts)
return tr("None");
}
+void OptionsDialog::set_disable_translation_state(bool value)
+{
+ QSettings(OPENTRACK_ORG).setValue("disable-translation", value);
+}
+
OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) :
pause_keybindings(pause_keybindings)
{
@@ -89,6 +94,8 @@ OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) :
tie_setting(main.tracklogging_enabled, ui.tracklogging_enabled);
+ ui.disable_translation->setChecked(QSettings(OPENTRACK_ORG).value("disable-translation", false).toBool());
+
struct tmp
{
key_opts& opt;
@@ -170,6 +177,7 @@ void OptionsDialog::doOK()
{
main.b->save();
ui.game_detector->save();
+ set_disable_translation_state(ui.disable_translation->isChecked());
close();
emit closing();
}