silence_end_checkbox (_("Add silence at end:")),
silence_end_clock ("silence_end", true, "", true, false, true),
- upload_checkbox(_("Upload to Soundcloud")),
command_label(_("Command to run post-export\n(%f=full path & filename, %d=directory, %b=basename, %u=username, %p=password):")),
format_table (3, 4),
silence_table.attach (silence_end_checkbox, 1, 2, 2, 3);
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);
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);
}
tag_checkbox.set_active (spec->tag());
- upload_checkbox.set_active (spec->upload());
command_entry.set_text (spec->command());
}
manager.select_with_toc (with_toc.get_active());
}
-void
-ExportFormatDialog::update_upload ()
-{
- manager.select_upload (upload_checkbox.get_active());
-}
void
ExportFormatDialog::update_command ()
Gtk::CheckButton silence_end_checkbox;
AudioClock silence_end_clock;
- /* Upload */
+ /* Post-export hook */
- Gtk::CheckButton upload_checkbox;
Gtk::Label command_label;
Gtk::Entry command_entry;
void update_with_toc ();
void update_with_cue ();
- void update_upload ();
void update_command ();
Gtk::TreeView sample_format_view;
void set_tag (bool tag_it) { _tag = tag_it; }
void set_with_cue (bool yn) { _with_cue = yn; }
void set_with_toc (bool yn) { _with_toc = yn; }
- void set_upload (bool yn) { _upload = yn; }
void set_command (std::string command) { _command = command; }
void set_silence_beginning (AnyTime const & value) { _silence_beginning = value; }
float normalize_target () const { return _normalize_target; }
bool with_toc() const { return _with_toc; }
bool with_cue() const { return _with_cue; }
- bool upload() const { return _upload; }
std::string command() const { return _command; }
bool tag () const { return _tag && supports_tagging; }
float _normalize_target;
bool _with_toc;
bool _with_cue;
- bool _upload;
std::string _command;
/* serialization helpers */
check_for_description_change ();
}
-void
-ExportFormatManager::select_upload (bool value)
-{
- current_selection->set_upload (value);
- check_for_description_change ();
-}
void
ExportFormatManager::set_command (std::string command)
, _normalize_target (1.0)
, _with_toc (false)
, _with_cue (false)
- , _upload (false)
, _command ("")
{
format_ids.insert (F_None);
root->add_property ("id", _id.to_s());
root->add_property ("with-cue", _with_cue ? "true" : "false");
root->add_property ("with-toc", _with_toc ? "true" : "false");
- root->add_property ("upload", _upload ? "true" : "false");
root->add_property ("command", _command);
node = root->add_child ("Encoding");
_with_toc = false;
}
- if ((prop = root.property ("upload"))) {
- _upload = string_is_affirmative (prop->value());
- } else {
- _upload = false;
- }
if ((prop = root.property ("command"))) {
_command = prop->value();
components.push_back ("CUE");
}
- if (_upload) {
- components.push_back ("Upload");
- }
-
if (!_command.empty()) {
components.push_back ("+");
}