From: Max Kellermann Date: Sat, 3 Oct 2009 23:09:56 +0000 (+0200) Subject: status_bar: fixed visible_bitrate check X-Git-Tag: release-0.16~176 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9ed301c688fbf56a6aa64843688be97ea8ecba4f;p=ncmpc.git status_bar: fixed visible_bitrate check Don't render the bit rate if total_time is unknown, and the visible_bitrate is disabled. --- diff --git a/src/status_bar.c b/src/status_bar.c index ddffb8e..4e03206 100644 --- a/src/status_bar.c +++ b/src/status_bar.c @@ -151,14 +151,16 @@ status_bar_paint(struct status_bar *p, const struct mpd_status *status, g_snprintf(buffer, sizeof(buffer), "%s [%s/%s]", bitrate, elapsed_string, duration_string); #ifndef NCMPC_MINI - } else { + } else if (options.visible_bitrate) { g_snprintf(buffer, sizeof(buffer), " [%d kbps]", mpd_status_get_kbit_rate(status)); #endif + } else { + buffer[0] = 0; } -#ifndef NCMPC_MINI } else { +#ifndef NCMPC_MINI if (options.display_time) { time_t timep;