GUI option to Exclude unused sources

This commit is contained in:
Robin Gareus 2016-09-23 20:43:26 +02:00
parent 8018bed0de
commit 8e8a0a9ef4
3 changed files with 22 additions and 4 deletions

View File

@ -2719,7 +2719,7 @@ ARDOUR_UI::archive_session ()
return;
}
if (_session->archive_session (sad.target_folder(), sad.name(), sad.encode_option (), &sad)) {
if (_session->archive_session (sad.target_folder(), sad.name(), sad.encode_option (), sad.only_used_sources (), &sad)) {
MessageDialog msg (_("Session Archiving failed."));
msg.run ();
}

View File

@ -33,6 +33,7 @@ using namespace ARDOUR;
SessionArchiveDialog::SessionArchiveDialog ()
: ArdourDialog (_("Zip/Archive Session"))
, ProgressReporter ()
, only_used_checkbox (_("Exclude unused audio sources"))
{
VBox* vbox = get_vbox();
@ -71,6 +72,8 @@ SessionArchiveDialog::SessionArchiveDialog ()
hbox->pack_start (encode_selector, true, true);
vbox->pack_start (*hbox, false, false);
vbox->pack_start (only_used_checkbox, false, false);
vbox->pack_start (progress_bar, true, true, 12);
vbox->show_all ();
@ -132,6 +135,18 @@ SessionArchiveDialog::set_name (const std::string& name)
name_entry_changed ();
}
bool
SessionArchiveDialog::only_used_sources () const
{
return only_used_checkbox.get_active ();
}
void
SessionArchiveDialog::set_only_used_sources (bool en)
{
only_used_checkbox.set_active (en);
}
ARDOUR::Session::ArchiveEncode
SessionArchiveDialog::encode_option () const
{

View File

@ -38,16 +38,19 @@ public:
std::string target_folder () const;
std::string name () const;
ARDOUR::Session::ArchiveEncode encode_option () const;
bool only_used_sources () const;
void set_name (const std::string&);
void set_target_folder (const std::string&);
void set_encode_option (ARDOUR::Session::ArchiveEncode);
void set_only_used_sources (bool);
private:
Gtk::FileChooserButton target_folder_selector;
Gtk::Entry name_entry;
Gtk::ComboBoxText format_selector;
Gtk::ComboBoxText encode_selector;
Gtk::CheckButton only_used_checkbox;
Gtk::ProgressBar progress_bar;