mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
tweak export dialog layout, add "open folder" button
This commit is contained in:
parent
f9e526dab8
commit
e641e8b1a3
2 changed files with 25 additions and 10 deletions
|
|
@ -23,6 +23,8 @@
|
||||||
#include <gtkmm/table.h>
|
#include <gtkmm/table.h>
|
||||||
#include <gtkmm/stock.h>
|
#include <gtkmm/stock.h>
|
||||||
|
|
||||||
|
#include "pbd/openuri.h"
|
||||||
|
#include "gtkmm2ext/utils.h"
|
||||||
#include "gtkmm2ext/utils.h"
|
#include "gtkmm2ext/utils.h"
|
||||||
#include "canvas/utils.h"
|
#include "canvas/utils.h"
|
||||||
#include "canvas/colors.h"
|
#include "canvas/colors.h"
|
||||||
|
|
@ -57,8 +59,10 @@ ExportReport::ExportReport (Session* _session, StatusPtr s)
|
||||||
Label *l;
|
Label *l;
|
||||||
VBox *vb = manage (new VBox ());
|
VBox *vb = manage (new VBox ());
|
||||||
Table *t = manage (new Table (4, 4));
|
Table *t = manage (new Table (4, 4));
|
||||||
|
t->set_border_width (0);
|
||||||
t->set_spacings (4);
|
t->set_spacings (4);
|
||||||
vb->set_spacing (4);
|
vb->set_spacing (4);
|
||||||
|
vb->set_border_width (4);
|
||||||
vb->pack_start (*t, false, false, 2);
|
vb->pack_start (*t, false, false, 2);
|
||||||
|
|
||||||
std::string path = i->first;
|
std::string path = i->first;
|
||||||
|
|
@ -72,7 +76,11 @@ ExportReport::ExportReport (Session* _session, StatusPtr s)
|
||||||
l->set_max_width_chars (64);
|
l->set_max_width_chars (64);
|
||||||
l->set_text (path);
|
l->set_text (path);
|
||||||
l->set_alignment (ALIGN_START, ALIGN_CENTER);
|
l->set_alignment (ALIGN_START, ALIGN_CENTER);
|
||||||
t->attach (*l, 1, 4, 0, 1, FILL, SHRINK);
|
t->attach (*l, 1, 3, 0, 1, FILL, SHRINK);
|
||||||
|
|
||||||
|
Button *b = manage (new Button (_("Open Folder")));
|
||||||
|
t->attach (*b, 3, 4, 0, 2, FILL, SHRINK);
|
||||||
|
b->signal_clicked ().connect (sigc::bind (sigc::mem_fun (*this, &ExportReport::open_clicked), path));
|
||||||
|
|
||||||
SoundFileInfo info;
|
SoundFileInfo info;
|
||||||
std::string errmsg;
|
std::string errmsg;
|
||||||
|
|
@ -103,25 +111,25 @@ ExportReport::ExportReport (Session* _session, StatusPtr s)
|
||||||
l->set_max_width_chars (64);
|
l->set_max_width_chars (64);
|
||||||
l->set_text (fmt);
|
l->set_text (fmt);
|
||||||
l->set_alignment (ALIGN_START, ALIGN_CENTER);
|
l->set_alignment (ALIGN_START, ALIGN_CENTER);
|
||||||
t->attach (*l, 1, 4, 1, 2, FILL, SHRINK);
|
t->attach (*l, 1, 3, 1, 2, FILL, SHRINK);
|
||||||
|
|
||||||
l = manage (new Label (_("Channels:"), ALIGN_END));
|
l = manage (new Label (_("Channels:"), ALIGN_END));
|
||||||
t->attach (*l, 0, 1, 2, 3);
|
t->attach (*l, 0, 1, 2, 3);
|
||||||
l = manage (new Label (string_compose ("%1", info.channels)));
|
l = manage (new Label (string_compose ("%1", info.channels), ALIGN_START));
|
||||||
t->attach (*l, 1, 2, 2, 3);
|
t->attach (*l, 1, 2, 2, 3);
|
||||||
|
|
||||||
l = manage (new Label (_("Sample rate:"), ALIGN_END));
|
l = manage (new Label (_("Sample rate:"), ALIGN_END));
|
||||||
t->attach (*l, 2, 3, 2, 3);
|
t->attach (*l, 0, 1, 3, 4);
|
||||||
l = manage (new Label (string_compose (_("%1 Hz"), info.samplerate)));
|
l = manage (new Label (string_compose (_("%1 Hz"), info.samplerate), ALIGN_START));
|
||||||
t->attach (*l, 3, 4, 2, 3);
|
t->attach (*l, 1, 2, 3, 4);
|
||||||
|
|
||||||
l = manage (new Label (_("Duration:"), ALIGN_END));
|
l = manage (new Label (_("Duration:"), ALIGN_END));
|
||||||
t->attach (*l, 0, 1, 3, 4);
|
t->attach (*l, 2, 3, 2, 3);
|
||||||
clock = manage (new AudioClock ("sfboxLengthClock", true, "", false, false, true, false));
|
clock = manage (new AudioClock ("sfboxLengthClock", true, "", false, false, true, false));
|
||||||
clock->set_session (_session);
|
clock->set_session (_session);
|
||||||
clock->set_mode (AudioClock::MinSec);
|
clock->set_mode (AudioClock::MinSec);
|
||||||
clock->set (info.length * src_coef + 0.5, true);
|
clock->set (info.length * src_coef + 0.5, true);
|
||||||
t->attach (*clock, 1, 2, 3, 4);
|
t->attach (*clock, 3, 4, 2, 3);
|
||||||
|
|
||||||
l = manage (new Label (_("Timecode:"), ALIGN_END));
|
l = manage (new Label (_("Timecode:"), ALIGN_END));
|
||||||
t->attach (*l, 2, 3, 3, 4);
|
t->attach (*l, 2, 3, 3, 4);
|
||||||
|
|
@ -332,7 +340,7 @@ ExportReport::ExportReport (Session* _session, StatusPtr s)
|
||||||
layout->set_alignment (Pango::ALIGN_LEFT);
|
layout->set_alignment (Pango::ALIGN_LEFT);
|
||||||
for (int g = -53; g <= -8; g += 5) {
|
for (int g = -53; g <= -8; g += 5) {
|
||||||
// grid-lines. [110] -59LUFS .. [650]: -5 LUFS
|
// grid-lines. [110] -59LUFS .. [650]: -5 LUFS
|
||||||
layout->set_text (string_compose ("%1", g));
|
layout->set_text (string_compose ("%1", std::setw(3), std::setfill(' '), g));
|
||||||
layout->get_pixel_size (w, h);
|
layout->get_pixel_size (w, h);
|
||||||
|
|
||||||
cr->set_operator (Cairo::OPERATOR_OVER);
|
cr->set_operator (Cairo::OPERATOR_OVER);
|
||||||
|
|
@ -579,3 +587,9 @@ ExportReport::run ()
|
||||||
{
|
{
|
||||||
return ArdourDialog::run ();
|
return ArdourDialog::run ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ExportReport::open_clicked (std::string p)
|
||||||
|
{
|
||||||
|
PBD::open_uri (Glib::path_get_dirname(p));
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,8 @@ public:
|
||||||
int run ();
|
int run ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
StatusPtr status;
|
void open_clicked (std::string);
|
||||||
|
|
||||||
|
StatusPtr status;
|
||||||
Gtk::Notebook pages;
|
Gtk::Notebook pages;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue