Allow utf8 in roster header char

This and the following commits should make a couple of more configs
allow utf8 chars so people can use their weird icons :-)

We did the same for the otr/omemo/pgp indicators at:
1f8b1eb740
5cf6ee1bc6
This commit is contained in:
Michael Vetter
2021-10-21 15:30:01 +02:00
parent 37e1699c84
commit 91898597dd
6 changed files with 32 additions and 29 deletions

View File

@@ -422,8 +422,8 @@ _load_preferences(void)
if (g_key_file_has_key(theme, "ui", "roster.header.char", NULL)) {
gchar* ch = g_key_file_get_string(theme, "ui", "roster.header.char", NULL);
if (ch && strlen(ch) > 0) {
prefs_set_roster_header_char(ch[0]);
if (ch && g_utf8_strlen(ch, 4) == 1) {
prefs_set_roster_header_char(ch);
g_free(ch);
}
}