From 9ed301c688fbf56a6aa64843688be97ea8ecba4f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 4 Oct 2009 01:09:56 +0200 Subject: [PATCH] status_bar: fixed visible_bitrate check Don't render the bit rate if total_time is unknown, and the visible_bitrate is disabled. --- src/status_bar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.39.5