about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-12-09 16:12:54 +0100
committerMichael Vetter <jubalh@iodoru.org>2019-12-09 16:12:54 +0100
commitddf6ada3d110ea2f20ffd69070bcc199c9426733 (patch)
tree2bb1ed9ba296f83f3e2ab9c0319bda276e1d89b6 /src/ui
parent7a0a578a8a56cb6689ac9fce680aa44f5af8926d (diff)
downloadprofani-tty-ddf6ada3d110ea2f20ffd69070bcc199c9426733.tar.gz
Add initial support for XEP-0392
The last 3 commits added basic support.
Thanks @aaptel!

This commit adds basic settings interface to use it.
See `/color on|off`.

We still have to enable settings for color blindness.
And maybe another setting to decide whether to color the
occupantslist/roster with the same algo.

Regards https://github.com/profanity-im/profanity/issues/1191
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/console.c9
-rw-r--r--src/ui/ui.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 9d20b5f2..3906da5c 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -1969,6 +1969,15 @@ cons_autoping_setting(void)
 }
 
 void
+cons_color_setting(void)
+{
+    if (prefs_get_boolean(PREF_COLOR_NICK))
+        cons_show("Consistent color generation for nicks (/color)               : ON");
+    else
+        cons_show("Consistent color generation for nicks (/color)               : OFF");
+}
+
+void
 cons_show_connection_prefs(void)
 {
     cons_show("Connection preferences:");
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 21bb1e32..1d811e55 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -317,6 +317,7 @@ void cons_room_cache_setting(void);
 void cons_inpblock_setting(void);
 void cons_statusbar_setting(void);
 void cons_winpos_setting(void);
+void cons_color_setting(void);
 void cons_show_contact_online(PContact contact, Resource *resource, GDateTime *last_activity);
 void cons_show_contact_offline(PContact contact, char *resource, char *status);
 void cons_theme_properties(void);