summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-07-21 03:23:57 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-07-21 03:23:57 +0000
commit20342cf2644fee7b04d6cfdc4fc686897837a01b (patch)
treecde2cbeb36402a003148c21aa92c1b27c5a418b5 /gtk2_ardour/ardour_ui.cc
parent769e2c3feb2ce30056bfb8ec6eb7ec6a1d4324c6 (diff)
first part of fixing up send/return metering ; make send-controlling faders work ; fixes from 2.X for key editor and untranslatable string; use standard name for surfaces lib version in wiimote wscript
git-svn-id: svn://localhost/ardour2/branches/3.0@5400 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r--gtk2_ardour/ardour_ui.cc57
1 files changed, 40 insertions, 17 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index ff8d617a0a..1335dce36f 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -2559,7 +2559,8 @@ ARDOUR_UI::hide_splash ()
}
void
-ARDOUR_UI::display_cleanup_results (Session::cleanup_report& rep, const gchar* list_title, const string & msg)
+ARDOUR_UI::display_cleanup_results (Session::cleanup_report& rep, const gchar* list_title,
+ const string& plural_msg, const string& singular_msg)
{
size_t removed;
@@ -2616,18 +2617,30 @@ require some unused files to continue to exist."));
const string dead_sound_directory = session->session_directory().dead_sound_path().to_string();
+
+
+
+ /* subst:
+ %1 - number of files removed
+ %2 - location of "dead_sounds"
+ %3 - size of files affected
+ %4 - prefix for "bytes" to produce sensible results (e.g. mega, kilo, giga)
+ */
+
+ const char* bprefix;
+
if (rep.space < 1048576.0f) {
- if (removed > 1) {
- txt.set_text (string_compose (msg, removed, _("files were"), dead_sound_directory, (float) rep.space / 1024.0f, "kilo"));
- } else {
- txt.set_text (string_compose (msg, removed, _("file was"), dead_sound_directory, (float) rep.space / 1024.0f, "kilo"));
- }
+ bprefix = X_("kilo");
+ } else if (rep.space < 1048576.0f * 1000) {
+ bprefix = X_("mega");
} else {
- if (removed > 1) {
- txt.set_text (string_compose (msg, removed, _("files were"), dead_sound_directory, (float) rep.space / 1048576.0f, "mega"));
- } else {
- txt.set_text (string_compose (msg, removed, _("file was"), dead_sound_directory, (float) rep.space / 1048576.0f, "mega"));
- }
+ bprefix = X_("giga");
+ }
+
+ if (removed > 1) {
+ txt.set_text (string_compose (plural_msg, removed, dead_sound_directory, (float) rep.space / 1024.0f, bprefix));
+ } else {
+ txt.set_text (string_compose (singular_msg, removed, dead_sound_directory, (float) rep.space / 1024.0f, bprefix));
}
dhbox.pack_start (*dimage, true, false, 5);
@@ -2723,12 +2736,19 @@ After cleanup, unused audio files will be moved to a \
display_cleanup_results (rep,
_("cleaned files"),
_("\
-The following %1 %2 not in use and \n\
+The following %1 files were not in use and \n\
have been moved to:\n\
-%3. \n\n\
+%2. \n\n\
+Flushing the wastebasket will \n\
+release an additional\n\
+%3 %4bytes of disk space.\n"),
+ _("\
+The following file was not in use and \n \
+has been moved to:\n \
+%2. \n\n\
Flushing the wastebasket will \n\
release an additional\n\
-%4 %5bytes of disk space.\n"
+%3 %4bytes of disk space.\n"
));
}
@@ -2749,9 +2769,12 @@ ARDOUR_UI::flush_trash ()
display_cleanup_results (rep,
_("deleted file"),
- _("The following %1 %2 deleted from\n\
-%3,\n\
-releasing %4 %5bytes of disk space"));
+ _("The following %1 files were deleted from\n\
+%2,\n\
+releasing %3 %4bytes of disk space"),
+ _("The following file was deleted from\n\
+%2,\n\
+releasing %3 %4bytes of disk space"));
}
void