From ddf6ada3d110ea2f20ffd69070bcc199c9426733 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Mon, 9 Dec 2019 16:12:54 +0100 Subject: 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 --- src/ui/console.c | 9 +++++++++ src/ui/ui.h | 1 + 2 files changed, 10 insertions(+) (limited to 'src/ui') 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 @@ -1968,6 +1968,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) { 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); -- cgit 1.4.1-2-gfad0