X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fexport_format_dialog.cc;h=c2c3909b1b017643f2547a235e7f4102a0979b5f;hb=18efe8f446f45b541f19a2f99dd707f66fb72a3e;hp=d93eb23a2a20efdef2787c31c47c360b1f642c71;hpb=04416e2d1df3cc8d9f014765e5ca5ce818b7b4d7;p=ardour.git diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc index d93eb23a2a..c2c3909b1b 100644 --- a/gtk2_ardour/export_format_dialog.cc +++ b/gtk2_ardour/export_format_dialog.cc @@ -51,6 +51,8 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) : silence_end_checkbox (_("Add silence at end:")), silence_end_clock ("silence_end", true, "", true, false, true), + command_label(_("Command to run post-export\n(%f=full path & filename, %d=directory, %b=basename):"), Gtk::ALIGN_LEFT), + format_table (3, 4), compatibility_label (_("Compatibility"), Gtk::ALIGN_LEFT), quality_label (_("Quality"), Gtk::ALIGN_LEFT), @@ -113,6 +115,11 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) : silence_table.attach (silence_end_checkbox, 1, 2, 2, 3); silence_table.attach (silence_end_clock, 2, 3, 2, 3); + /* Post-export hook script */ + + get_vbox()->pack_start (command_label, false, false); + get_vbox()->pack_start (command_entry, false, false); + /* Format table */ init_format_table(); @@ -142,6 +149,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)); + 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); @@ -296,6 +304,7 @@ ExportFormatDialog::load_state (FormatPtr spec) } tag_checkbox.set_active (spec->tag()); + command_entry.set_text (spec->command()); } void @@ -717,13 +726,17 @@ ExportFormatDialog::update_with_toc () manager.select_with_toc (with_toc.get_active()); } + +void +ExportFormatDialog::update_command () +{ + manager.set_command (command_entry.get_text()); +} + void ExportFormatDialog::update_description() { - std::string text; - if (format->is_complete()) { - text = ": " + format->description(false); - } + std::string text = ": " + format->description(false); name_generated_part.set_text(text); } @@ -900,8 +913,6 @@ ExportFormatDialog::show_ogg_enconding_options (boost::shared_ptr