mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-04-20 01:21:45 -04:00
#148: Add setting to UI.
This commit is contained in:
parent
d4646ced9f
commit
68bfc3aac7
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user