summaryrefslogtreecommitdiff
path: root/gtk2_ardour/export_format_dialog.cc
diff options
context:
space:
mode:
authorColin Fletcher <colin.m.fletcher@googlemail.com>2013-10-07 20:28:13 +0100
committerColin Fletcher <colin.m.fletcher@googlemail.com>2013-10-07 20:28:13 +0100
commit2a93f7a25e63c796745c4a34ebc13239382ba2df (patch)
tree9ebc4a503ee4adf8cef24fedc9cdd1fe738fb261 /gtk2_ardour/export_format_dialog.cc
parent8b9a1fae6a580b526b3fc784581e6d0c8031b6db (diff)
Rudimentary post-processing of exported files.
Export format contains a string to be passed to system() after expanding %1, %2, & %3 via string_compose() to the full path & filename, containing directory, and basename respectively. No error-checking or any niceties like that - real programmers will of course always type the command correctly, and know to watch Ardour's standard output for the results...
Diffstat (limited to 'gtk2_ardour/export_format_dialog.cc')
-rw-r--r--gtk2_ardour/export_format_dialog.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc
index 62d98c5cd2..a05a6e549a 100644
--- a/gtk2_ardour/export_format_dialog.cc
+++ b/gtk2_ardour/export_format_dialog.cc
@@ -52,6 +52,7 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) :
silence_end_clock ("silence_end", true, "", true, false, true),
upload_checkbox(_("Upload to Soundcloud")),
+ command_label(_("Command to run post-export (%1=full path & filename, %2=directory, %3=basename):")),
format_table (3, 4),
compatibility_label (_("Compatibility"), Gtk::ALIGN_LEFT),
@@ -116,6 +117,9 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) :
silence_table.attach (silence_end_clock, 2, 3, 2, 3);
get_vbox()->pack_start (upload_checkbox, false, false);
+ get_vbox()->pack_start (command_label, false, false);
+ get_vbox()->pack_start (command_entry, false, false);
+
/* Format table */
init_format_table();
@@ -146,6 +150,7 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) :
with_cue.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_with_cue));
with_toc.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_with_toc));
upload_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_upload));
+ command_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportFormatDialog::update_command));
cue_toc_vbox.pack_start (with_cue, false, false);
cue_toc_vbox.pack_start (with_toc, false, false);
@@ -301,6 +306,7 @@ ExportFormatDialog::load_state (FormatPtr spec)
tag_checkbox.set_active (spec->tag());
upload_checkbox.set_active (spec->upload());
+ command_entry.set_text (spec->command());
}
void
@@ -728,6 +734,13 @@ ExportFormatDialog::update_upload ()
manager.select_upload (upload_checkbox.get_active());
}
+void
+ExportFormatDialog::update_command ()
+{
+ manager.set_command (command_entry.get_text());
+}
+
+void
ExportFormatDialog::update_description()
{
std::string text = ": " + format->description(false);