mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Merge pull request #79 from codeofdusk/postabandon1
post-abandonment : stage I
This commit is contained in:
commit
29c87dbd3f
@ -15,6 +15,7 @@ speak_ready_msg = boolean(default=True)
|
|||||||
log_level = string(default="error")
|
log_level = string(default="error")
|
||||||
load_keymap = string(default="default.keymap")
|
load_keymap = string(default="default.keymap")
|
||||||
donation_dialog_displayed = boolean(default=False)
|
donation_dialog_displayed = boolean(default=False)
|
||||||
|
check_for_updates = boolean(default=True)
|
||||||
|
|
||||||
[proxy]
|
[proxy]
|
||||||
server = string(default="")
|
server = string(default="")
|
||||||
|
@ -69,6 +69,8 @@ class globalSettingsController(object):
|
|||||||
self.dialog.set_value("proxy", "port", config.app["proxy"]["port"])
|
self.dialog.set_value("proxy", "port", config.app["proxy"]["port"])
|
||||||
self.dialog.set_value("proxy", "user", config.app["proxy"]["user"])
|
self.dialog.set_value("proxy", "user", config.app["proxy"]["user"])
|
||||||
self.dialog.set_value("proxy", "password", config.app["proxy"]["password"])
|
self.dialog.set_value("proxy", "password", config.app["proxy"]["password"])
|
||||||
|
self.dialog.create_postabandonment()
|
||||||
|
self.dialog.set_value("postabandonment", "check_for_updates", config.app["app-settings"]["check_for_updates"])
|
||||||
self.dialog.realize()
|
self.dialog.realize()
|
||||||
self.response = self.dialog.get_response()
|
self.response = self.dialog.get_response()
|
||||||
|
|
||||||
@ -99,6 +101,7 @@ class globalSettingsController(object):
|
|||||||
config.app["proxy"]["port"] = self.dialog.get_value("proxy", "port")
|
config.app["proxy"]["port"] = self.dialog.get_value("proxy", "port")
|
||||||
config.app["proxy"]["user"] = self.dialog.get_value("proxy", "user")
|
config.app["proxy"]["user"] = self.dialog.get_value("proxy", "user")
|
||||||
config.app["proxy"]["password"] = self.dialog.get_value("proxy", "password")
|
config.app["proxy"]["password"] = self.dialog.get_value("proxy", "password")
|
||||||
|
config.app["app-settings"]["check_for_updates"] = self.dialog.get_value("postabandonment", "check_for_updates")
|
||||||
config.app.write()
|
config.app.write()
|
||||||
|
|
||||||
class accountSettingsController(globalSettingsController):
|
class accountSettingsController(globalSettingsController):
|
||||||
|
@ -70,7 +70,8 @@ def setup():
|
|||||||
if system == "Windows":
|
if system == "Windows":
|
||||||
if config.app["app-settings"]["donation_dialog_displayed"] == False:
|
if config.app["app-settings"]["donation_dialog_displayed"] == False:
|
||||||
donation()
|
donation()
|
||||||
updater.do_update()
|
if config.app['app-settings']['check_for_updates']:
|
||||||
|
updater.do_update()
|
||||||
sm = sessionManager.sessionManagerController()
|
sm = sessionManager.sessionManagerController()
|
||||||
sm.fill_list()
|
sm.fill_list()
|
||||||
if len(sm.sessions) == 0: sm.show()
|
if len(sm.sessions) == 0: sm.show()
|
||||||
|
@ -72,6 +72,13 @@ class proxy(wx.Panel, baseDialog.BaseWXDialog):
|
|||||||
sizer.Add(serverBox, 0, wx.ALL, 5)
|
sizer.Add(serverBox, 0, wx.ALL, 5)
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
|
|
||||||
|
class postabandonment(wx.Panel, baseDialog.BaseWXDialog):
|
||||||
|
def __init__(self, parent):
|
||||||
|
super(postabandonment, self).__init__(parent)
|
||||||
|
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||||
|
self.check_for_updates = wx.CheckBox(self, -1, _(U"Check for updates when {0} launches").format(application.name,))
|
||||||
|
sizer.Add(self.check_for_updates, 0, wx.ALL, 5)
|
||||||
|
|
||||||
class generalAccount(wx.Panel, baseDialog.BaseWXDialog):
|
class generalAccount(wx.Panel, baseDialog.BaseWXDialog):
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
super(generalAccount, self).__init__(parent)
|
super(generalAccount, self).__init__(parent)
|
||||||
@ -300,7 +307,6 @@ class servicesPanel(wx.Panel):
|
|||||||
return self.pocketBtn.GetLabel()
|
return self.pocketBtn.GetLabel()
|
||||||
|
|
||||||
class configurationDialog(baseDialog.BaseWXDialog):
|
class configurationDialog(baseDialog.BaseWXDialog):
|
||||||
|
|
||||||
def set_title(self, title):
|
def set_title(self, title):
|
||||||
self.SetTitle(title)
|
self.SetTitle(title)
|
||||||
|
|
||||||
@ -320,6 +326,10 @@ class configurationDialog(baseDialog.BaseWXDialog):
|
|||||||
self.proxy = proxy(self.notebook)
|
self.proxy = proxy(self.notebook)
|
||||||
self.notebook.AddPage(self.proxy, _(u"Proxy"))
|
self.notebook.AddPage(self.proxy, _(u"Proxy"))
|
||||||
|
|
||||||
|
def create_postabandonment(self):
|
||||||
|
self.postabandonment = postabandonment(self.notebook)
|
||||||
|
self.notebook.AddPage(self.postabandonment, _(u"Codeofdusk's post-abandonment fixes"))
|
||||||
|
|
||||||
def create_general_account(self):
|
def create_general_account(self):
|
||||||
self.general = generalAccount(self.notebook)
|
self.general = generalAccount(self.notebook)
|
||||||
self.notebook.AddPage(self.general, _(u"General"))
|
self.notebook.AddPage(self.general, _(u"General"))
|
||||||
|
Loading…
Reference in New Issue
Block a user