diff options
author | Michael Vetter <jubalh@iodoru.org> | 2019-12-12 11:07:11 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2019-12-12 11:07:11 +0100 |
commit | 27501942798fea8b95e7983166ca7c25fd1a638b (patch) | |
tree | 130c91b479c80b90e1189a0a2a54e000ccc76692 /src/ui/console.c | |
parent | 136f504d5e84dd0452637cf9e493d04117dd9ef9 (diff) | |
download | profani-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/console.c')
-rw-r--r-- | src/ui/console.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index 3906da5c..91b499f7 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -1971,10 +1971,19 @@ cons_autoping_setting(void) void cons_color_setting(void) { - if (prefs_get_boolean(PREF_COLOR_NICK)) + char *color_pref = prefs_get_string(PREF_COLOR_NICK); + + if (strcmp(color_pref, "true") == 0) { cons_show("Consistent color generation for nicks (/color) : ON"); - else + } else if (strcmp(color_pref, "redgreen") == 0) { + cons_show("Consistent color generation for nicks (/color) : REDGREEN"); + } else if (strcmp(color_pref, "blue") == 0) { + cons_show("Consistent color generation for nicks (/color) : BLUE"); + } else { cons_show("Consistent color generation for nicks (/color) : OFF"); + } + + prefs_free_string(color_pref); } void |