2 * Copyright (C) 2016 Robin Gareus <robin@gareus.org>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include <pangomm/layout.h>
22 #include <gtkmm/label.h>
23 #include <gtkmm/table.h>
24 #include <gtkmm/stock.h>
26 #include "gtkmm2ext/utils.h"
27 #include "canvas/utils.h"
28 #include "canvas/colors.h"
30 #include "ardour/audiofilesource.h"
31 #include "ardour/session.h"
32 #include "ardour/ardour/dB.h"
34 #include "audio_clock.h"
35 #include "ui_config.h"
36 #include "export_report.h"
41 using namespace ARDOUR;
43 ExportReport::ExportReport (Session* _session, StatusPtr s)
44 : ArdourDialog (_("Export Report/Analysis"))
47 set_resizable (false);
48 pages.set_scrollable ();
50 AnalysisResults & ar = status->result_map;
52 std::vector<double> dashes;
53 dashes.push_back (3.0);
54 dashes.push_back (5.0);
56 for (AnalysisResults::iterator i = ar.begin (); i != ar.end (); ++i) {
58 VBox *vb = manage (new VBox ());
59 Table *t = manage (new Table (4, 4));
62 vb->pack_start (*t, false, false, 2);
64 std::string path = i->first;
65 ExportAnalysisPtr p = i->second;
67 l = manage (new Label (_("File:"), ALIGN_END));
68 t->attach (*l, 0, 1, 0, 1);
69 l = manage (new Label ());
70 l->set_ellipsize (Pango::ELLIPSIZE_START);
71 l->set_width_chars (64);
72 l->set_max_width_chars (64);
74 l->set_alignment (ALIGN_START, ALIGN_CENTER);
75 t->attach (*l, 1, 4, 0, 1, FILL, SHRINK);
80 framecnt_t file_length = 0;
81 framecnt_t sample_rate = 0;
82 framecnt_t start_off = 0;
84 if (AudioFileSource::get_soundfile_info (path, info, errmsg)) {
87 file_length = info.length;
88 sample_rate = info.samplerate;
89 start_off = info.timecode;
93 framecnt_t const nfr = _session ? _session->nominal_frame_rate () : 25;
94 double src_coef = (double) nfr / info.samplerate;
96 l = manage (new Label (_("Format:"), ALIGN_END));
97 t->attach (*l, 0, 1, 1, 2);
98 std::string fmt = info.format_name;
99 std::replace (fmt.begin (), fmt.end (), '\n', ' ');
100 l = manage (new Label ());
101 l->set_ellipsize (Pango::ELLIPSIZE_START);
102 l->set_width_chars (64);
103 l->set_max_width_chars (64);
105 l->set_alignment (ALIGN_START, ALIGN_CENTER);
106 t->attach (*l, 1, 4, 1, 2, FILL, SHRINK);
108 l = manage (new Label (_("Channels:"), ALIGN_END));
109 t->attach (*l, 0, 1, 2, 3);
110 l = manage (new Label (string_compose ("%1", info.channels)));
111 t->attach (*l, 1, 2, 2, 3);
113 l = manage (new Label (_("Sample rate:"), ALIGN_END));
114 t->attach (*l, 2, 3, 2, 3);
115 l = manage (new Label (string_compose (_("%1 Hz"), info.samplerate)));
116 t->attach (*l, 3, 4, 2, 3);
118 l = manage (new Label (_("Duration:"), ALIGN_END));
119 t->attach (*l, 0, 1, 3, 4);
120 clock = manage (new AudioClock ("sfboxLengthClock", true, "", false, false, true, false));
121 clock->set_session (_session);
122 clock->set_mode (AudioClock::MinSec);
123 clock->set (info.length * src_coef + 0.5, true);
124 t->attach (*clock, 1, 2, 3, 4);
126 l = manage (new Label (_("Timecode:"), ALIGN_END));
127 t->attach (*l, 2, 3, 3, 4);
128 clock = manage (new AudioClock ("sfboxTimecodeClock", true, "", false, false, false, false));
129 clock->set_session (_session);
130 clock->set_mode (AudioClock::Timecode);
131 clock->set (info.timecode * src_coef + 0.5, true);
132 t->attach (*clock, 3, 4, 3, 4);
134 l = manage (new Label (_("Error:"), ALIGN_END));
135 t->attach (*l, 0, 1, 1, 2);
136 l = manage (new Label (errmsg, ALIGN_START));
137 t->attach (*l, 1, 4, 1, 2);
141 Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create (get_pango_context ());
143 // calc geometry of numerics
144 const float dbfs = accurate_coefficient_to_dB (p->peak);
145 const float dbtp = accurate_coefficient_to_dB (p->truepeak);
147 #define TXTSIZE(LINE, TXT, FONT) { \
148 layout->set_font_description (UIConfiguration::instance ().FONT ()); \
149 layout->set_text (TXT); \
150 layout->get_pixel_size (w, h); \
151 if (w > mnw) { mnw = w; } \
152 if (h > lin[LINE]) { lin[LINE] = h; } \
155 #define TXTWIDTH(TXT, FONT) { \
156 layout->set_font_description (UIConfiguration::instance ().FONT ()); \
157 layout->set_text (TXT); \
158 layout->get_pixel_size (w, h); \
159 if (w > mml) { mml = w; } \
162 int mnw = 0; // max numeric width
163 int lin[4] = { 0, 0, 0, 0 }; // max line height
165 TXTSIZE(0, _("Peak:"), get_SmallFont);
166 TXTSIZE(1, string_compose (_("%1 dBFS"), std::setprecision (1), std::fixed, dbfs), get_LargeFont);
167 TXTSIZE(2, _("True Peak:"), get_SmallFont);
168 TXTSIZE(3, string_compose (_("%1 dBTP"), std::setprecision (1), std::fixed, dbtp), get_LargeFont);
170 TXTSIZE(0, _("Integrated Loudness:"), get_SmallFont);
171 TXTSIZE(1, string_compose (_("%1 LUFS"), std::setprecision (1), std::fixed, p->loudness), get_LargeFont);
172 TXTSIZE(2, _("Loudness Range:"), get_SmallFont);
173 TXTSIZE(3, string_compose (_("%1 LU"), std::setprecision (1), std::fixed, p->loudness_range), get_LargeFont);
176 const int ht = lin[0] * 1.25 + lin[1] * 1.25 + lin[2] * 1.25 + lin[3] + 8;
177 const int hh = std::max (100, ht);
178 int m_l = 2 * mnw + /*hist-width*/ 540 + /*box spacing*/ 8 - /*peak-width*/ 800; // margin left
180 int mml = 0; // min margin left -- ensure left margin is wide enough
181 TXTWIDTH (_("Time"), get_SmallFont);
182 TXTWIDTH (_("100"), get_SmallMonospaceFont);
183 m_l = (std::max (m_l, mml + 8) + 3) & ~3;
185 mnw = (m_l - /*hist-width*/ 540 - /*box spacing*/ 8 + /*peak-width*/ 800) / 2;
186 const int nw2 = mnw / 2; // nums, horizontal center
189 y0[0] = (hh - ht) * .5 + lin[0] * .25;
190 y0[1] = y0[0] + lin[0] * 1.25;
191 y0[2] = y0[1] + lin[1] * 1.25;
192 y0[3] = y0[2] + lin[2] * 1.25;
195 { /* peak, loudness and R128 histogram */
196 Cairo::RefPtr<Cairo::ImageSurface> nums = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, mnw, hh);
197 Cairo::RefPtr<Cairo::ImageSurface> ebur = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, mnw, hh);
198 Cairo::RefPtr<Cairo::ImageSurface> hist = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, 540, hh);
200 /* peak and true-peak numerics */
201 Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create (nums);
202 cr->set_source_rgba (0, 0, 0, 1.0);
205 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
206 layout->set_alignment (Pango::ALIGN_LEFT);
207 layout->set_text (_("Peak:"));
208 layout->get_pixel_size (w, h);
209 cr->move_to (rint (nw2 - w * .5), y0[0]);
210 cr->set_source_rgba (.7, .7, .7, 1.0);
211 layout->show_in_cairo_context (cr);
213 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
214 layout->set_text (string_compose (_("%1 dBFS"), std::setprecision (1), std::fixed,
215 accurate_coefficient_to_dB (p->peak)));
216 layout->get_pixel_size (w, h);
217 cr->move_to (rint (nw2 - w * .5), y0[1]);
218 if (p->peak > .944) { cr->set_source_rgba (1.0, .5, .5, 1.0); }
219 layout->show_in_cairo_context (cr);
222 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
223 layout->set_text (_("True Peak:"));
224 layout->get_pixel_size (w, h);
225 cr->move_to (rint (nw2 - w * .5), y0[2]);
226 cr->set_source_rgba (.7, .7, .7, 1.0);
227 layout->show_in_cairo_context (cr);
229 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
230 layout->set_text (string_compose (_("%1 dBTP"), std::setprecision (1), std::fixed,
231 accurate_coefficient_to_dB (p->truepeak)));
232 layout->get_pixel_size (w, h);
233 cr->move_to (rint (nw2 - w * .5), y0[3]);
234 if (p->truepeak > .944) { cr->set_source_rgba (1.0, .5, .5, 1.0); }
235 layout->show_in_cairo_context (cr);
240 /* EBU R128 numerics */
241 cr = Cairo::Context::create (ebur);
242 cr->set_source_rgba (0, 0, 0, 1.0);
245 cr->set_source_rgba (.7, .7, .7, 1.0);
247 if (!i->second->have_loudness) {
248 layout->set_alignment (Pango::ALIGN_CENTER);
249 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
250 layout->set_text (_("not\navailable"));
251 layout->get_pixel_size (w, h);
252 cr->move_to (rint (nw2 - w * .5), rint (hh - h * .5));
253 layout->show_in_cairo_context (cr);
255 else if (p->loudness == -200 && p->loudness_range == 0) {
256 layout->set_alignment (Pango::ALIGN_CENTER);
257 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
258 layout->set_text (_("not\navailable"));
259 layout->get_pixel_size (w, h);
260 cr->move_to (rint (nw2 - w * .5), rint (hh - h * .6));
261 layout->show_in_cairo_context (cr);
264 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
265 layout->set_text (_("(too short integration time)"));
266 layout->get_pixel_size (w, h);
267 cr->move_to (rint (nw2 - w * .5), rint (hh + yy));
268 layout->show_in_cairo_context (cr);
271 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
272 layout->set_alignment (Pango::ALIGN_LEFT);
273 layout->set_text (_("Integrated Loudness:"));
274 layout->get_pixel_size (w, h);
275 cr->move_to (rint (nw2 - w * .5), y0[0]);
276 layout->show_in_cairo_context (cr);
278 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
279 layout->set_text (string_compose (_("%1 LUFS"), std::setprecision (1), std::fixed, p->loudness));
280 layout->get_pixel_size (w, h);
281 cr->move_to (rint (nw2 - w * .5), y0[1]);
282 layout->show_in_cairo_context (cr);
284 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
285 layout->set_text (_("Loudness Range:"));
286 layout->get_pixel_size (w, h);
287 cr->move_to (rint (nw2 - w * .5), y0[2]);
288 layout->show_in_cairo_context (cr);
290 layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
291 layout->set_text (string_compose (_("%1 LU"), std::setprecision (1), std::fixed, p->loudness_range));
292 layout->get_pixel_size (w, h);
293 cr->move_to (rint (nw2 - w * .5), y0[3]);
294 layout->show_in_cairo_context (cr);
298 /* draw loudness histogram */
299 cr = Cairo::Context::create (hist);
300 cr->set_source_rgba (0, 0, 0, 1.0);
303 cr->set_source_rgba (.7, .7, .7, 1.0);
304 cr->set_line_width (1.0);
306 if (p->loudness_hist_max > 0 && i->second->have_loudness) {
307 for (size_t x = 0 ; x < 510; ++x) {
308 cr->move_to (x - .5, hh);
309 cr->line_to (x - .5, (float) hh * (1.0 - p->loudness_hist[x] / (float) p->loudness_hist_max));
314 layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
315 layout->set_alignment (Pango::ALIGN_CENTER);
318 layout->set_text (_("LUFS\n(short)"));
319 layout->get_pixel_size (w, h);
320 Gtkmm2ext::rounded_rectangle (cr, 5, rint (.5 * (hh - w) - 1), h + 2, w + 2, 4);
321 cr->set_source_rgba (.1, .1, .1, 0.7);
324 cr->move_to (6, rint (.5 * (hh + w)));
325 cr->set_source_rgba (.9, .9, .9, 1.0);
326 cr->rotate (M_PI / -2.0);
327 layout->show_in_cairo_context (cr);
331 layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
332 layout->set_alignment (Pango::ALIGN_LEFT);
333 for (int g = -53; g <= -8; g += 5) {
334 // grid-lines. [110] -59LUFS .. [650]: -5 LUFS
335 layout->set_text (string_compose ("%1", g));
336 layout->get_pixel_size (w, h);
338 cr->set_operator (Cairo::OPERATOR_OVER);
339 Gtkmm2ext::rounded_rectangle (cr,
340 rint ((g + 59.0) * 10.0 - h * .5), 5,
342 const float pk = (g + 59.0) / 54.0;
343 ArdourCanvas::Color c = ArdourCanvas::hsva_to_color (252 - 260 * pk, .9, .3 + pk * .4, .6);
344 ArdourCanvas::set_source_rgba (cr, c);
348 cr->set_source_rgba (.9, .9, .9, 1.0);
349 cr->move_to (rint ((g + 59.0) * 10.0 - h * .5), w + 6.0);
350 cr->rotate (M_PI / -2.0);
351 layout->show_in_cairo_context (cr);
354 cr->set_operator (Cairo::OPERATOR_ADD);
356 cr->set_source_rgba (.3, .3, .3, 1.0);
357 cr->set_dash (dashes, 1.0);
358 cr->set_line_cap (Cairo::LINE_CAP_ROUND);
359 cr->move_to (rint ((g + 59.0) * 10.0) + .5, w + 8.0);
360 cr->line_to (rint ((g + 59.0) * 10.0) + .5, hh);
367 CimgArea *nu = manage (new CimgArea (nums));
368 CimgArea *eb = manage (new CimgArea (ebur));
369 CimgArea *hi = manage (new CimgArea (hist));
370 HBox *hb = manage (new HBox ());
372 hb->pack_start (*nu, false, false);
373 hb->pack_start (*hi, false, false);
374 hb->pack_start (*eb, false, false);
375 vb->pack_start (*hb, false, false);
378 #define XAXISLABEL(POS, TXT) { \
379 const float yy = rint (POS); \
380 layout->set_text (TXT); \
381 layout->get_pixel_size (w, h); \
382 cr->move_to (m_l - 8 - w, rint ((POS) - h * .5)); \
383 cr->set_source_rgba (.9, .9, .9, 1.0); \
384 cr->set_operator (Cairo::OPERATOR_OVER); \
385 layout->show_in_cairo_context (cr); \
386 cr->move_to (m_l - 4, yy - .5); \
387 cr->line_to (m_l + width, yy - .5); \
388 cr->set_source_rgba (.3, .3, .3, 1.0); \
389 cr->set_operator (Cairo::OPERATOR_ADD); \
393 for (uint32_t c = 0; c < p->n_channels; ++c) {
395 const size_t width = sizeof (p->peaks) / sizeof (ARDOUR::PeakData::PeakDatum) / 4;
396 const float height_2 = std::min (100, 8 * lin[0] / (int) p->n_channels); // TODO refine
398 Cairo::RefPtr<Cairo::ImageSurface> wave = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, m_l + width, 2 * height_2);
399 Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create (wave);
400 cr->set_operator (Cairo::OPERATOR_SOURCE);
401 cr->rectangle (0, 0, m_l, 2 * height_2);
402 cr->set_source_rgba (0, 0, 0, 0);
404 cr->rectangle (m_l, 0, width, 2 * height_2);
405 cr->set_source_rgba (0, 0, 0, 1.0);
407 cr->set_operator (Cairo::OPERATOR_OVER);
409 cr->set_source_rgba (.7, .7, .7, 1.0);
410 cr->set_line_width (1.0);
411 for (size_t x = 0 ; x < width; ++x) {
412 cr->move_to (m_l + x - .5, height_2 - height_2 * p->peaks[c][x].max);
413 cr->line_to (m_l + x - .5, height_2 - height_2 * p->peaks[c][x].min);
418 cr->set_source_rgba (.3, .3, .3, 0.7);
419 cr->move_to (m_l + 0, height_2 - .5);
420 cr->line_to (m_l + width, height_2 - .5);
424 layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
425 layout->set_alignment (Pango::ALIGN_LEFT);
426 layout->set_text (_("dBFS"));
427 layout->get_pixel_size (w, h);
428 cr->move_to (rint (.5 * (m_l - h)), rint (height_2 + w * .5));
429 cr->set_source_rgba (.9, .9, .9, 1.0);
431 cr->rotate (M_PI / -2.0);
432 layout->show_in_cairo_context (cr);
436 cr->set_line_width (1.0);
437 cr->set_dash (dashes, 2.0);
438 cr->set_line_cap (Cairo::LINE_CAP_ROUND);
440 layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
441 XAXISLABEL (height_2 * 0.6452, _("-9"));
442 XAXISLABEL (height_2 * 1.3548, _("-9"));
443 XAXISLABEL (height_2 * 0.2921, _("-3"));
444 XAXISLABEL (height_2 * 1.7079, _("-3"));
447 CimgArea *wv = manage (new CimgArea (wave));
448 vb->pack_start (*wv);
451 if (file_length > 0 && sample_rate > 0)
453 /* Time Axis -- re-use waveform width */
454 const size_t width = sizeof (p->peaks) / sizeof (ARDOUR::PeakData::PeakDatum) / 4;
455 layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
456 layout->set_text (_("00:00:00.000"));
457 layout->get_pixel_size (w, h);
458 int height = h * 1.75;
459 Cairo::RefPtr<Cairo::ImageSurface> ytme = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, m_l + width, height);
460 Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create (ytme);
461 cr->set_operator (Cairo::OPERATOR_SOURCE);
462 cr->set_source_rgba (0, 0, 0, 1.0);
464 cr->rectangle (0, 0, m_l, height);
465 cr->set_source_rgba (0, 0, 0, 0);
467 cr->set_operator (Cairo::OPERATOR_OVER);
469 cr->set_line_width (1.0);
470 for (int i = 0; i <= 4; ++i) {
471 const float fract = (float) i / 4.0;
472 // " XX:XX:XX.XXX" [space/minus] 12 chars = 13.
473 const float xalign = (i == 4) ? 1.0 : (i == 0) ? 1.0 / 13.0 : 7.0 / 13.0;
476 AudioClock::print_minsec (start_off + file_length * fract,
477 buf, sizeof (buf), sample_rate);
479 layout->set_text (buf);
480 layout->get_pixel_size (w, h);
481 cr->move_to (rint (m_l + width * fract - w * xalign), rint (.5 * (height - h)));
482 cr->set_source_rgba (.9, .9, .9, 1.0);
483 layout->show_in_cairo_context (cr);
485 cr->set_source_rgba (.7, .7, .7, 1.0);
486 cr->move_to (rint (m_l + width * fract) - .5, 0);
487 cr->line_to (rint (m_l + width * fract) - .5, ceil (height * .15));
488 cr->move_to (rint (m_l + width * fract) - .5, floor (height * .85));
489 cr->line_to (rint (m_l + width * fract) - .5, height);
493 layout->set_font_description (UIConfiguration::instance ().get_SmallFont ());
494 layout->set_text (_("Time"));
495 cr->set_source_rgba (.9, .9, .9, 1.0);
496 layout->get_pixel_size (w, h);
497 cr->move_to (rint (.5 * (m_l - w)), rint (.5 * (height - h)));
498 layout->show_in_cairo_context (cr);
501 CimgArea *tm = manage (new CimgArea (ytme));
502 vb->pack_start (*tm);
507 const size_t swh = sizeof (p->spectrum) / sizeof (float);
508 const size_t height = sizeof (p->spectrum[0]) / sizeof (float);
509 const size_t width = swh / height;
511 Cairo::RefPtr<Cairo::ImageSurface> spec = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, m_l + width, height);
512 Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create (spec);
513 cr->set_operator (Cairo::OPERATOR_SOURCE);
514 cr->rectangle (0, 0, m_l, height);
515 cr->set_source_rgba (0, 0, 0, 0);
517 cr->rectangle (m_l, 0, width, height);
518 cr->set_source_rgba (0, 0, 0, 1.0);
520 cr->set_operator (Cairo::OPERATOR_OVER);
522 for (size_t x = 0 ; x < width; ++x) {
523 for (size_t y = 0 ; y < height; ++y) {
524 const float pk = p->spectrum[x][y];
525 ArdourCanvas::Color c = ArdourCanvas::hsva_to_color (252 - 260 * pk, .9, .3 + pk * .4);
526 ArdourCanvas::set_source_rgba (cr, c);
527 cr->rectangle (m_l + x - .5, y - .5, 1, 1);
533 layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
534 layout->set_text (_("Hz"));
535 layout->get_pixel_size (w, h);
536 cr->move_to (rint (.5 * (m_l - h)), rint ((height + w) * .5));
537 cr->set_source_rgba (.9, .9, .9, 1.0);
539 cr->rotate (M_PI / -2.0);
540 layout->show_in_cairo_context (cr);
544 cr->set_line_width (1.0);
545 cr->set_dash (dashes, 2.0);
546 cr->set_line_cap (Cairo::LINE_CAP_ROUND);
548 layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
549 //XAXISLABEL (p->freq[0], _("50Hz"));
550 XAXISLABEL (p->freq[1], _("100"));
551 XAXISLABEL (p->freq[2], _("500"));
552 XAXISLABEL (p->freq[3], _("1K"));
553 XAXISLABEL (p->freq[4], _("5K"));
554 XAXISLABEL (p->freq[5], _("10K"));
557 CimgArea *sp = manage (new CimgArea (spec));
558 vb->pack_start (*sp);
561 pages.pages ().push_back (Notebook_Helpers::TabElem (*vb, Glib::path_get_basename (i->first)));
564 pages.set_show_tabs (true);
566 pages.set_name ("ExportReportNotebook");
567 pages.set_current_page (0);
569 get_vbox ()->set_spacing (4);
570 get_vbox ()->pack_start (pages, false, false);
572 add_button (Stock::CLOSE, RESPONSE_ACCEPT);
573 set_default_response (RESPONSE_ACCEPT);
580 return ArdourDialog::run ();