aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-21 13:48:44 +0200
committerMax Kellermann <max@duempel.org>2008-09-21 13:48:44 +0200
commit36acd5f8c2988c2b73fee670b2d37cb38f5c518b (patch)
treea9a74bb2c9b1563a05448a0407b8f32c7b2407e0
parent45b554123c08f36de1daf133164f76154045c387 (diff)
downloadmpd-36acd5f8c2988c2b73fee670b2d37cb38f5c518b.tar.gz
mpd-36acd5f8c2988c2b73fee670b2d37cb38f5c518b.tar.xz
mpd-36acd5f8c2988c2b73fee670b2d37cb38f5c518b.zip
screen_help: removed update() method
Why redraw the help screen when nothing has changed? Redraw it only after help_cmd(), and when explicitly requested (help_paint()).
Diffstat (limited to '')
-rw-r--r--src/screen_help.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/screen_help.c b/src/screen_help.c
index 07e3375fe..7416e6e40 100644
--- a/src/screen_help.c
+++ b/src/screen_help.c
@@ -216,22 +216,14 @@ help_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
wrefresh(lw->w);
}
-static void
-help_update(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c)
-{
- if (lw->repaint) {
- list_window_paint(lw, list_callback, NULL);
- wrefresh(lw->w);
- lw->repaint = 0;
- }
-}
-
-
static int
help_cmd(screen_t *screen, mpd_unused mpdclient_t *c, command_t cmd)
{
- if (list_window_scroll_cmd(lw, help_text_rows, cmd))
+ if (list_window_scroll_cmd(lw, help_text_rows, cmd)) {
+ list_window_paint(lw, list_callback, NULL);
+ wrefresh(lw->w);
return 1;
+ }
lw->selected = lw->start+lw->rows;
if (screen_find(screen,
@@ -239,6 +231,8 @@ help_cmd(screen_t *screen, mpd_unused mpdclient_t *c, command_t cmd)
cmd, list_callback, NULL)) {
/* center the row */
list_window_center(lw, help_text_rows, lw->selected);
+ list_window_paint(lw, list_callback, NULL);
+ wrefresh(lw->w);
return 1;
}
@@ -250,7 +244,6 @@ const struct screen_functions screen_help = {
.exit = help_exit,
.resize = help_resize,
.paint = help_paint,
- .update = help_update,
.cmd = help_cmd,
.get_title = help_title,
};