diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-09-06 03:13:35 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-09-06 03:13:35 +0000 |
commit | f00c679a1bf59d75a0a4390f3c50d4caef412515 (patch) | |
tree | 50325d9e7ebbdb5e1be49e2aa2f0564f6aba3d6f | |
parent | ce211bb35cfef04ca377a86a2031726873c889ff (diff) |
patch from lucus for wastebasket content size message
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5636 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 596ada7eb6..2dfec7fe2a 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2748,19 +2748,23 @@ require some unused files to continue to exist.")); */ const char* bprefix; + float space_adjusted; - if (rep.space < 1048576.0f) { + if (rep.space < 1000000.0f) { bprefix = X_("kilo"); - } else if (rep.space < 1048576.0f * 1000) { + space_adjusted = truncf((float)rep.space / 1000.0f); + } else if (rep.space < (1000000.0f * 1000)) { bprefix = X_("mega"); + space_adjusted = truncf((float)rep.space / (1000000.0f)); } else { bprefix = X_("giga"); + space_adjusted = truncf((float)rep.space / (1000000.0f * 1000)); } if (removed > 1) { - txt.set_text (string_compose (plural_msg, removed, session->path() + "dead_sounds", (float) rep.space / 1024.0f, bprefix)); + txt.set_text (string_compose (plural_msg, removed, session->path() + "dead_sounds", space_adjusted, bprefix)); } else { - txt.set_text (string_compose (singular_msg, removed, session->path() + "dead_sounds", (float) rep.space / 1024.0f, bprefix)); + txt.set_text (string_compose (singular_msg, removed, session->path() + "dead_sounds", space_adjusted, bprefix)); } dhbox.pack_start (*dimage, true, false, 5); |