22 #include <sigc++/signal.h>
24 #include <gtkmm/messagedialog.h>
45 , warn_label (
"",
Gtk::ALIGN_LEFT)
46 , list_files_label (
_(
"<span color=\"#ffa755\">Some already existing files will be overwritten.</span>"),
Gtk::ALIGN_RIGHT)
47 , list_files_button (
_(
"List files"))
56 SessionHandlePtr::set_session (s);
141 show_all_children ();
148 Gtk::Alignment * preset_align = Gtk::manage (
new Gtk::Alignment());
150 preset_align->set_padding (0, 12, 0, 0);
152 Gtk::VBox * file_format_selector = Gtk::manage (
new Gtk::VBox());
153 file_format_selector->set_homogeneous (
false);
154 file_format_selector->pack_start (*preset_align,
false,
false, 0);
155 file_format_selector->pack_start (*
file_notebook,
false,
false, 0);
182 std::string txt =
_(
"Export has been aborted due to an error!\nSee the Log for details.");
183 Gtk::MessageDialog msg (txt,
false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK,
true);
227 for (std::list<string>::iterator it = warnings->
errors.begin(); it != warnings->
errors.end(); ++it) {
231 for (std::list<string>::iterator it = warnings->
warnings.begin(); it != warnings->
warnings.end(); ++it) {
238 string::size_type pos = it->find_last_of (
"/");
239 list_files_string += it->substr (0, pos + 1) +
"<b>" + it->substr (pos + 1) +
"</b>\n";
251 ArdourDialog dialog (
_(
"Files that will be overwritten"),
true);
253 Gtk::Label label (
"", Gtk::ALIGN_LEFT);
254 label.set_use_markup (
true);
257 dialog.get_vbox()->pack_start (label);
258 dialog.add_button (Gtk::Stock::OK, 0);
259 dialog.show_all_children ();
295 }
catch(std::exception & e) {
315 gtk_main_iteration ();
318 if (gtk_events_pending()) {
319 gtk_main_iteration ();
321 Glib::usleep (10000);
343 std::string status_text;
344 float progress = 0.0;
346 status_text =
string_compose (
_(
"Normalizing '%3' (timespan %1 of %2)"),
373 warn_string =
_(
"<span color=\"#ffa755\">Error: ") + text +
"</span>";
385 warn_string =
_(
"<span color=\"#ffa755\">Warning: ") + text +
"</span>";
void add_warning(std::string const &text)
Gtk::Button * export_button
ARDOUR::AudioRegion const & region
void abort(bool error_occurred=false)
sigc::connection progress_connection
std::string timespan_name
volatile uint32_t timespan
boost::scoped_ptr< ExportTimespanSelector > timespan_selector
ARDOUR::AudioTrack & track
volatile framecnt_t processed_frames_current_timespan
std::string soundcloud_username
Gtk::HBox list_files_hbox
volatile framecnt_t total_frames_current_timespan
static NagScreen * maybe_nag(std::string context)
Representation of the interface of the Editor class.
void set_session(ARDOUR::Session *s)
LIBPBD_API Transmitter error
StemExportDialog(PublicEditor &editor)
std::ostream & endmsg(std::ostream &ostr)
std::string set_single_range(framepos_t start, framepos_t end, std::string name)
boost::shared_ptr< ExportStatus > get_export_status()
std::list< std::string > warnings
boost::shared_ptr< ExportHandler > get_export_handler()
ExportDialog(PublicEditor &editor, std::string title, ARDOUR::ExportProfileManager::ExportType type)
void add_error(std::string const &text)
void notify_errors(bool force=false)
Gtk::VBox progress_widget
void soundcloud_upload_progress(double total, double now, std::string title)
void set_selection_range(framepos_t start=0, framepos_t end=0)
std::string list_files_string
bool soundcloud_open_page
Manages (de)serialization of export profiles and related classes.
virtual Selection & get_selection() const =0
Gtk::Button * cancel_button
volatile uint32_t total_normalize_cycles
ExportRangeDialog(PublicEditor &editor, std::string range_id)
Allows selecting multiple timespans.
framepos_t position() const
Gtk::Label list_files_label
virtual void init_components()
std::string soundcloud_password
ExportSelectionDialog(PublicEditor &editor)
boost::shared_ptr< Warnings > get_warnings()
boost::scoped_ptr< ExportFileNotebook > file_notebook
void prepare_for_export()
Gtk::Button list_files_button
void show_conflicting_files()
Gtk::Notebook export_notebook
bool soundcloud_make_public
framecnt_t length() const
boost::shared_ptr< SoundcloudExportSelector > soundcloud_selector
volatile uint32_t total_timespans
Gtk::ProgressBar progress_bar
volatile uint32_t current_normalize_cycle
std::list< std::string > conflicting_filenames
std::list< std::string > errors
bool soundcloud_downloadable
volatile bool normalizing
ARDOUR::Session * _session
boost::scoped_ptr< ExportPresetSelector > preset_selector
int do_progress_callback(double ultotal, double ulnow, const std::string &filename)
ManagerPtr profile_manager
boost::scoped_ptr< ExportChannelSelector > channel_selector
ExportRegionDialog(PublicEditor &editor, ARDOUR::AudioRegion const ®ion, ARDOUR::AudioTrack &track)
std::string string_compose(const std::string &fmt, const T1 &o1)
PBD::Signal3< void, double, double, std::string > SoundcloudProgress
ARDOUR::ExportProfileManager::ExportType type
void update_warnings_and_example_filename()