mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Moved setting to globals.
This commit is contained in:
parent
f02fae7fa2
commit
a3ed2ebef8
@ -9,7 +9,6 @@ relative_times = boolean(default=True)
|
||||
max_api_calls = integer(default=1)
|
||||
max_tweets_per_call = integer(default=100)
|
||||
reverse_timelines = boolean(default=False)
|
||||
handle_longtweets = boolean(default=False)
|
||||
time_to_check_streams = integer(default=30)
|
||||
announce_stream_status = boolean(default=True)
|
||||
retweet_mode = string(default="ask")
|
||||
|
@ -8,6 +8,7 @@ language = string(default="system")
|
||||
hide_gui = boolean(default=False)
|
||||
voice_enabled = boolean(default=False)
|
||||
ask_at_exit = boolean(default=True)
|
||||
handle_longtweets = boolean(default=False)
|
||||
use_invisible_keyboard_shorcuts = boolean(default=True)
|
||||
play_ready_sound = boolean(default=True)
|
||||
speak_ready_msg = boolean(default=True)
|
||||
|
@ -60,6 +60,7 @@ class globalSettingsController(object):
|
||||
|
||||
self.dialog.set_value("general", "play_ready_sound", config.app["app-settings"]["play_ready_sound"])
|
||||
self.dialog.set_value("general", "speak_ready_msg", config.app["app-settings"]["speak_ready_msg"])
|
||||
self.dialog.set_value("general", "handle_longtweets", config.app["app-settings"]["handle_longtweets"])
|
||||
self.dialog.set_value("general", "use_invisible_shorcuts", config.app["app-settings"]["use_invisible_keyboard_shorcuts"])
|
||||
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"])
|
||||
@ -86,6 +87,7 @@ class globalSettingsController(object):
|
||||
config.app["app-settings"]["voice_enabled"] = self.dialog.get_value("general", "disable_sapi5")
|
||||
config.app["app-settings"]["hide_gui"] = self.dialog.get_value("general", "hide_gui")
|
||||
config.app["app-settings"]["ask_at_exit"] = self.dialog.get_value("general", "ask_at_exit")
|
||||
config.app["app-settings"]["handle_longtweets"] = self.dialog.get_value("general", "handle_longtweets")
|
||||
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")
|
||||
if 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"):
|
||||
@ -120,7 +122,6 @@ class accountSettingsController(globalSettingsController):
|
||||
else:
|
||||
self.dialog.set_value("general", "retweet_mode", _(u"Retweet with comments"))
|
||||
self.dialog.set_value("general", "persist_size", str(self.config["general"]["persist_size"]))
|
||||
self.dialog.set_value("general", "handle_longtweets", self.config["general"]["handle_longtweets"])
|
||||
self.dialog.create_other_buffers()
|
||||
buffer_values = self.get_buffers_list()
|
||||
self.dialog.buffers.insert_buffers(buffer_values)
|
||||
@ -160,7 +161,6 @@ class accountSettingsController(globalSettingsController):
|
||||
self.config["general"]["relative_times"] = self.dialog.get_value("general", "relative_time")
|
||||
self.config["general"]["max_api_calls"] = self.dialog.get_value("general", "apiCalls")
|
||||
self.config["general"]["max_tweets_per_call"] = self.dialog.get_value("general", "itemsPerApiCall")
|
||||
self.config["general"]["handle_longtweets"] = self.dialog.get_value("general", "relative_time")
|
||||
if self.config["general"]["persist_size"] != self.dialog.get_value("general", "persist_size"):
|
||||
if self.dialog.get_value("general", "persist_size") == '':
|
||||
self.config["general"]["persist_size"] =-1
|
||||
|
@ -30,6 +30,8 @@ class general(wx.Panel, baseDialog.BaseWXDialog):
|
||||
sizer.Add(self.disable_sapi5, 0, wx.ALL, 5)
|
||||
self.hide_gui = wx.CheckBox(self, -1, _(u"Hide GUI on launch"))
|
||||
sizer.Add(self.hide_gui, 0, wx.ALL, 5)
|
||||
self.handle_longtweets = wx.CheckBox(self, wx.NewId(), _(u"Use Codeofdusk's longtweet handlers (may decrease client performance)"))
|
||||
sizer.Add(self.handle_longtweets, 0, wx.ALL, 5)
|
||||
kmbox = wx.BoxSizer(wx.VERTICAL)
|
||||
km_label = wx.StaticText(self, -1, _(u"Keymap"))
|
||||
self.km = wx.ComboBox(self, -1, choices=keymaps, style=wx.CB_READONLY)
|
||||
@ -104,8 +106,6 @@ class generalAccount(wx.Panel, baseDialog.BaseWXDialog):
|
||||
self.persist_size = wx.TextCtrl(self, -1)
|
||||
sizer.Add(PersistSizeLabel, 0, wx.ALL, 5)
|
||||
sizer.Add(self.persist_size, 0, wx.ALL, 5)
|
||||
self.handle_longtweets = wx.CheckBox(self, wx.NewId(), _(u"Use Codeofdusk's longtweet handlers (may decrease client performance)"))
|
||||
sizer.Add(self.handle_longtweets, 0, wx.ALL, 5)
|
||||
self.SetSizer(sizer)
|
||||
|
||||
class other_buffers(wx.Panel):
|
||||
|
Loading…
Reference in New Issue
Block a user