From: Kalle Wallin Date: Wed, 21 Jul 2004 11:40:42 +0000 (+0000) Subject: Added debug code for #291 X-Git-Tag: v0.12_alpha1~454 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=41d25e22f8b3fabc954d5b58db6d1d36706aa418;p=ncmpc.git Added debug code for #291 git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1891 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- diff --git a/src/screen.c b/src/screen.c index 2e0bad8..e390720 100644 --- a/src/screen.c +++ b/src/screen.c @@ -114,6 +114,7 @@ switch_screen_mode(gint id, mpdclient_t *c) new_mode = lookup_mode(id); if( new_mode>=0 && screens[new_mode].get_mode_functions ) { + D("switch_screen(%s)\n", screens[new_mode].name ); mode_fn = screens[new_mode].get_mode_functions(); screen->mode = new_mode; } @@ -579,10 +580,15 @@ screen_init(mpdclient_t *c) void screen_paint(mpdclient_t *c) { - D("screen_paint()\n"); - /* paint the title/header window */ + char *title = NULL; + if( mode_fn && mode_fn->get_title ) - paint_top_window(mode_fn->get_title(screen->buf,screen->buf_size), c, 1); + title = mode_fn->get_title(screen->buf,screen->buf_size); + + D("screen_paint(%s)\n", title); + /* paint the title/header window */ + if( title ) + paint_top_window(title, c, 1); else paint_top_window("", c, 1);