From 7cb57c1c72bd4dfd56367a7f1130de0dbd5415d5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 18 Nov 2016 18:43:35 +0100 Subject: gui: allow for disabling translation --- gui/options-dialog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gui/options-dialog.cpp') 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 pause_keybindings) : pause_keybindings(pause_keybindings) { @@ -89,6 +94,8 @@ OptionsDialog::OptionsDialog(std::function 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(); } -- cgit v1.2.3