summaryrefslogtreecommitdiff
path: root/gtk2_ardour/export_report.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-02-11 16:10:00 +0100
committerRobin Gareus <robin@gareus.org>2016-02-11 16:10:00 +0100
commite641e8b1a33394d63a72693640c12cb26df25d3d (patch)
treebc39edf641505412431a440ccc0c5b9bf9ead217 /gtk2_ardour/export_report.cc
parentf9e526dab811dd792888022dfa779e0e773c1c38 (diff)
tweak export dialog layout, add "open folder" button
Diffstat (limited to 'gtk2_ardour/export_report.cc')
-rw-r--r--gtk2_ardour/export_report.cc32
1 files changed, 23 insertions, 9 deletions
diff --git a/gtk2_ardour/export_report.cc b/gtk2_ardour/export_report.cc
index e4aac1e0fb..86a77635b1 100644
--- a/gtk2_ardour/export_report.cc
+++ b/gtk2_ardour/export_report.cc
@@ -23,6 +23,8 @@
#include <gtkmm/table.h>
#include <gtkmm/stock.h>
+#include "pbd/openuri.h"
+#include "gtkmm2ext/utils.h"
#include "gtkmm2ext/utils.h"
#include "canvas/utils.h"
#include "canvas/colors.h"
@@ -57,8 +59,10 @@ ExportReport::ExportReport (Session* _session, StatusPtr s)
Label *l;
VBox *vb = manage (new VBox ());
Table *t = manage (new Table (4, 4));
+ t->set_border_width (0);
t->set_spacings (4);
vb->set_spacing (4);
+ vb->set_border_width (4);
vb->pack_start (*t, false, false, 2);
std::string path = i->first;
@@ -72,7 +76,11 @@ ExportReport::ExportReport (Session* _session, StatusPtr s)
l->set_max_width_chars (64);
l->set_text (path);
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;
std::string errmsg;
@@ -103,25 +111,25 @@ ExportReport::ExportReport (Session* _session, StatusPtr s)
l->set_max_width_chars (64);
l->set_text (fmt);
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));
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);
l = manage (new Label (_("Sample rate:"), ALIGN_END));
- t->attach (*l, 2, 3, 2, 3);
- l = manage (new Label (string_compose (_("%1 Hz"), info.samplerate)));
- t->attach (*l, 3, 4, 2, 3);
+ t->attach (*l, 0, 1, 3, 4);
+ l = manage (new Label (string_compose (_("%1 Hz"), info.samplerate), ALIGN_START));
+ t->attach (*l, 1, 2, 3, 4);
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->set_session (_session);
clock->set_mode (AudioClock::MinSec);
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));
t->attach (*l, 2, 3, 3, 4);
@@ -332,7 +340,7 @@ ExportReport::ExportReport (Session* _session, StatusPtr s)
layout->set_alignment (Pango::ALIGN_LEFT);
for (int g = -53; g <= -8; g += 5) {
// 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);
cr->set_operator (Cairo::OPERATOR_OVER);
@@ -579,3 +587,9 @@ ExportReport::run ()
{
return ArdourDialog::run ();
}
+
+void
+ExportReport::open_clicked (std::string p)
+{
+ PBD::open_uri (Glib::path_get_dirname(p));
+}