about summary refs log tree commit diff stats
path: root/src/config/theme.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-05-02 17:01:55 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-05-02 17:01:55 +0200
commitf082563bf2687465f0ca924985ec4d38277459ba (patch)
tree54fe7df828b967fd29e056d2c04a8933677f2d2a /src/config/theme.c
parent722cb5fdc3ced8b76b58992326c8761227240202 (diff)
downloadprofani-tty-f082563bf2687465f0ca924985ec4d38277459ba.tar.gz
Add occupants char
`/occupants char` now sets a character that is displayed before the nick
in MUCs. Similar like `/roster char` is displaying a char for the roster.

Regards #690
Diffstat (limited to 'src/config/theme.c')
-rw-r--r--src/config/theme.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config/theme.c b/src/config/theme.c
index 8d8061e9..a0ca8356 100644
--- a/src/config/theme.c
+++ b/src/config/theme.c
@@ -453,6 +453,16 @@ _load_preferences(void)
         prefs_set_occupants_size(occupants_size);
     }
 
+    if (g_key_file_has_key(theme, "ui", "occupants.char", NULL)) {
+        gchar *ch = g_key_file_get_string(theme, "ui", "occupants.char", NULL);
+        if (ch && strlen(ch) > 0) {
+            prefs_set_occupants_char(ch[0]);
+            g_free(ch);
+        }
+    } else {
+        prefs_clear_occupants_char();
+    }
+
     if (g_key_file_has_key(theme, "ui", "occupants.indent", NULL)) {
         gint occupants_indent = g_key_file_get_integer(theme, "ui", "occupants.indent", NULL);
         prefs_set_occupants_indent(occupants_indent);