applying_changes_from_engine (0),
name_label (_("Label: "), Gtk::ALIGN_LEFT),
+ name_generated_part ("", Gtk::ALIGN_LEFT),
normalize_checkbox (_("Normalize to:")),
normalize_adjustment (0.00, -90.00, 0.00, 0.1, 0.2),
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),
/* Pack containers in dialog */
- get_vbox()->pack_start (name_hbox, false, false, 0);
get_vbox()->pack_start (silence_table, false, false, 6);
get_vbox()->pack_start (format_table, false, false, 6);
get_vbox()->pack_start (encoding_options_vbox, false, false, 0);
get_vbox()->pack_start (cue_toc_vbox, false, false, 0);
+ get_vbox()->pack_start (name_hbox, false, false, 6);
/* Name, new and remove */
name_hbox.pack_start (name_label, false, false, 0);
- name_hbox.pack_start (name_entry, true, true, 0);
+ name_hbox.pack_start (name_entry, false, false, 0);
+ name_hbox.pack_start (name_generated_part, true, true, 0);
+ name_entry.set_width_chars(20);
+ update_description();
+ manager.DescriptionChanged.connect(
+ *this, invalidator (*this),
+ boost::bind (&ExportFormatDialog::update_description, this), gui_context());
/* Normalize */
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();
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);
}
tag_checkbox.set_active (spec->tag());
+ command_entry.set_text (spec->command());
}
void
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 = ": " + format->description(false);
+ name_generated_part.set_text(text);
+}
+
void
ExportFormatDialog::update_name ()
{
encoding_options_table.resize (1, 1);
encoding_options_table.attach (tag_checkbox, 0, 1, 0, 1);
- update_tagging_selection ();
-
show_all_children ();
}