mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 12:26:22 +00:00
Add /occupants indent command
Roster has a `/roster contact indent` option. Now we have the same for occupants. So contacts in roster and in MUC can have configurable indentation. Regards https://github.com/boothj5/profanity/issues/690
This commit is contained in:
@@ -1232,6 +1232,9 @@ cons_occupants_setting(void)
|
||||
else
|
||||
cons_show("Occupant jids (/occupants) : hide");
|
||||
|
||||
gint occupant_indent = prefs_get_occupants_indent();
|
||||
cons_show("Occupant indent (/occupants) : %d", occupant_indent);
|
||||
|
||||
int size = prefs_get_occupants_size();
|
||||
cons_show("Occupants size (/occupants) : %d", size);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,18 @@ _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 *msg = g_string_new(" ");
|
||||
|
||||
int indent = prefs_get_occupants_indent();
|
||||
int current_indent = 0;
|
||||
if (indent > 0) {
|
||||
current_indent += indent;
|
||||
while (indent > 0) {
|
||||
g_string_append(msg, " ");
|
||||
indent--;
|
||||
}
|
||||
}
|
||||
|
||||
g_string_append(msg, occupant->nick);
|
||||
win_sub_print(layout->subwin, msg->str, TRUE, FALSE, 0);
|
||||
g_string_free(msg, TRUE);
|
||||
|
||||
Reference in New Issue
Block a user