summaryrefslogtreecommitdiff
path: root/gtk2_ardour/export_dialog.cc
diff options
context:
space:
mode:
authorColin Fletcher <colin.m.fletcher@googlemail.com>2014-01-08 15:14:35 +0000
committerColin Fletcher <colin.m.fletcher@googlemail.com>2014-01-08 15:50:34 +0000
commit52003be3695ab703b936163d7284e208790d5363 (patch)
tree6804ad19b3ca6afb9edf84ae63307467ad5da384 /gtk2_ardour/export_dialog.cc
parentcac644270a8626904a4a21f527cdcf5083defa60 (diff)
parent382eb0fc6842f202901245709534477b90bda461 (diff)
Merge remote-tracking branch 'origin/master' into export-dialog
Fix conflicts in: gtk2_ardour/export_dialog.cc gtk2_ardour/export_dialog.h libs/ardour/export_handler.cc
Diffstat (limited to 'gtk2_ardour/export_dialog.cc')
-rw-r--r--gtk2_ardour/export_dialog.cc43
1 files changed, 24 insertions, 19 deletions
diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc
index ae4e8b7f77..dfba7550ac 100644
--- a/gtk2_ardour/export_dialog.cc
+++ b/gtk2_ardour/export_dialog.cc
@@ -174,9 +174,9 @@ ExportDialog::init_components ()
}
void
-ExportDialog::notify_errors ()
+ExportDialog::notify_errors (bool force)
{
- if (status->errors()) {
+ if (force || status->errors()) {
std::string txt = _("Export has been aborted due to an error!\nSee the Log for details.");
Gtk::MessageDialog msg (txt, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
msg.run();
@@ -269,25 +269,30 @@ ExportDialog::soundcloud_upload_progress(double total, double now, std::string t
void
ExportDialog::do_export ()
{
- profile_manager->prepare_for_export ();
- handler->upload_username = soundcloud_selector->username();
- handler->upload_password = soundcloud_selector->password();
- handler->upload_public = soundcloud_selector->upload_public();
- handler->upload_open = soundcloud_selector->upload_open();
-
- handler->SoundcloudProgress.connect_same_thread(
- *this,
- boost::bind(&ExportDialog::soundcloud_upload_progress, this, _1, _2, _3)
- );
+ try {
+ profile_manager->prepare_for_export ();
+ handler->upload_username = soundcloud_selector->username();
+ handler->upload_password = soundcloud_selector->password();
+ handler->upload_public = soundcloud_selector->upload_public();
+ handler->upload_open = soundcloud_selector->upload_open();
+
+ handler->SoundcloudProgress.connect_same_thread(
+ *this,
+ boost::bind(&ExportDialog::soundcloud_upload_progress, this, _1, _2, _3)
+ );
#if 0
- handler->SoundcloudProgress.connect(
- *this, invalidator (*this),
- boost::bind(&ExportDialog::soundcloud_upload_progress, this, _1, _2, _3),
- gui_context()
- );
+ handler->SoundcloudProgress.connect(
+ *this, invalidator (*this),
+ boost::bind(&ExportDialog::soundcloud_upload_progress, this, _1, _2, _3),
+ gui_context()
+ );
#endif
- handler->do_export ();
- show_progress ();
+ handler->do_export ();
+ show_progress ();
+ } catch(std::exception & e) {
+ error << string_compose (_("Export initialization failed: %1"), e.what()) << endmsg;
+ notify_errors(true);
+ }
}
void