From 97bc6008845136947b1e015d0c4faeaec0f4647f Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Sun, 1 Jul 2012 01:44:00 +0200 Subject: [PATCH] "(x more)" colors = most_important(queued) Give the "(x more)" text the same colors as the most important notification in the queue has. --- dunst.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dunst.c b/dunst.c index 0f4b679..efcb3ed 100644 --- a/dunst.c +++ b/dunst.c @@ -373,6 +373,10 @@ void draw_win(void) && !l_is_empty(notification_queue)) { snprintf(n_buf[height - 1].txt, BUFSIZ, "(%d more)", l_length(notification_queue)); + /* give this buffer the most important notification in order + * to set the colors to it + */ + n_buf[height - 1].n = most_important(notification_queue)->data; } else if (indicate_hidden && !l_is_empty(notification_queue)) { /* append "(x more)" message to notification text */ @@ -433,12 +437,7 @@ void draw_win(void) for (i = 0; i < height; i++) { if (strlen(n_buf[i].txt) > 0) { notification *n; - /* - * "(x more)" hasn't got a notification assigned to it. - * Take the previous notification instead to 'clone' - * its attributes - */ - n = n_buf[i].n ? n_buf[i].n : n_buf[i - 1].n; + n = n_buf[i].n; dc->x = 0; drawrect(dc, 0, 0, width, font_h, True, n->colors->BG); dc->x = n_buf[i].x_offset;