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
This commit is contained in:
Michael Vetter
2019-05-02 17:01:55 +02:00
parent 722cb5fdc3
commit f082563bf2
9 changed files with 94 additions and 3 deletions

View File

@@ -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);