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:
parent
2b0e75ce35
commit
d520667935
@ -46,27 +46,35 @@ _occuptantswin_occupant(ProfLayoutSplit *layout, Occupant *occupant, gboolean sh
|
|||||||
theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
|
theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
|
||||||
wattron(layout->subwin, theme_attrs(presence_colour));
|
wattron(layout->subwin, theme_attrs(presence_colour));
|
||||||
|
|
||||||
GString *msg = g_string_new(" ");
|
GString *spaces = g_string_new(" ");
|
||||||
|
|
||||||
int indent = prefs_get_occupants_indent();
|
int indent = prefs_get_occupants_indent();
|
||||||
if (indent > 0) {
|
if (indent > 0) {
|
||||||
while (indent > 0) {
|
while (indent > 0) {
|
||||||
g_string_append(msg, " ");
|
g_string_append(spaces, " ");
|
||||||
indent--;
|
indent--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GString *msg = g_string_new("");
|
||||||
|
g_string_append(msg, spaces->str);
|
||||||
|
|
||||||
g_string_append(msg, occupant->nick);
|
g_string_append(msg, occupant->nick);
|
||||||
win_sub_print(layout->subwin, msg->str, TRUE, FALSE, 0);
|
win_sub_print(layout->subwin, msg->str, TRUE, FALSE, 0);
|
||||||
g_string_free(msg, TRUE);
|
g_string_free(msg, TRUE);
|
||||||
|
|
||||||
if (showjid && occupant->jid) {
|
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);
|
g_string_append(msg, occupant->jid);
|
||||||
win_sub_print(layout->subwin, msg->str, TRUE, FALSE, 0);
|
win_sub_print(layout->subwin, msg->str, TRUE, FALSE, 0);
|
||||||
g_string_free(msg, TRUE);
|
g_string_free(msg, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_string_free(spaces, TRUE);
|
||||||
|
|
||||||
wattroff(layout->subwin, theme_attrs(presence_colour));
|
wattroff(layout->subwin, theme_attrs(presence_colour));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user