summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c5a796)
raw | patch | inline | side by side (parent: 9c5a796)
author | Max Kellermann <max@duempel.org> | |
Sun, 11 Oct 2009 17:41:08 +0000 (19:41 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sun, 11 Oct 2009 17:41:08 +0000 (19:41 +0200) |
Reuse code from screen_browser.c. Side effect: this patch disables
horizontal scrolling. The "hscroll" library will return after an
overhaul.
horizontal scrolling. The "hscroll" library will return after an
overhaul.
src/screen_queue.c | patch | blob | history |
diff --git a/src/screen_queue.c b/src/screen_queue.c
index 750e9409372643526037c973c93a7c783353d3e1..b36ba66c8f87d686d6c4fad0bbe3b5064508304b 100644 (file)
--- a/src/screen_queue.c
+++ b/src/screen_queue.c
#include "utils.h"
#include "strfsong.h"
#include "wreadln.h"
-#include "colors.h"
+#include "song_paint.h"
#include "screen.h"
#include "screen_utils.h"
#include "screen_song.h"
return str;
}
+static void
+screen_queue_paint_callback(WINDOW *w, unsigned i,
+ unsigned y, unsigned width,
+ bool selected, G_GNUC_UNUSED void *data)
+{
+ const struct mpd_song *song;
+
+ assert(playlist != NULL);
+ assert(i < playlist_length(playlist));
+
+ song = playlist_get(playlist, i);
+
+ paint_song_row(w, y, width, selected,
+ (int)mpd_song_get_id(song) == current_song_id,
+ song);
+}
+
static void
screen_queue_paint(void)
{
- list_window_paint(lw, screen_queue_lw_callback, NULL);
+ list_window_paint2(lw, screen_queue_paint_callback, NULL);
}
G_GNUC_PURE