{
init ();
+
+ if (!_mixer_owned) {
+ /* the editor mixer strip: don't destroy it every time
+ the underlying route goes away.
+ */
+
+ self_destruct = false;
+ }
}
MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt, bool in_mixer)
group_menu = 0;
_marked_for_display = false;
route_ops_menu = 0;
+ rename_menu_item = 0;
ignore_comment_edit = false;
ignore_toggle = false;
ignore_speed_adjustment = false;
name_button.add (name_label);
name_button.set_name ("MixerNameButton");
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2);
-
name_label.set_name ("MixerNameButtonLabel");
+
ARDOUR_UI::instance()->set_tip (&group_button, _("Mix group"), "");
group_button.add (group_label);
group_button.set_name ("MixerGroupButton");
+ Gtkmm2ext::set_size_request_to_display_given_text (group_button, "Group", 2, 2);
+
group_label.set_name ("MixerGroupButtonLabel");
comment_button.set_name ("MixerCommentButton");
#endif /* VARISPEED_IN_MIXER_STRIP */
button_table.attach (*rec_enable_button, 0, 2, 2, 3);
+ rec_enable_button->set_sensitive (_session.writable());
rec_enable_button->show();
}
meter_point_label.set_text (_("post"));
break;
}
+
+ delete route_ops_menu;
+ route_ops_menu = 0;
ARDOUR_UI::instance()->tooltips().set_tip (comment_button, _route->comment().empty() ?
_("Click to Add/Edit Comments"):
RouteGroup *rg = _route->mix_group();
if (rg) {
- group_label.set_text (rg->name());
+ group_label.set_text (PBD::short_version (rg->name(), 5));
} else {
switch (_width) {
case Wide:
MixerStrip::build_route_ops_menu ()
{
using namespace Menu_Helpers;
- route_ops_menu = manage (new Menu);
+ route_ops_menu = new Menu;
route_ops_menu->set_name ("ArdourContextMenu");
MenuList& items = route_ops_menu->items();
+ items.push_back (MenuElem (_("Save As Template"), mem_fun(*this, &RouteUI::save_as_template)));
items.push_back (MenuElem (_("Rename"), mem_fun(*this, &RouteUI::route_rename)));
+ rename_menu_item = &items.back();
items.push_back (SeparatorElem());
items.push_back (CheckMenuElem (_("Active"), mem_fun (*this, &RouteUI::toggle_route_active)));
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
denormal_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
denormal_menu_item->set_active (_route->denormal_protection());
- build_remote_control_menu ();
-
- items.push_back (SeparatorElem());
if (!Profile->get_sae()) {
- items.push_back (MenuElem (_("Remote Control ID"), *remote_control_menu));
+ build_remote_control_menu ();
+ items.push_back (SeparatorElem());
+ items.push_back (MenuElem (_("Remote Control ID"), *remote_control_menu));
}
items.push_back (SeparatorElem());
gint
MixerStrip::name_button_button_press (GdkEventButton* ev)
{
- if (ev->button == 1) {
+ if (ev->button == 1 || ev->button == 3) {
list_route_operations ();
-
- Menu_Helpers::MenuList& items = route_ops_menu->items();
/* do not allow rename if the track is record-enabled */
- static_cast<MenuItem*> (&items.front())->set_sensitive (!_route->record_enabled());
-
+ rename_menu_item->set_sensitive (!_route->record_enabled());
route_ops_menu->popup (1, ev->time);
}
return FALSE;
void
MixerStrip::hide_clicked ()
{
- // LAME fix to reset the button status for when it is redisplayed (part 1)
- hide_button.set_sensitive(false);
-
+ // LAME fix to reset the button status for when it is redisplayed (part 1)
+ hide_button.set_sensitive(false);
+
if (_embedded) {
- Hiding(); /* EMIT_SIGNAL */
+ Hiding(); /* EMIT_SIGNAL */
} else {
_mixer.hide_strip (this);
}
- // (part 2)
+ // (part 2)
hide_button.set_sensitive(true);
}