From 272cad6241ababb0e2033f27e0511596b3e32b15 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 22 Jul 2009 01:28:31 +0000 Subject: Various fixups to bundle manager. Add a separator between the benign and more serious menu options on the port matrix context menu. Finally (maybe) fix port matrix sizing issues relatively nicely. git-svn-id: svn://localhost/ardour2/branches/3.0@5409 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/bundle_manager.cc | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'gtk2_ardour/bundle_manager.cc') diff --git a/gtk2_ardour/bundle_manager.cc b/gtk2_ardour/bundle_manager.cc index ed4a570bb1..d406dfe5f2 100644 --- a/gtk2_ardour/bundle_manager.cc +++ b/gtk2_ardour/bundle_manager.cc @@ -34,9 +34,9 @@ using namespace std; using namespace ARDOUR; BundleEditorMatrix::BundleEditorMatrix ( - Session& session, boost::shared_ptr bundle + Gtk::Window* parent, Session& session, boost::shared_ptr bundle ) - : PortMatrix (session, bundle->type()), + : PortMatrix (parent, session, bundle->type()), _bundle (bundle) { _port_group = boost::shared_ptr (new PortGroup ("")); @@ -161,8 +161,8 @@ BundleEditorMatrix::list_is_global (int dim) const return (dim == OTHER); } -BundleEditor::BundleEditor (Session& session, boost::shared_ptr bundle, bool /*add*/) - : ArdourDialog (_("Edit Bundle")), _matrix (session, bundle), _bundle (bundle) +BundleEditor::BundleEditor (Session& session, boost::shared_ptr bundle, bool add) + : ArdourDialog (_("Edit Bundle")), _matrix (this, session, bundle), _bundle (bundle) { Gtk::Table* t = new Gtk::Table (3, 2); t->set_spacings (4); @@ -219,7 +219,16 @@ BundleEditor::BundleEditor (Session& session, boost::shared_ptr bund get_vbox()->pack_start (_matrix); get_vbox()->set_spacing (4); + add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); + if (add) { + add_button (Gtk::Stock::ADD, Gtk::RESPONSE_ACCEPT); + } else { + add_button (Gtk::Stock::APPLY, Gtk::RESPONSE_ACCEPT); + } + show_all (); + + resize (32768, 32768); } void @@ -321,10 +330,10 @@ BundleManager::set_button_sensitivity () void BundleManager::new_clicked () { - boost::shared_ptr b (new UserBundle ("")); + boost::shared_ptr b (new UserBundle (_("Bundle"))); /* Start off with a single channel */ - b->add_channel (""); + b->add_channel ("1"); BundleEditor e (_session, b, true); -- cgit v1.2.3