mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-17 21:56:07 -04:00
Update interval in buffers is configurable from global settings. Closes #223
This commit is contained in:
@@ -265,7 +265,8 @@ class Controller(object):
|
||||
self.checker_function.start()
|
||||
self.save_db = RepeatingTimer(300, self.save_data_in_db)
|
||||
self.save_db.start()
|
||||
self.update_buffers_function = RepeatingTimer(60, self.update_buffers)
|
||||
log.debug("Setting updates to buffers every %d seconds..." % (60*config.app["app-settings"]["update_period"],))
|
||||
self.update_buffers_function = RepeatingTimer(60*config.app["app-settings"]["update_period"], self.update_buffers)
|
||||
self.update_buffers_function.start()
|
||||
|
||||
def start(self):
|
||||
|
@@ -68,6 +68,7 @@ class globalSettingsController(object):
|
||||
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"])
|
||||
self.dialog.set_value("general", "update_period", config.app["app-settings"]["update_period"])
|
||||
self.dialog.set_value("general", "check_for_updates", config.app["app-settings"]["check_for_updates"])
|
||||
self.dialog.set_value("general", "remember_mention_and_longtweet", config.app["app-settings"]["remember_mention_and_longtweet"])
|
||||
proxyTypes=config.proxyTypes
|
||||
@@ -103,6 +104,9 @@ class globalSettingsController(object):
|
||||
if config.app["app-settings"]["no_streaming"] != self.dialog.get_value("general", "no_streaming"):
|
||||
config.app["app-settings"]["no_streaming"] = self.dialog.get_value("general", "no_streaming")
|
||||
self.needs_restart = True
|
||||
if config.app["app-settings"]["update_period"] != self.dialog.get_value("general", "update_period"):
|
||||
config.app["app-settings"]["update_period"] = self.dialog.get_value("general", "update_period")
|
||||
self.needs_restart = True
|
||||
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")
|
||||
|
Reference in New Issue
Block a user