From 68bfc3aac7014f88b36a10288a72128f40c4a1b5 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Tue, 11 Jul 2017 04:02:04 +0000 Subject: [PATCH] #148: Add setting to UI. --- src/app-configuration.defaults | 1 + src/controller/settings.py | 2 ++ src/wxUI/dialogs/configuration.py | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/app-configuration.defaults b/src/app-configuration.defaults index 6900ef98..97fe6ebe 100644 --- a/src/app-configuration.defaults +++ b/src/app-configuration.defaults @@ -17,6 +17,7 @@ log_level = string(default="error") load_keymap = string(default="default.keymap") donation_dialog_displayed = boolean(default=False) check_for_updates = boolean(default=True) +paranoid = boolean(default=False) [proxy] type = string(default="Direct connection") diff --git a/src/controller/settings.py b/src/controller/settings.py index 0247fd03..519332c5 100644 --- a/src/controller/settings.py +++ b/src/controller/settings.py @@ -72,6 +72,7 @@ class globalSettingsController(object): self.dialog.set_value("general", "disable_sapi5", config.app["app-settings"]["voice_enabled"]) self.dialog.set_value("general", "hide_gui", config.app["app-settings"]["hide_gui"]) self.dialog.set_value("general", "check_for_updates", config.app["app-settings"]["check_for_updates"]) + self.dialog.set_value("general", "paranoid", config.app["app-settings"]["paranoid"]) proxyTypes=config.proxyTypes self.dialog.create_proxy([_("Direct connection")]+proxyTypes) if config.app["proxy"]["type"] not in proxyTypes: @@ -110,6 +111,7 @@ class globalSettingsController(object): config.app["app-settings"]["play_ready_sound"] = self.dialog.get_value("general", "play_ready_sound") config.app["app-settings"]["speak_ready_msg"] = self.dialog.get_value("general", "speak_ready_msg") config.app["app-settings"]["check_for_updates"] = self.dialog.get_value("general", "check_for_updates") + config.app["app-settings"]["paranoid"] = self.dialog.get_value("general", "paranoid") if config.app["proxy"]["type"]!=self.dialog.get_value("proxy", "type") or config.app["proxy"]["server"] != self.dialog.get_value("proxy", "server") or config.app["proxy"]["port"] != self.dialog.get_value("proxy", "port") or config.app["proxy"]["user"] != self.dialog.get_value("proxy", "user") or config.app["proxy"]["password"] != self.dialog.get_value("proxy", "password"): if self.is_started == True: self.needs_restart = True diff --git a/src/wxUI/dialogs/configuration.py b/src/wxUI/dialogs/configuration.py index 444fb300..a62e870d 100644 --- a/src/wxUI/dialogs/configuration.py +++ b/src/wxUI/dialogs/configuration.py @@ -45,6 +45,8 @@ class general(wx.Panel, baseDialog.BaseWXDialog): kmbox.Add(self.km, 0, wx.ALL, 5) self.check_for_updates = wx.CheckBox(self, -1, _("Check for updates when {0} launches").format(application.name,)) sizer.Add(self.check_for_updates, 0, wx.ALL, 5) + self.paranoid = wx.CheckBox(self, -1, _("Require re-authorization of all accounts when {0} is restarted").format(application.name,)) + sizer.Add(self.paranoid, 0, wx.ALL, 5) sizer.Add(kmbox, 0, wx.ALL, 5) self.SetSizer(sizer)