about summary refs log tree commit diff stats
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-12-12 11:07:11 +0100
committerMichael Vetter <jubalh@iodoru.org>2019-12-12 11:07:11 +0100
commit27501942798fea8b95e7983166ca7c25fd1a638b (patch)
tree130c91b479c80b90e1189a0a2a54e000ccc76692 /src/ui/window.c
parent136f504d5e84dd0452637cf9e493d04117dd9ef9 (diff)
downloadprofani-tty-27501942798fea8b95e7983166ca7c25fd1a638b.tar.gz
Implement Color Vision Deficiencies setting
Implement settings for redgreen and blue blindness.

Regards https://github.com/profanity-im/profanity/issues/1191
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 47230150..2a76496c 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1453,9 +1453,11 @@ _win_print(ProfWin *window, const char show_char, int pad_indent, GDateTime *tim
             colour = theme_attrs(THEME_THEM);
         }
 
-        if (prefs_get_boolean(PREF_COLOR_NICK)) {
+        char *color_pref = prefs_get_string(PREF_COLOR_NICK);
+        if (color_pref != NULL && (strcmp(color_pref, "false") != 0)) {
             colour = theme_hash_attrs(from);
         }
+        prefs_free_string(color_pref);
 
         if (flags & NO_COLOUR_FROM) {
             colour = 0;