Allow utf8 in roster contact char

This commit is contained in:
Michael Vetter
2021-10-22 16:23:18 +02:00
parent 91898597dd
commit a668ca45b7
6 changed files with 28 additions and 33 deletions

View File

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