+void
+BundleManager::row_activated (Gtk::TreeModel::Path const & p, Gtk::TreeViewColumn* c)
+{
+ Gtk::TreeModel::iterator i = _list_model->get_iter (p);
+ if (!i) {
+ return;
+ }
+
+ boost::shared_ptr<UserBundle> b = (*i)[_list_model_columns.bundle];
+ BundleEditor e (_session, b);
+ e.run ();
+}
+
+NameChannelDialog::NameChannelDialog ()
+ : ArdourDialog (_("Add channel")),
+ _adding (true)
+{
+ setup ();
+}
+
+NameChannelDialog::NameChannelDialog (boost::shared_ptr<Bundle> b, uint32_t c)
+ : ArdourDialog (_("Rename channel")),
+ _bundle (b),
+ _channel (c),
+ _adding (false)
+{
+ _name.set_text (b->channel_name (c));
+
+ setup ();
+}
+
+void
+NameChannelDialog::setup ()
+{
+ Gtk::HBox* box = Gtk::manage (new Gtk::HBox ());
+
+ box->pack_start (*Gtk::manage (new Gtk::Label (_("Name"))));
+ box->pack_start (_name);
+ _name.set_activates_default (true);
+
+ get_vbox ()->pack_end (*box);
+ box->show_all ();
+
+ add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
+ if (_adding) {
+ add_button (Gtk::Stock::ADD, Gtk::RESPONSE_ACCEPT);
+ } else {
+ add_button (Gtk::Stock::APPLY, Gtk::RESPONSE_ACCEPT);
+ }
+ set_default_response (Gtk::RESPONSE_ACCEPT);
+}
+
+string
+NameChannelDialog::get_name () const
+{
+ return _name.get_text ();
+}
+