summaryrefslogtreecommitdiff
path: root/gtk2_ardour/export_file_notebook.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-02-10 21:28:43 +0100
committerRobin Gareus <robin@gareus.org>2016-02-10 22:35:01 +0100
commitee3125318727976894d7a3d434e5e43d2c90a066 (patch)
treee420c7c3fc49ab9e985394d3b08ed8f907569bf6 /gtk2_ardour/export_file_notebook.cc
parent837f8fac2b3193fd181ef80086aa25108414e0f0 (diff)
GUI for optional analysis
Diffstat (limited to 'gtk2_ardour/export_file_notebook.cc')
-rw-r--r--gtk2_ardour/export_file_notebook.cc19
1 files changed, 16 insertions, 3 deletions
diff --git a/gtk2_ardour/export_file_notebook.cc b/gtk2_ardour/export_file_notebook.cc
index 2469e4f6cc..2f74304ce2 100644
--- a/gtk2_ardour/export_file_notebook.cc
+++ b/gtk2_ardour/export_file_notebook.cc
@@ -109,9 +109,13 @@ ExportFileNotebook::update_soundcloud_upload ()
}
}
}
-
soundcloud_export_selector->set_visible (show_credentials_entry);
+}
+void
+ExportFileNotebook::FilePage::analysis_changed ()
+{
+ format_state->format->set_analyse (analysis_button.get_active ());
}
void
@@ -181,6 +185,7 @@ ExportFileNotebook::handle_page_change (GtkNotebookPage*, uint32_t page)
} else {
last_visible_page = page;
}
+ update_soundcloud_upload ();
}
ExportFileNotebook::FilePage::FilePage (Session * s, ManagerPtr profile_manager, ExportFileNotebook * parent, uint32_t number,
@@ -193,6 +198,7 @@ ExportFileNotebook::FilePage::FilePage (Session * s, ManagerPtr profile_manager,
format_label (_("Format"), Gtk::ALIGN_LEFT),
filename_label (_("Location"), Gtk::ALIGN_LEFT),
soundcloud_upload_button (_("Upload to Soundcloud")),
+ analysis_button (_("Analyze Exported Audio")),
tab_number (number)
{
set_border_width (12);
@@ -201,7 +207,12 @@ ExportFileNotebook::FilePage::FilePage (Session * s, ManagerPtr profile_manager,
pack_start (format_align, false, false, 0);
pack_start (filename_label, false, false, 0);
pack_start (filename_align, false, false, 0);
- pack_start (soundcloud_upload_button, false, false, 0);
+
+ Gtk::HBox *hbox = Gtk::manage (new Gtk::HBox());
+ hbox->set_spacing (6);
+ hbox->pack_start (soundcloud_upload_button, false, false, 0);
+ hbox->pack_start (analysis_button, false, false, 0);
+ pack_start (*hbox, false, false, 0);
format_align.add (format_selector);
format_align.set_padding (6, 12, 18, 0);
@@ -219,7 +230,8 @@ ExportFileNotebook::FilePage::FilePage (Session * s, ManagerPtr profile_manager,
/* Set states */
format_selector.set_state (format_state, s);
- filename_selector.set_state (filename_state, s);
+ filename_selector.set_state (filename_state, s);
+ analysis_button.set_active (format_state->format->analyse());
/* Signals */
@@ -237,6 +249,7 @@ ExportFileNotebook::FilePage::FilePage (Session * s, ManagerPtr profile_manager,
sigc::mem_fun (*this, &ExportFileNotebook::FilePage::critical_selection_changed));
soundcloud_upload_button.signal_toggled().connect (sigc::mem_fun (*parent, &ExportFileNotebook::update_soundcloud_upload));
+ analysis_button.signal_toggled().connect (sigc::mem_fun (*this, &ExportFileNotebook::FilePage::analysis_changed));
/* Tab widget */
tab_close_button.add (*Gtk::manage (new Gtk::Image (::get_icon("close"))));