diff --git a/gtk2_ardour/trigger_page.cc b/gtk2_ardour/trigger_page.cc index ed4b12095c..73ecbaed61 100644 --- a/gtk2_ardour/trigger_page.cc +++ b/gtk2_ardour/trigger_page.cc @@ -125,6 +125,7 @@ TriggerPage::TriggerPage () _sidebar_vbox.pack_start (_sidebar_notebook); add_sidebar_page (_("Clips"), _trigger_clip_picker); + add_sidebar_page (_("Regions"), _trigger_region_list.widget ()); /* Upper pane ([slot | strips] | file browser) */ _pane_upper.add (_strip_group_box); @@ -264,6 +265,7 @@ TriggerPage::set_session (Session* s) _cue_box.set_session (s); _trigger_clip_picker.set_session (s); _master.set_session (s); + _trigger_region_list.set_session (s); if (!_session) { return; diff --git a/gtk2_ardour/trigger_page.h b/gtk2_ardour/trigger_page.h index 0ce68064d0..2379be211c 100644 --- a/gtk2_ardour/trigger_page.h +++ b/gtk2_ardour/trigger_page.h @@ -40,6 +40,7 @@ #include "midi_trigger_properties_box.h" #include "slot_properties_box.h" #include "trigger_clip_picker.h" +#include "trigger_region_list.h" #include "trigger_master.h" class TriggerStrip; @@ -103,6 +104,7 @@ private: Gtk::VBox _sidebar_vbox; Gtk::Notebook _sidebar_notebook; TriggerClipPicker _trigger_clip_picker; + TriggerRegionList _trigger_region_list; CueBoxWidget _cue_box; FittedCanvasWidget _master_widget; diff --git a/gtk2_ardour/trigger_region_list.cc b/gtk2_ardour/trigger_region_list.cc new file mode 100644 index 0000000000..e0b1a53545 --- /dev/null +++ b/gtk2_ardour/trigger_region_list.cc @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2021 Robin Gareus + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include "trigger_region_list.h" + +#include "pbd/i18n.h" + +using namespace Gtk; + +TriggerRegionList::TriggerRegionList () +{ + add_name_column (); + setup_col (append_col (_columns.channels, "Chans "), 1, ALIGN_LEFT, _("# Ch"), _("# Channels in the region")); + add_tag_column (); +} diff --git a/gtk2_ardour/trigger_region_list.h b/gtk2_ardour/trigger_region_list.h new file mode 100644 index 0000000000..7ee5d08d4a --- /dev/null +++ b/gtk2_ardour/trigger_region_list.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2021 Robin Gareus + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +#ifndef _gtk_ardour_trigger_region_list_h_ +#define _gtk_ardour_trigger_region_list_h_ + +#include "region_list_base.h" + +class TriggerRegionList : public RegionListBase +{ +public: + TriggerRegionList (); +}; + +#endif /* _gtk_ardour_trigger_region_list_h_ */ diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 6ac4737260..e0a9374dc8 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -314,6 +314,7 @@ gtk2_ardour_sources = [ 'transpose_dialog.cc', 'trigger_clip_picker.cc', 'trigger_page.cc', + 'trigger_region_list.cc', 'trigger_strip.cc', 'trigger_master.cc', 'trigger_ui.cc',