diff --git a/src/screen.c b/src/screen.c
index 793eec93a0ddbe2e3ac9548bf97302e016ed8d73..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
{
struct mpdclient *c = data;
-#ifndef NCMPC_MINI
screen.welcome_source_id = 0;
-#endif
- 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;
#ifndef NCMPC_MINI
if (options.welcome_screen_list)
screen.welcome_source_id =
- g_timeout_add(SCREEN_WELCOME_TIME * 1000,
- welcome_timer_callback, c);
+ g_timeout_add_seconds(SCREEN_WELCOME_TIME,
+ welcome_timer_callback, c);
#endif
/* create top window */
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 */