Visual tweaks to Soundcloud panel
Re-arrange the items in the Soundcloud panel into a more sensible order & arrangement, and add a (not-yet functional) tick-box to set the uploaded files to be downloadable.
This commit is contained in:
parent
84bcf59812
commit
b49e398250
@ -40,15 +40,17 @@ using namespace PBD;
|
|||||||
|
|
||||||
SoundcloudExportSelector::SoundcloudExportSelector() :
|
SoundcloudExportSelector::SoundcloudExportSelector() :
|
||||||
sc_table (4, 3),
|
sc_table (4, 3),
|
||||||
soundcloud_public_checkbox (_("Make file(s) public")),
|
|
||||||
soundcloud_username_label (_("User Email"), 1.0, 0.5),
|
soundcloud_username_label (_("User Email"), 1.0, 0.5),
|
||||||
soundcloud_password_label (_("Password"), 1.0, 0.5),
|
soundcloud_password_label (_("Password"), 1.0, 0.5),
|
||||||
|
soundcloud_public_checkbox (_("Make files public")),
|
||||||
soundcloud_open_checkbox (_("Open uploaded files in browser")),
|
soundcloud_open_checkbox (_("Open uploaded files in browser")),
|
||||||
|
soundcloud_download_checkbox (_("Make files downloadable")),
|
||||||
progress_bar()
|
progress_bar()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
soundcloud_public_checkbox.set_name ("ExportCheckbox");
|
soundcloud_public_checkbox.set_name ("ExportCheckbox");
|
||||||
|
soundcloud_download_checkbox.set_name ("ExportCheckbox");
|
||||||
soundcloud_username_label.set_name ("ExportFormatLabel");
|
soundcloud_username_label.set_name ("ExportFormatLabel");
|
||||||
soundcloud_username_entry.set_name ("ExportFormatDisplay");
|
soundcloud_username_entry.set_name ("ExportFormatDisplay");
|
||||||
soundcloud_password_label.set_name ("ExportFormatLabel");
|
soundcloud_password_label.set_name ("ExportFormatLabel");
|
||||||
@ -63,7 +65,7 @@ SoundcloudExportSelector::SoundcloudExportSelector() :
|
|||||||
sc_frame->set_name("soundcloud_export_box");
|
sc_frame->set_name("soundcloud_export_box");
|
||||||
pack_start(*sc_frame, false, false);
|
pack_start(*sc_frame, false, false);
|
||||||
|
|
||||||
sc_table.set_border_width(4);
|
sc_table.set_border_width (4);
|
||||||
sc_table.set_col_spacings (5);
|
sc_table.set_col_spacings (5);
|
||||||
sc_table.set_row_spacings (5);
|
sc_table.set_row_spacings (5);
|
||||||
sc_frame->add (sc_table);
|
sc_frame->add (sc_table);
|
||||||
@ -71,12 +73,13 @@ SoundcloudExportSelector::SoundcloudExportSelector() :
|
|||||||
// sc_table.attach ( *( manage (new EventBox (::get_icon (X_("soundcloud"))))) , 0, 1, 0, 1);
|
// 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_public_checkbox, 2, 3, 1, 2);
|
sc_table.attach (soundcloud_username_label, 0, 1, 1, 2);
|
||||||
sc_table.attach (soundcloud_username_label, 0, 1, 3, 4);
|
sc_table.attach (soundcloud_username_entry, 1, 3, 1, 2);
|
||||||
sc_table.attach (soundcloud_username_entry, 1, 3, 3, 4);
|
sc_table.attach (soundcloud_password_label, 0, 1, 2, 3);
|
||||||
sc_table.attach (soundcloud_password_label, 0, 1, 5, 6);
|
sc_table.attach (soundcloud_password_entry, 1, 3, 2, 3);
|
||||||
sc_table.attach (soundcloud_password_entry, 1, 3, 5, 6);
|
sc_table.attach (soundcloud_public_checkbox, 2, 3, 3, 4);
|
||||||
sc_table.attach (soundcloud_open_checkbox, 2, 3, 7, 8);
|
sc_table.attach (soundcloud_open_checkbox, 2, 3, 4, 5);
|
||||||
|
sc_table.attach (soundcloud_download_checkbox, 2, 3, 5, 6);
|
||||||
|
|
||||||
pack_end(progress_bar, false, false);
|
pack_end(progress_bar, false, false);
|
||||||
sc_frame->show_all();
|
sc_frame->show_all();
|
||||||
|
@ -24,16 +24,18 @@ class SoundcloudExportSelector : public Gtk::VBox, public ARDOUR::SessionHandleP
|
|||||||
std::string password () { return soundcloud_password_entry.get_text (); }
|
std::string password () { return soundcloud_password_entry.get_text (); }
|
||||||
bool make_public () { return soundcloud_public_checkbox.get_active (); }
|
bool make_public () { return soundcloud_public_checkbox.get_active (); }
|
||||||
bool open_page () { return soundcloud_open_checkbox.get_active (); }
|
bool open_page () { return soundcloud_open_checkbox.get_active (); }
|
||||||
|
bool downloadable () { return soundcloud_download_checkbox.get_active (); }
|
||||||
void cancel () { soundcloud_cancel = true; }
|
void cancel () { soundcloud_cancel = true; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gtk::Table sc_table;
|
Gtk::Table sc_table;
|
||||||
Gtk::CheckButton soundcloud_public_checkbox;
|
|
||||||
Gtk::Label soundcloud_username_label;
|
Gtk::Label soundcloud_username_label;
|
||||||
Gtk::Entry soundcloud_username_entry;
|
Gtk::Entry soundcloud_username_entry;
|
||||||
Gtk::Label soundcloud_password_label;
|
Gtk::Label soundcloud_password_label;
|
||||||
Gtk::Entry soundcloud_password_entry;
|
Gtk::Entry soundcloud_password_entry;
|
||||||
|
Gtk::CheckButton soundcloud_public_checkbox;
|
||||||
Gtk::CheckButton soundcloud_open_checkbox;
|
Gtk::CheckButton soundcloud_open_checkbox;
|
||||||
|
Gtk::CheckButton soundcloud_download_checkbox;
|
||||||
bool soundcloud_cancel;
|
bool soundcloud_cancel;
|
||||||
Gtk::ProgressBar progress_bar;
|
Gtk::ProgressBar progress_bar;
|
||||||
|
|
||||||
|
@ -118,6 +118,7 @@ class LIBARDOUR_API ExportHandler : public ExportElementFactory, public sigc::tr
|
|||||||
std::string soundcloud_password;
|
std::string soundcloud_password;
|
||||||
bool soundcloud_make_public;
|
bool soundcloud_make_public;
|
||||||
bool soundcloud_open_page;
|
bool soundcloud_open_page;
|
||||||
|
bool soundcloud_downloadable;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
~SoundcloudUploader();
|
~SoundcloudUploader();
|
||||||
|
|
||||||
std::string Get_Auth_Token(std::string username, std::string password);
|
std::string Get_Auth_Token(std::string username, std::string password);
|
||||||
std::string Upload (std::string file_path, std::string title, std::string token, bool ispublic, ARDOUR::ExportHandler *caller);
|
std::string Upload (std::string file_path, std::string title, std::string token, bool ispublic, bool downloadable, ARDOUR::ExportHandler *caller);
|
||||||
static int progress_callback(void *caller, double dltotal, double dlnow, double ultotal, double ulnow);
|
static int progress_callback(void *caller, double dltotal, double dlnow, double ultotal, double ulnow);
|
||||||
|
|
||||||
|
|
||||||
|
@ -360,6 +360,7 @@ ExportHandler::finish_timespan ()
|
|||||||
PBD::basename_nosuffix(filename), // title
|
PBD::basename_nosuffix(filename), // title
|
||||||
token,
|
token,
|
||||||
soundcloud_make_public,
|
soundcloud_make_public,
|
||||||
|
soundcloud_downloadable,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
if (path.length() != 0) {
|
if (path.length() != 0) {
|
||||||
|
@ -155,7 +155,7 @@ SoundcloudUploader::progress_callback(void *caller, double dltotal, double dlnow
|
|||||||
|
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
SoundcloudUploader::Upload(std::string file_path, std::string title, std::string token, bool ispublic, ARDOUR::ExportHandler *caller)
|
SoundcloudUploader::Upload(std::string file_path, std::string title, std::string token, bool ispublic, bool downloadable, ARDOUR::ExportHandler *caller)
|
||||||
{
|
{
|
||||||
int still_running;
|
int still_running;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user