13
0

Region list columns do not use property_markup

This fixes an issue with frozen region "<F1>Foo" being
displayed as "&lt;F1&lt;Foo" in the sidebar.
This commit is contained in:
Robin Gareus 2023-10-26 05:46:11 +02:00
parent d5c62fe2b9
commit 830910c787
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -613,7 +613,7 @@ RegionListBase::populate_row_opaque (std::shared_ptr<Region> region, TreeModel::
void void
RegionListBase::populate_row_name (std::shared_ptr<Region> region, TreeModel::Row const& row) RegionListBase::populate_row_name (std::shared_ptr<Region> region, TreeModel::Row const& row)
{ {
row[_columns.name] = Gtkmm2ext::markup_escape_text (region->name ()); row[_columns.name] = region->name ();
if (region->data_type () == DataType::MIDI) { if (region->data_type () == DataType::MIDI) {
row[_columns.channels] = 0; /*TODO: some better recognition of midi regions*/ row[_columns.channels] = 0; /*TODO: some better recognition of midi regions*/
@ -629,9 +629,9 @@ RegionListBase::populate_row_source (std::shared_ptr<Region> region, TreeModel::
{ {
std::shared_ptr<ARDOUR::Source> source = region->source (); std::shared_ptr<ARDOUR::Source> source = region->source ();
if (std::dynamic_pointer_cast<SilentFileSource> (source)) { if (std::dynamic_pointer_cast<SilentFileSource> (source)) {
row[_columns.path] = _("MISSING ") + Gtkmm2ext::markup_escape_text (source->name ()); row[_columns.path] = _("MISSING ") + source->name ();
} else { } else {
row[_columns.path] = Gtkmm2ext::markup_escape_text (source->name ()); row[_columns.path] = source->name ();
std::shared_ptr<FileSource> fs = std::dynamic_pointer_cast<FileSource> (source); std::shared_ptr<FileSource> fs = std::dynamic_pointer_cast<FileSource> (source);
if (fs) { if (fs) {
@ -639,14 +639,14 @@ RegionListBase::populate_row_source (std::shared_ptr<Region> region, TreeModel::
if (afs) { if (afs) {
const string audio_directory = _session->session_directory ().sound_path (); const string audio_directory = _session->session_directory ().sound_path ();
if (!PBD::path_is_within (audio_directory, fs->path ())) { if (!PBD::path_is_within (audio_directory, fs->path ())) {
row[_columns.path] = Gtkmm2ext::markup_escape_text (fs->path ()); row[_columns.path] = fs->path ();
} }
} }
std::shared_ptr<SMFSource> mfs = std::dynamic_pointer_cast<SMFSource> (source); std::shared_ptr<SMFSource> mfs = std::dynamic_pointer_cast<SMFSource> (source);
if (mfs) { if (mfs) {
const string midi_directory = _session->session_directory ().midi_path (); const string midi_directory = _session->session_directory ().midi_path ();
if (!PBD::path_is_within (midi_directory, fs->path ())) { if (!PBD::path_is_within (midi_directory, fs->path ())) {
row[_columns.path] = Gtkmm2ext::markup_escape_text (fs->path ()); row[_columns.path] = fs->path ();
} }
} }
} }