# HG changeset patch # User nhjm449 # Date 1146110774 25200 # Node ID c9915a0559f78d16976e83f312c025844faddde5 # Parent fa6a2ad65e7182ed465da78c5471c3f0d9d2a970 [svn] - Correctly display >1000 kbps bitrates when using modern skins diff -r fa6a2ad65e71 -r c9915a0559f7 audacious/mainwin.c --- a/audacious/mainwin.c Wed Apr 26 20:12:05 2006 -0700 +++ b/audacious/mainwin.c Wed Apr 26 21:06:14 2006 -0700 @@ -852,8 +852,7 @@ } else { /* Show bitrate in 100,000s */ - bitrate /= 100; - g_snprintf(text, sizeof(text), "%2dH", bitrate); + g_snprintf(text, sizeof(text), "%2dH", bitrate / 100); textbox_set_text(mainwin_rate_text, text); } } @@ -868,8 +867,8 @@ if (cfg.player_shaded) { - widget_show(WIDGET(mainwin_stime_min)); - widget_show(WIDGET(mainwin_stime_sec)); + widget_show(WIDGET(mainwin_stime_min)); + widget_show(WIDGET(mainwin_stime_sec)); } widget_show(WIDGET(mainwin_minus_num)); @@ -895,23 +894,30 @@ if (bmp_active_skin && bmp_active_skin->properties.mainwin_othertext == TRUE) { - g_snprintf(text, 512, "%d kbps, %0.1f khz, %s", - bitrate < 1000 ? bitrate : bitrate / 100, - (gfloat) frequency / 1000, - (n_channels > 1) ? _("stereo") : _("mono")); + if (bitrate != -1) + g_snprintf(text, 512, "%d kbps, %0.1f kHz, %s", + //bitrate < 1000 ? bitrate : bitrate / 100, + bitrate, + (gfloat) frequency / 1000, + (n_channels > 1) ? _("stereo") : _("mono")); + else + g_snprintf(text, 512, "VBR, %0.1f kHz, %s", + (gfloat) frequency / 1000, + (n_channels > 1) ? _("stereo") : _("mono")); + textbox_set_text(mainwin_othertext, text); - widget_hide(WIDGET(mainwin_rate_text)); - widget_hide(WIDGET(mainwin_freq_text)); - widget_hide(WIDGET(mainwin_monostereo)); - widget_show(WIDGET(mainwin_othertext)); + widget_hide(WIDGET(mainwin_rate_text)); + widget_hide(WIDGET(mainwin_freq_text)); + widget_hide(WIDGET(mainwin_monostereo)); + widget_show(WIDGET(mainwin_othertext)); } else { - widget_show(WIDGET(mainwin_rate_text)); - widget_show(WIDGET(mainwin_freq_text)); - widget_show(WIDGET(mainwin_monostereo)); - widget_hide(WIDGET(mainwin_othertext)); + widget_show(WIDGET(mainwin_rate_text)); + widget_show(WIDGET(mainwin_freq_text)); + widget_show(WIDGET(mainwin_monostereo)); + widget_hide(WIDGET(mainwin_othertext)); } title = playlist_get_info_text();