about summary refs log tree commit diff stats
path: root/src/config/preferences.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-03-25 12:54:25 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-03-25 12:54:25 +0100
commit4fc938d80425f647a7db34ff2f23b05780552d49 (patch)
treefdc4574dcb5af58565834c770449f5cb254c4baa /src/config/preferences.c
parent4f19ea264218fc93f4bca00b1f5a901c0ddc1b44 (diff)
downloadprofani-tty-4fc938d80425f647a7db34ff2f23b05780552d49.tar.gz
Add setting to not colorize own nick according to xep-0392
Some users might want there nick to always stay white (etc) for easier
recognition.

Now we can do `/color own off` to not generate the color based on
xep-0392. The `me=` color (etc) from the theme will then be used.

Once we run this command `theme_load()` is called again.
And the theme looks totally wrong.
We encountered this at other times already and I think it's nothing
wrong with this new code here now but that there seems to be a missing
closing attr for the color when drawing.

Should be investigated seperately.

Fix https://github.com/profanity-im/profanity/issues/1288
Diffstat (limited to 'src/config/preferences.c')
-rw-r--r--src/config/preferences.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 164b420f..ba3b08e9 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -1745,6 +1745,7 @@ _get_group(preference_t pref)
         case PREF_CONSOLE_PRIVATE:
         case PREF_CONSOLE_CHAT:
         case PREF_COLOR_NICK:
+        case PREF_COLOR_NICK_OWN:
         case PREF_ROSTER_COLOR_NICK:
         case PREF_OCCUPANTS_COLOR_NICK:
         case PREF_STATUSBAR_SHOW_NAME:
@@ -2033,6 +2034,8 @@ _get_key(preference_t pref)
             return "console.chat";
         case PREF_COLOR_NICK:
             return "color.nick";
+        case PREF_COLOR_NICK_OWN:
+            return "color.nick.own";
         case PREF_ROSTER_COLOR_NICK:
             return "color.roster.nick";
         case PREF_OCCUPANTS_COLOR_NICK:
@@ -2123,6 +2126,7 @@ _get_default_boolean(preference_t pref)
         case PREF_STATES:
         case PREF_OUTTYPE:
         case PREF_TITLEBAR_MUC_TITLE_NAME:
+        case PREF_COLOR_NICK_OWN:
             return TRUE;
         default:
             return FALSE;