summaryrefslogtreecommitdiff
path: root/gtk2_ardour/bundle_manager.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-01-25 06:47:11 +0000
committerCarl Hetherington <carl@carlh.net>2009-01-25 06:47:11 +0000
commit49510ba1d7fc1c85e767c05f10f9481998ef94b0 (patch)
treee04210728fb9b5e52864eb8cdc0774e4d0b9d7f2 /gtk2_ardour/bundle_manager.cc
parenta9d67a2cc97b28795a9112a176ba1f2c1ab470d3 (diff)
Some refactoring. Add port group headers to the port matrix.
git-svn-id: svn://localhost/ardour2/branches/3.0@4443 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/bundle_manager.cc')
-rw-r--r--gtk2_ardour/bundle_manager.cc23
1 files changed, 15 insertions, 8 deletions
diff --git a/gtk2_ardour/bundle_manager.cc b/gtk2_ardour/bundle_manager.cc
index 42fbabbbe9..04bf240f7c 100644
--- a/gtk2_ardour/bundle_manager.cc
+++ b/gtk2_ardour/bundle_manager.cc
@@ -33,12 +33,16 @@
BundleEditorMatrix::BundleEditorMatrix (
ARDOUR::Session& session, boost::shared_ptr<ARDOUR::Bundle> bundle
)
- : PortMatrix (
- session, bundle->type(), bundle->ports_are_inputs(),
- PortGroupList::Mask (PortGroupList::SYSTEM | PortGroupList::OTHER)
- )
+ : PortMatrix (session, bundle->type(), bundle->ports_are_inputs())
{
- _our_bundles.push_back (bundle);
+ _port_group = new PortGroup ("", true);
+ _port_group->bundles.push_back (bundle);
+ _row_ports.push_back (_port_group);
+}
+
+BundleEditorMatrix::~BundleEditorMatrix ()
+{
+ delete _port_group;
}
void
@@ -89,14 +93,14 @@ BundleEditorMatrix::add_channel (boost::shared_ptr<ARDOUR::Bundle> b)
return;
}
- _our_bundles.front()->add_channel (d.get_name());
+ _port_group->bundles.front()->add_channel (d.get_name());
setup ();
}
void
BundleEditorMatrix::remove_channel (boost::shared_ptr<ARDOUR::Bundle> b, uint32_t c)
{
- _our_bundles.front()->remove_channel (c);
+ _port_group->bundles.front()->remove_channel (c);
setup ();
}
@@ -232,7 +236,10 @@ BundleManager::BundleManager (ARDOUR::Session& session)
_tree_view.append_column (_("Name"), _list_model_columns.name);
_tree_view.set_headers_visible (false);
- _session.foreach_bundle (sigc::mem_fun (*this, &BundleManager::add_bundle));
+ boost::shared_ptr<ARDOUR::BundleList> bundles = _session.bundles ();
+ for (ARDOUR::BundleList::iterator i = bundles->begin(); i != bundles->end(); ++i) {
+ add_bundle (*i);
+ }
/* New / Edit / Delete buttons */
Gtk::VBox* buttons = new Gtk::VBox;