Add option to hilight unread rooms in /wins command

In the theme we can now set `cmd.wins.unread` to hvae a special color
for the lines of the `/wins` output that have unread messages.

Fix https://github.com/profanity-im/profanity/issues/895
This commit is contained in:
Michael Vetter
2019-10-12 13:03:14 +02:00
parent 559c143587
commit 5c53e02d86
4 changed files with 9 additions and 1 deletions

View File

@@ -498,7 +498,11 @@ cons_show_wins(gboolean unread)
GSList *curr = window_strings;
while (curr) {
win_println(console, THEME_DEFAULT, '-', "%s", curr->data);
if (g_strstr_len(curr->data, strlen(curr->data), " unread") > 0) {
win_println(console, THEME_CMD_WINS_UNREAD, '-', "%s", curr->data);
} else {
win_println(console, THEME_DEFAULT, '-', "%s", curr->data);
}
curr = g_slist_next(curr);
}
g_slist_free_full(window_strings, free);