Commit b6019edf authored by louiz’'s avatar louiz’

Trigger a /recolor when we set deterministic_nick_colors=true

parent ebbca7e3
......@@ -315,6 +315,8 @@ class Core(object):
self.on_password_change)
self.add_configuration_handler("enable_vertical_tab_list",
self.on_vertical_tab_list_config_change)
self.add_configuration_handler("deterministic_nick_colors",
self.on_nick_determinism_changed)
self.add_configuration_handler("", self.on_any_config_change)
......@@ -405,6 +407,15 @@ class Core(object):
"""
self.xmpp.password = value
def on_nick_determinism_changed(self, option, value):
"""If we change the value to true, we call /recolor on all the MucTabs, to
make the current nick colors reflect their deterministic value.
"""
if value.lower() == "true":
for tab in self.get_tabs(tabs.MucTab):
tab.command_recolor('')
def reload_config(self):
# reload all log files
log.debug("Reloading the log files…")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment