Mercurial > audlegacy
changeset 975:c9915a0559f7 trunk
[svn] - Correctly display >1000 kbps bitrates when using modern skins
author | nhjm449 |
---|---|
date | Wed, 26 Apr 2006 21:06:14 -0700 |
parents | fa6a2ad65e71 |
children | 4dfb85985fe0 |
files | audacious/mainwin.c |
diffstat | 1 files changed, 22 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- 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();