mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
Export dialog: tidy code, & remove some superfluous debug output
Remove some debug output, tidy up a few whitespace inconsistencies, use DEBUG::Soundcloud in one more place, and zap a couple of unused variables.
This commit is contained in:
parent
70308f5174
commit
f0dbd6c085
5 changed files with 17 additions and 30 deletions
|
|
@ -99,15 +99,10 @@ ExportFileNotebook::update_soundcloud_upload()
|
||||||
|
|
||||||
for (i = 0, format_it = formats.begin(); format_it != formats.end(); ++i, ++format_it) {
|
for (i = 0, format_it = formats.begin(); format_it != formats.end(); ++i, ++format_it) {
|
||||||
FilePage * page;
|
FilePage * page;
|
||||||
std::cerr << "get_nth_soundcloud_upload " << i << std::endl;
|
|
||||||
if ((page = dynamic_cast<FilePage *> (get_nth_page (i)))) {
|
if ((page = dynamic_cast<FilePage *> (get_nth_page (i)))) {
|
||||||
(*format_it)->format->set_soundcloud_upload (page->get_soundcloud_upload ());
|
(*format_it)->format->set_soundcloud_upload (page->get_soundcloud_upload ());
|
||||||
// profile_manager->soundcloud_upload_list.push_back (page->get_soundcloud_upload () );
|
|
||||||
} else {
|
|
||||||
std::cerr << "not a page!" << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
|
|
||||||
*************************************************************************************/
|
*************************************************************************************/
|
||||||
|
#include "ardour/debug.h"
|
||||||
#include "ardour/soundcloud_upload.h"
|
#include "ardour/soundcloud_upload.h"
|
||||||
#include "soundcloud_export_selector.h"
|
#include "soundcloud_export_selector.h"
|
||||||
|
|
||||||
|
|
@ -70,7 +71,6 @@ SoundcloudExportSelector::SoundcloudExportSelector() :
|
||||||
sc_table.set_row_spacings (5);
|
sc_table.set_row_spacings (5);
|
||||||
sc_frame->add (sc_table);
|
sc_frame->add (sc_table);
|
||||||
|
|
||||||
// sc_table.attach ( *( manage (new EventBox (::get_icon (X_("soundcloud"))))) , 0, 1, 0, 1);
|
|
||||||
sc_table.attach ( *(Gtk::manage (new Gtk::Image (get_icon (X_("soundcloud"))))) , 0, 1, 0, 2);
|
sc_table.attach ( *(Gtk::manage (new Gtk::Image (get_icon (X_("soundcloud"))))) , 0, 1, 0, 2);
|
||||||
|
|
||||||
sc_table.attach (soundcloud_username_label, 0, 1, 1, 2);
|
sc_table.attach (soundcloud_username_label, 0, 1, 1, 2);
|
||||||
|
|
@ -89,7 +89,7 @@ SoundcloudExportSelector::SoundcloudExportSelector() :
|
||||||
int
|
int
|
||||||
SoundcloudExportSelector::do_progress_callback (double ultotal, double ulnow, const std::string &filename)
|
SoundcloudExportSelector::do_progress_callback (double ultotal, double ulnow, const std::string &filename)
|
||||||
{
|
{
|
||||||
std::cerr << "SoundcloudExportSelector::do_progress_callback(" << ultotal << ", " << ulnow << ", " << filename << ")..." << std::endl;
|
DEBUG_TRACE (DEBUG::Soundcloud, string_compose ("SoundcloudExportSelector::do_progress_callback(%1, %2, %3)", ultotal, ulnow, filename));
|
||||||
if (soundcloud_cancel) {
|
if (soundcloud_cancel) {
|
||||||
progress_bar.set_fraction (0);
|
progress_bar.set_fraction (0);
|
||||||
// cancel_button.set_label ("");
|
// cancel_button.set_label ("");
|
||||||
|
|
|
||||||
|
|
@ -328,20 +328,15 @@ ExportHandler::finish_timespan ()
|
||||||
subs.insert (std::pair<char, std::string> ('s', session.path ()));
|
subs.insert (std::pair<char, std::string> ('s', session.path ()));
|
||||||
subs.insert (std::pair<char, std::string> ('n', session.name ()));
|
subs.insert (std::pair<char, std::string> ('n', session.name ()));
|
||||||
|
|
||||||
|
|
||||||
std::cerr << "running command: " << fmt->command() << "..." << std::endl;
|
|
||||||
ARDOUR::SystemExec *se = new ARDOUR::SystemExec(fmt->command(), subs);
|
ARDOUR::SystemExec *se = new ARDOUR::SystemExec(fmt->command(), subs);
|
||||||
se->ReadStdout.connect_same_thread(command_connection, boost::bind(&ExportHandler::command_output, this, _1, _2));
|
se->ReadStdout.connect_same_thread(command_connection, boost::bind(&ExportHandler::command_output, this, _1, _2));
|
||||||
if (se->start (2) == 0) {
|
if (se->start (2) == 0) {
|
||||||
// successfully started
|
// successfully started
|
||||||
std::cerr << "started!" << std::endl;
|
|
||||||
while (se->is_running ()) {
|
while (se->is_running ()) {
|
||||||
// wait for system exec to terminate
|
// wait for system exec to terminate
|
||||||
// std::cerr << "waiting..." << std::endl;
|
|
||||||
Glib::usleep (1000);
|
Glib::usleep (1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::cerr << "done! deleting..." << std::endl;
|
|
||||||
delete (se);
|
delete (se);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -274,9 +274,6 @@ SystemExec::make_argp_escaped(std::string command, const std::map<char, std::str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
argp[n] = NULL;
|
argp[n] = NULL;
|
||||||
|
|
||||||
char *p = argp[0];
|
|
||||||
n = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemExec::~SystemExec ()
|
SystemExec::~SystemExec ()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue