diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index fe1c1ac2dc..4ee9ddf8ed 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -134,6 +134,8 @@ ExportDialog::init () cancel_button->signal_clicked().connect (sigc::mem_fun (*this, &ExportDialog::close_dialog)); export_button->signal_clicked().connect (sigc::mem_fun (*this, &ExportDialog::do_export)); + file_notebook->soundcloud_export_selector = soundcloud_selector; + /* Done! */ show_all_children (); diff --git a/gtk2_ardour/export_dialog.h b/gtk2_ardour/export_dialog.h index 315780750e..5e895e54c8 100644 --- a/gtk2_ardour/export_dialog.h +++ b/gtk2_ardour/export_dialog.h @@ -81,7 +81,8 @@ class ExportDialog : public ArdourDialog, public PBD::ScopedConnectionList boost::scoped_ptr timespan_selector; boost::scoped_ptr channel_selector; boost::scoped_ptr file_notebook; - boost::scoped_ptr soundcloud_selector; + + boost::shared_ptr soundcloud_selector; Gtk::VBox warning_widget; Gtk::VBox progress_widget; diff --git a/gtk2_ardour/export_file_notebook.cc b/gtk2_ardour/export_file_notebook.cc index b90aa463bc..c313038e05 100644 --- a/gtk2_ardour/export_file_notebook.cc +++ b/gtk2_ardour/export_file_notebook.cc @@ -94,15 +94,23 @@ void ExportFileNotebook::update_soundcloud_upload () { int i; + bool show_credentials_entry = false; ExportProfileManager::FormatStateList const & formats = profile_manager->get_formats (); ExportProfileManager::FormatStateList::const_iterator format_it; for (i = 0, format_it = formats.begin(); format_it != formats.end(); ++i, ++format_it) { FilePage * page; if ((page = dynamic_cast (get_nth_page (i)))) { - (*format_it)->format->set_soundcloud_upload (page->get_soundcloud_upload ()); + bool this_soundcloud_upload = page->get_soundcloud_upload (); + (*format_it)->format->set_soundcloud_upload (this_soundcloud_upload); + if (this_soundcloud_upload) { + show_credentials_entry = true; + } } } + + soundcloud_export_selector->set_visible (show_credentials_entry); + } void diff --git a/gtk2_ardour/export_file_notebook.h b/gtk2_ardour/export_file_notebook.h index 52c87c3717..42a05e7611 100644 --- a/gtk2_ardour/export_file_notebook.h +++ b/gtk2_ardour/export_file_notebook.h @@ -29,6 +29,7 @@ #include "export_format_selector.h" #include "export_filename_selector.h" +#include "soundcloud_export_selector.h" class ExportFileNotebook : public Gtk::Notebook, public ARDOUR::SessionHandlePtr { @@ -40,6 +41,8 @@ class ExportFileNotebook : public Gtk::Notebook, public ARDOUR::SessionHandlePtr void sync_with_manager (); void update_example_filenames(); + boost::shared_ptr soundcloud_export_selector; + sigc::signal CriticalSelectionChanged; private: