summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 536e6df)
raw | patch | inline | side by side (parent: 536e6df)
author | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 19:34:27 +0000 (20:34 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 19:34:27 +0000 (20:34 +0100) |
src/screen.c | patch | blob | history |
diff --git a/src/screen.c b/src/screen.c
index 781b68f22eb9e99c2d06b2590dce1990548041a6..1f7b7a6ef69f7a028a837da5442699c41d51f5bc 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
}
static void
-paint_top_window(const char *header, const struct mpdclient *c)
+paint_top_window(const struct mpdclient *c)
{
- title_bar_paint(&screen.title_bar, header, c->status);
+ const char *title =
+#ifndef NCMPC_MINI
+ screen.welcome_source_id == 0 &&
+#endif
+ mode_fn->get_title != NULL
+ ? mode_fn->get_title(screen.buf, screen.buf_size)
+ : "";
+ assert(title != NULL);
+
+ title_bar_paint(&screen.title_bar, title, c->status);
}
static void
screen.welcome_source_id = 0;
- paint_top_window(mode_fn->get_title != NULL
- ? mode_fn->get_title(screen.buf, screen.buf_size)
- : "",
- c);
+ paint_top_window(c);
doupdate();
return false;
screen_refresh(struct mpdclient *c, bool main_dirty)
{
/* update title/header window */
- const char *title =
-#ifndef NCMPC_MINI
- screen.welcome_source_id == 0 &&
-#endif
- mode_fn->get_title != NULL
- ? mode_fn->get_title(screen.buf, screen.buf_size)
- : "";
- assert(title != NULL);
- paint_top_window(title, c);
+ paint_top_window(c);
/* paint the bottom window */