Show number of regionFX in sidebar

This commit is contained in:
Robin Gareus 2025-01-22 19:17:55 +01:00
parent 8919594353
commit d2fb6c498a
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 27 additions and 14 deletions

View file

@ -64,6 +64,7 @@ EditorRegions::init ()
{
add_name_column ();
setup_col (append_col (_columns.channels, "Chans "), 1, ALIGN_START, _("# Ch"), _("# Channels in the region"));
setup_col (append_col (_columns.regionfx, "Region Fx"), 2, ALIGN_START, _("# Fx"), _("# Region effects"));
add_tag_column ();
int cb_width = 24;
@ -75,9 +76,9 @@ EditorRegions::init ()
TreeViewColumn* tvc;
tvc = append_col (_columns.start, bbt_width);
setup_col (tvc, 16, ALIGN_END, _("Start"), _("Position of start of region"));
setup_col (tvc, 4, ALIGN_END, _("Start"), _("Position of start of region"));
tvc = append_col (_columns.length, bbt_width);
setup_col (tvc, 4, ALIGN_END, _("Length"), _("Length of the region"));
setup_col (tvc, 5, ALIGN_END, _("Length"), _("Length of the region"));
tvc = append_col (_columns.locked, cb_width);
setup_col (tvc, -1, ALIGN_CENTER, S_("Lock|L"), _("Region position locked?"));
@ -93,7 +94,7 @@ EditorRegions::init ()
#ifdef SHOW_REGION_EXTRAS
tvc = append_col (_columns.end, bbt_width);
setup_col (tvc, 5, ALIGN_END, _("End"), _("Position of end of region"));
setup_col (tvc, 6, ALIGN_END, _("End"), _("Position of end of region"));
tvc = append_col (_columns.sync, bbt_width);
setup_col (tvc, -1, ALIGN_END, _("Sync"), _("Position of region sync point, relative to start of the region"));
tvc = append_col (_columns.fadein, bbt_width);

View file

@ -171,7 +171,7 @@ void
RegionListBase::add_tag_column ()
{
TreeViewColumn* tvc = append_col (_columns.tags, "2099-10-10 10:10:30");
setup_col (tvc, 2, ALIGN_START, _("Tags"), _("Tags"));
setup_col (tvc, 3, ALIGN_START, _("Tags"), _("Tags"));
/* Tags cell: make editable */
CellRendererText* region_tags_cell = dynamic_cast<CellRendererText*> (tvc->get_first_cell ());
@ -492,6 +492,9 @@ RegionListBase::populate_row (std::shared_ptr<Region> region, TreeModel::Row con
populate_row_end (region, row);
populate_row_length (region, row);
}
if (all || what_changed.contains (Properties::region_fx)) {
populate_row_regionfx (region, row);
}
if (all) {
populate_row_source (region, row);
}
@ -610,6 +613,12 @@ RegionListBase::populate_row_opaque (std::shared_ptr<Region> region, TreeModel::
row[_columns.opaque] = region->opaque ();
}
void
RegionListBase::populate_row_regionfx (std::shared_ptr<Region> region, TreeModel::Row const& row)
{
row[_columns.regionfx] = region->n_region_fx ();
}
void
RegionListBase::populate_row_name (std::shared_ptr<Region> region, TreeModel::Row const& row)
{

View file

@ -92,14 +92,15 @@ protected:
{
add (name); // 0
add (channels); // 1
add (tags); // 2
add (start); // 3
add (length); // 3
add (end); // 5
add (sync); // 6
add (fadein); // 7
add (fadeout); // 8
add (locked); // 9
add (regionfx); // 2
add (tags); // 3
add (start); // 4
add (length); // 5
add (end); // 6
add (sync); // 7
add (fadein); // 8
add (fadeout); // 9
add (locked); // 10
add (muted); // 11
add (opaque); // 12
add (path); // 13
@ -111,11 +112,12 @@ protected:
add (take_id); // 18
add (natural_pos); // 19
add (natural_s); // 20
add (captd_xruns);
add (captd_xruns); // 21
}
Gtk::TreeModelColumn<std::string> name;
Gtk::TreeModelColumn<int> channels;
Gtk::TreeModelColumn<size_t> regionfx;
Gtk::TreeModelColumn<std::string> tags;
Gtk::TreeModelColumn<Temporal::timepos_t> position;
Gtk::TreeModelColumn<std::string> start;
@ -128,7 +130,7 @@ protected:
Gtk::TreeModelColumn<bool> muted;
Gtk::TreeModelColumn<bool> opaque;
Gtk::TreeModelColumn<std::string> path;
Gtk::TreeModelColumn<std::shared_ptr<ARDOUR::Region>> region;
Gtk::TreeModelColumn<std::shared_ptr<ARDOUR::Region>> region;
Gtk::TreeModelColumn<Gdk::Color> color_;
Gtk::TreeModelColumn<std::string> captd_for;
Gtk::TreeModelColumn<std::string> take_id;
@ -209,6 +211,7 @@ protected:
void populate_row_length (std::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
void populate_row_name (std::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
void populate_row_source (std::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
void populate_row_regionfx (std::shared_ptr<ARDOUR::Region> region, Gtk::TreeModel::Row const& row);
void clock_format_changed ();