1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Adjust jid for occupants indent

Indent the jid one more space than nick.
This commit is contained in:
Michael Vetter 2019-04-19 12:00:28 +02:00
parent 2b0e75ce35
commit d520667935

View File

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