summaryrefslogtreecommitdiff
path: root/gtk2_ardour/bundle_manager.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-07-22 01:28:31 +0000
committerCarl Hetherington <carl@carlh.net>2009-07-22 01:28:31 +0000
commit272cad6241ababb0e2033f27e0511596b3e32b15 (patch)
tree2f76ee12d5d0a28846b29bdcf811369c4f0d386a /gtk2_ardour/bundle_manager.cc
parent718659344277514acd05fbb8ffee30134a6cf66a (diff)
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
Diffstat (limited to 'gtk2_ardour/bundle_manager.cc')
-rw-r--r--gtk2_ardour/bundle_manager.cc21
1 files changed, 15 insertions, 6 deletions
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> bundle
+ Gtk::Window* parent, Session& session, boost::shared_ptr<Bundle> bundle
)
- : PortMatrix (session, bundle->type()),
+ : PortMatrix (parent, session, bundle->type()),
_bundle (bundle)
{
_port_group = boost::shared_ptr<PortGroup> (new PortGroup (""));
@@ -161,8 +161,8 @@ BundleEditorMatrix::list_is_global (int dim) const
return (dim == OTHER);
}
-BundleEditor::BundleEditor (Session& session, boost::shared_ptr<UserBundle> bundle, bool /*add*/)
- : ArdourDialog (_("Edit Bundle")), _matrix (session, bundle), _bundle (bundle)
+BundleEditor::BundleEditor (Session& session, boost::shared_ptr<UserBundle> 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<UserBundle> 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<UserBundle> b (new UserBundle (""));
+ boost::shared_ptr<UserBundle> b (new UserBundle (_("Bundle")));
/* Start off with a single channel */
- b->add_channel ("");
+ b->add_channel ("1");
BundleEditor e (_session, b, true);