summaryrefslogtreecommitdiff
path: root/gtk2_ardour/export_report.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-06-26 19:40:05 +0200
committerRobin Gareus <robin@gareus.org>2017-06-26 19:40:05 +0200
commit0650e0d3fd80da266045d3553fc3465fc40f5afd (patch)
tree35944d73338daee6c0e79f30ddce5fd97fd7d79a /gtk2_ardour/export_report.cc
parent007f3cdbba01b58dc37ec214836ab0960ee13f82 (diff)
Include file's sha1 in export-report image
Diffstat (limited to 'gtk2_ardour/export_report.cc')
-rw-r--r--gtk2_ardour/export_report.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk2_ardour/export_report.cc b/gtk2_ardour/export_report.cc
index 67e2f61e7d..200b2c3340 100644
--- a/gtk2_ardour/export_report.cc
+++ b/gtk2_ardour/export_report.cc
@@ -42,6 +42,7 @@
#include "ardour/smf_source.h"
#include "ardour/source_factory.h"
#include "ardour/srcfilesource.h"
+#include "ardour/utils.h"
#include "audio_clock.h"
#include "export_report.h"
@@ -318,9 +319,13 @@ ExportReport::init (const AnalysisResults & ar, bool with_file)
// TODO get max width of labels per column, right-align labels, x-align 1/3, 2/3 columns
const int lx0 = m_l;
- const int lx1 = m_l + png_w / 2;
+ const int lx1 = m_l + png_w * 2 / 3; // right-col is short (channels, SR, duration)
+ std::string sha1sum = ARDOUR::compute_sha1_of_file (path);
+ if (!sha1sum.empty()) {
+ sha1sum = " (sha1: " + sha1sum + ")";
+ }
- IMGLABEL (lx0, _("File:"), Glib::path_get_basename (path));
+ IMGLABEL (lx0, _("File:"), Glib::path_get_basename (path) + sha1sum);
IMGLABEL (lx1, _("Channels:"), string_compose ("%1", channels));
png_y0 += linesp;