about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-04-19 12:00:28 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-04-20 20:35:45 +0200
commitd5206679353f2bfd44090e50f41ea06a48485cb1 (patch)
tree2de055c5ec2af4bac4319d1f8273f2ae27a43ffc
parent2b0e75ce3587bf846be1c1d806fc8a1fb0f977cb (diff)
downloadprofani-tty-d5206679353f2bfd44090e50f41ea06a48485cb1.tar.gz
Adjust jid for occupants indent
Indent the jid one more space than nick.
-rw-r--r--src/ui/occupantswin.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ui/occupantswin.c b/src/ui/occupantswin.c
index 37dfb9e2..46b44b78 100644
--- a/src/ui/occupantswin.c
+++ b/src/ui/occupantswin.c
@@ -46,27 +46,35 @@ _occuptantswin_occupant(ProfLayoutSplit *layout, Occupant *occupant, gboolean sh
     theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
     wattron(layout->subwin, theme_attrs(presence_colour));
 
-    GString *msg = g_string_new(" ");
+    GString *spaces = g_string_new(" ");
 
     int indent = prefs_get_occupants_indent();
     if (indent > 0) {
         while (indent > 0) {
-            g_string_append(msg, " ");
+            g_string_append(spaces, " ");
             indent--;
         }
     }
 
+    GString *msg = g_string_new("");
+    g_string_append(msg, spaces->str);
+
     g_string_append(msg, occupant->nick);
     win_sub_print(layout->subwin, msg->str, TRUE, FALSE, 0);
     g_string_free(msg, TRUE);
 
     if (showjid && occupant->jid) {
-        GString *msg = g_string_new("     ");
+        GString *msg = g_string_new("");
+        g_string_append(msg, spaces->str);
+        g_string_append(msg, " ");
+
         g_string_append(msg, occupant->jid);
         win_sub_print(layout->subwin, msg->str, TRUE, FALSE, 0);
         g_string_free(msg, TRUE);
     }
 
+    g_string_free(spaces, TRUE);
+
     wattroff(layout->subwin, theme_attrs(presence_colour));
 }