mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Fix #7003, Store/Restore state of checkboxes in Export dialog
This commit is contained in:
parent
3f95b5ac19
commit
dab6e8a2d3
2 changed files with 48 additions and 0 deletions
|
|
@ -112,12 +112,55 @@ ExportFileNotebook::update_soundcloud_upload ()
|
||||||
soundcloud_export_selector->set_visible (show_credentials_entry);
|
soundcloud_export_selector->set_visible (show_credentials_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ExportFileNotebook::FilePage::on_show ()
|
||||||
|
{
|
||||||
|
VBox::on_show ();
|
||||||
|
restore_state ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ExportFileNotebook::FilePage::on_hide ()
|
||||||
|
{
|
||||||
|
VBox::on_hide ();
|
||||||
|
store_state ();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ExportFileNotebook::FilePage::analysis_changed ()
|
ExportFileNotebook::FilePage::analysis_changed ()
|
||||||
{
|
{
|
||||||
format_state->format->set_analyse (analysis_button.get_active ());
|
format_state->format->set_analyse (analysis_button.get_active ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ExportFileNotebook::FilePage::store_state ()
|
||||||
|
{
|
||||||
|
XMLNode node (X_("ExportFile"));
|
||||||
|
node.add_property ("analyze-audio", analysis_button.get_active () ? "yes" : "no");
|
||||||
|
node.add_property ("soundcloud-upload", soundcloud_upload_button.get_active () ? "yes" : "no");
|
||||||
|
Config->add_instant_xml (node);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ExportFileNotebook::FilePage::restore_state ()
|
||||||
|
{
|
||||||
|
XMLNode* node = Config->instant_xml (X_("ExportFile"));
|
||||||
|
|
||||||
|
if (!node) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
XMLProperty const* prop;
|
||||||
|
|
||||||
|
if ((prop = node->property ("analyze-audio")) != 0) {
|
||||||
|
analysis_button.set_active (string_is_affirmative (prop->value()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((prop = node->property ("soundcloud-upload")) != 0) {
|
||||||
|
soundcloud_upload_button.set_active (string_is_affirmative (prop->value()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ExportFileNotebook::update_example_filenames ()
|
ExportFileNotebook::update_example_filenames ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,11 @@ class ExportFileNotebook : public Gtk::Notebook, public ARDOUR::SessionHandlePtr
|
||||||
void critical_selection_changed ();
|
void critical_selection_changed ();
|
||||||
void analysis_changed ();
|
void analysis_changed ();
|
||||||
|
|
||||||
|
void on_show ();
|
||||||
|
void on_hide ();
|
||||||
|
void store_state ();
|
||||||
|
void restore_state ();
|
||||||
|
|
||||||
ARDOUR::ExportProfileManager::FormatStatePtr format_state;
|
ARDOUR::ExportProfileManager::FormatStatePtr format_state;
|
||||||
ARDOUR::ExportProfileManager::FilenameStatePtr filename_state;
|
ARDOUR::ExportProfileManager::FilenameStatePtr filename_state;
|
||||||
ManagerPtr profile_manager;
|
ManagerPtr profile_manager;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue