From 9a9ce1aec97db89b00bc216edf7cee5f3d48670e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 18 Dec 2021 12:05:40 +0100 Subject: Add more filenames to content properties (#2120). --- src/lib/content.cc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/content.cc b/src/lib/content.cc index 4167031c2..3c3942aa1 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -463,7 +463,24 @@ Content::active_video_frame_rate (shared_ptr film) const void Content::add_properties (shared_ptr, list& p) const { - p.push_back (UserProperty (UserProperty::GENERAL, _("Filename"), path(0).string ())); + auto paths_to_show = std::min(number_of_paths(), size_t{8}); + string paths = ""; + for (auto i = size_t{0}; i < paths_to_show; ++i) { + paths += path(i).string(); + if (i < (paths_to_show - 1)) { + paths += "\n"; + } + } + if (paths_to_show < number_of_paths()) { + paths += String::compose("... and %1 more", number_of_paths() - paths_to_show); + } + p.push_back ( + UserProperty( + UserProperty::GENERAL, + paths_to_show > 1 ? _("Filenames") : _("Filename"), + paths + ) + ); if (_video_frame_rate) { if (video) { -- cgit v1.2.3