about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-02-20 08:11:58 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-02-20 08:11:58 +0100
commit80dd3fdbb2ee8c453f5828d8cacb029d222d3779 (patch)
tree9e15b43097a1da577035f2df477feeb32b211e34 /src/config
parent6aa793fca6c3ec74e04d28ce209dd460252e1079 (diff)
downloadprofani-tty-80dd3fdbb2ee8c453f5828d8cacb029d222d3779.tar.gz
Add option to color MUC history like regular messages
`/logging group color` has:
* `unanimous` which will color it with one unanimous color. Like it was
done always.
* `regular` which colors it like regular incoming messages.

Regards https://github.com/profanity-im/profanity/issues/1261
Diffstat (limited to 'src/config')
-rw-r--r--src/config/preferences.c5
-rw-r--r--src/config/preferences.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 52ce5ca9..4b5635a1 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -1746,6 +1746,7 @@ _get_group(preference_t pref)
         case PREF_STATUSBAR_CHAT:
         case PREF_STATUSBAR_ROOM:
         case PREF_TITLEBAR_MUC_TITLE:
+        case PREF_HISTORY_COLOR_MUC:
             return PREF_GROUP_UI;
         case PREF_STATES:
         case PREF_OUTTYPE:
@@ -2048,6 +2049,8 @@ _get_key(preference_t pref)
             return "sendfile";
         case PREF_CORRECTION_ALLOW:
             return "correction.allow";
+        case PREF_HISTORY_COLOR_MUC:
+            return "history.muc.color";
         default:
             return NULL;
     }
@@ -2177,6 +2180,8 @@ _get_default_string(preference_t pref)
             return "automatic";
         case PREF_COLOR_NICK:
             return "false";
+        case PREF_HISTORY_COLOR_MUC:
+            return "unanimous";
         default:
             return NULL;
     }
diff --git a/src/config/preferences.h b/src/config/preferences.h
index 4d04fd7d..7eda87db 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -165,6 +165,7 @@ typedef enum {
     PREF_OMEMO_SENDFILE,
     PREF_OCCUPANTS_WRAP,
     PREF_CORRECTION_ALLOW,
+    PREF_HISTORY_COLOR_MUC,
 } preference_t;
 
 typedef struct prof_alias_t {