about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-10-22 16:23:18 +0200
committerMichael Vetter <jubalh@iodoru.org>2021-10-22 16:23:18 +0200
commita668ca45b78bf9653f93c0380e58101da3c3bced (patch)
tree7aaa5c56212fbe63f3045b622e18df0beaf753dd /src/ui
parent91898597dd15d2d8661ab587a69585b232b7d00e (diff)
downloadprofani-tty-a668ca45b78bf9653f93c0380e58101da3c3bced.tar.gz
Allow utf8 in roster contact char
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/console.c17
-rw-r--r--src/ui/rosterwin.c8
2 files changed, 14 insertions, 11 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index b2773f2d..d6306dcc 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -1476,17 +1476,20 @@ cons_roster_setting(void)
         cons_show("Roster offline (/roster)            : hide");
 
     char* header_ch = prefs_get_roster_header_char();
-    if (header_ch)
+    if (header_ch) {
         cons_show("Roster header char (/roster)        : %s", header_ch);
-    else
+        free(header_ch);
+    } else {
         cons_show("Roster header char (/roster)        : none");
-    free(header_ch);
+    }
 
-    char contact_ch = prefs_get_roster_contact_char();
-    if (contact_ch)
-        cons_show("Roster contact char (/roster)       : %c", contact_ch);
-    else
+    char* contact_ch = prefs_get_roster_contact_char();
+    if (contact_ch) {
+        cons_show("Roster contact char (/roster)       : %s", contact_ch);
+        free(contact_ch);
+    } else {
         cons_show("Roster contact char (/roster)       : none");
+    }
 
     char resource_ch = prefs_get_roster_resource_char();
     if (resource_ch)
diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c
index 9a5926a9..a3dfffba 100644
--- a/src/ui/rosterwin.c
+++ b/src/ui/rosterwin.c
@@ -314,9 +314,9 @@ _rosterwin_unsubscribed_item(ProfLayoutSplit* layout, ProfChatWin* chatwin)
             indent--;
         }
     }
-    char ch = prefs_get_roster_contact_char();
+    char *ch = prefs_get_roster_contact_char();
     if (ch) {
-        g_string_append_printf(msg, "%c", ch);
+        g_string_append_printf(msg, "%s", ch);
     }
 
     char* unreadpos = prefs_get_string(PREF_ROSTER_UNREAD);
@@ -376,9 +376,9 @@ _rosterwin_contact(ProfLayoutSplit* layout, PContact contact)
             indent--;
         }
     }
-    char ch = prefs_get_roster_contact_char();
+    char *ch = prefs_get_roster_contact_char();
     if (ch) {
-        g_string_append_printf(msg, "%c", ch);
+        g_string_append_printf(msg, "%s", ch);
     }
 
     char* unreadpos = prefs_get_string(PREF_ROSTER_UNREAD);