aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_lyrics.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-25 17:42:55 +0200
committerMax Kellermann <max@duempel.org>2008-09-25 17:42:55 +0200
commit208fb7e7362cabc2d73a3bd0eedc1e4014d7e7a4 (patch)
tree686d87896ceaaa22ca511a066b6036479df95ae5 /src/screen_lyrics.c
parentdea63513303a45a231c71958b1e2a392fbf12033 (diff)
downloadmpd-208fb7e7362cabc2d73a3bd0eedc1e4014d7e7a4.tar.gz
mpd-208fb7e7362cabc2d73a3bd0eedc1e4014d7e7a4.tar.xz
mpd-208fb7e7362cabc2d73a3bd0eedc1e4014d7e7a4.zip
screen_lyrics: removed the "update" method
Automatically redraw the screen on demand, whenever data has changed.
Diffstat (limited to '')
-rw-r--r--src/screen_lyrics.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index a039c3859..d83bf5b36 100644
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
@@ -283,22 +283,13 @@ lyrics_paint(mpd_unused mpdclient_t *c)
list_window_paint(lw, list_callback, NULL);
}
-
-static void
-lyrics_update(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
-{
- if( lw->repaint ) {
- list_window_paint(lw, list_callback, NULL);
- lw->repaint = 0;
- }
-}
-
-
static int
lyrics_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
{
- if (list_window_scroll_cmd(lw, current.lines->len, cmd))
+ if (list_window_scroll_cmd(lw, current.lines->len, cmd)) {
+ lyrics_repaint();
return 1;
+ }
switch(cmd) {
case CMD_INTERRUPT:
@@ -328,6 +319,7 @@ lyrics_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
cmd, list_callback, NULL)) {
/* center the row */
list_window_center(lw, current.lines->len, lw->selected);
+ lyrics_repaint();
return 1;
}
@@ -341,7 +333,6 @@ const struct screen_functions screen_lyrics = {
.close = NULL,
.resize = lyrics_resize,
.paint = lyrics_paint,
- .update = lyrics_update,
.cmd = lyrics_cmd,
.get_title = lyrics_title,
};