summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-01-06 01:08:05 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-01-06 01:08:05 +0100
commitb6019edfa2e537fb4d7a570629f0f0d354389cdc (patch)
treea675aef85ec19251e05692ccc223696e165d3a5b /src/core
parentebbca7e314ef3fcea7fbae534c4b494369bae1be (diff)
downloadpoezio-b6019edfa2e537fb4d7a570629f0f0d354389cdc.tar.gz
poezio-b6019edfa2e537fb4d7a570629f0f0d354389cdc.tar.bz2
poezio-b6019edfa2e537fb4d7a570629f0f0d354389cdc.tar.xz
poezio-b6019edfa2e537fb4d7a570629f0f0d354389cdc.zip
Trigger a /recolor when we set deterministic_nick_colors=true
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/core.py b/src/core/core.py
index 56b0ad2b..807ca0cc 100644
--- a/src/core/core.py
+++ b/src/core/core.py
@@ -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…")