void
RouteTimeAxisView::setup_slider_pix ()
{
- if ((slider = ::get_icon ("fader_belt_h")) == 0) {
+ if ((slider = ::get_icon ("fader_belt_h_medium")) == 0) {
throw failed_constructor ();
}
- if ((slider_desensitised = ::get_icon ("fader_belt_h_desensitised")) == 0) {
+ if ((slider_desensitised = ::get_icon ("fader_belt_h_medium_desensitised")) == 0) {
throw failed_constructor ();
}
}
, mode_menu (0)
, color_mode_menu (0)
, gm (sess, slider, slider_desensitised, true, 115)
+ , _ignore_set_layer_display (false)
{
}
}
rec_enable_button->set_sensitive (_session->writable());
+
+ /* set playlist button tip to the current playlist, and make it update when it changes */
+ update_playlist_tip ();
+ track()->PlaylistChanged.connect (*this, invalidator (*this), ui_bind(&RouteTimeAxisView::update_playlist_tip, this), gui_context());
+
}
controls_hbox.pack_start(gm.get_level_meter(), false, false);
}
controls_table.attach (route_group_button, 7, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
- controls_table.attach (gm.get_gain_slider(), 0, 5, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ Gtk::VBox* pad = manage (new Gtk::VBox);
+ pad->pack_start (gm.get_gain_slider(), false, false);
+ pad->pack_start (*manage (new Gtk::Label), true, true);
+ pad->show_all ();
+ controls_table.attach (*pad, 0, 5, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
ARDOUR_UI::instance()->set_tip(*solo_button,_("Solo"));
ARDOUR_UI::instance()->set_tip(*mute_button,_("Mute"));
ARDOUR_UI::instance()->set_tip(route_group_button, _("Route Group"));
- ARDOUR_UI::instance()->set_tip(playlist_button,_("Playlist"));
if (is_midi_track()) {
ARDOUR_UI::instance()->set_tip(automation_button, _("MIDI Controllers and Automation"));
select the active one, no toggled signal is emitted so nothing happens.
*/
+ _ignore_set_layer_display = true;
+
layers_items.push_back (RadioMenuElem (layers_group, _("Overlaid")));
RadioMenuItem* i = dynamic_cast<RadioMenuItem*> (&layers_items.back ());
i->set_active (overlaid != 0 && stacked == 0);
i->set_inconsistent (overlaid != 0 && stacked != 0);
i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_layer_display), Overlaid, true));
- layers_items.push_back (
- RadioMenuElem (layers_group, _("Stacked"),
- sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_layer_display), Stacked, true))
- );
-
+ layers_items.push_back (RadioMenuElem (layers_group, _("Stacked")));
i = dynamic_cast<RadioMenuItem*> (&layers_items.back ());
- i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_layer_display), Stacked, true));
i->set_active (overlaid == 0 && stacked != 0);
i->set_inconsistent (overlaid != 0 && stacked != 0);
+ i->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &RouteTimeAxisView::set_layer_display), Stacked, true));
+
+ _ignore_set_layer_display = false;
items.push_back (MenuElem (_("Layers"), *layers_menu));
}
}
+void
+RouteTimeAxisView::update_playlist_tip ()
+{
+ RouteGroup* rg = route_group ();
+ if (rg && rg->is_active() && rg->enabled_property (ARDOUR::Properties::edit.property_id)) {
+ string group_string = "." + rg->name() + ".";
+
+ string take_name = track()->playlist()->name();
+ string::size_type idx = take_name.find(group_string);
+
+ if (idx != string::npos) {
+ /* find the bit containing the take number / name */
+ take_name = take_name.substr (idx + group_string.length());
+
+ /* set the playlist button tooltip to the take name */
+ ARDOUR_UI::instance()->set_tip (
+ playlist_button,
+ string_compose(_("Take: %1.%2"), escape_angled_brackets (rg->name()), escape_angled_brackets (take_name))
+ );
+
+ return;
+ }
+ }
+
+ /* set the playlist button tooltip to the playlist name */
+ ARDOUR_UI::instance()->set_tip (playlist_button, _("Playlist") + std::string(": ") + escape_angled_brackets (track()->playlist()->name()));
+}
+
+
void
RouteTimeAxisView::show_playlist_selector ()
{
void
RouteTimeAxisView::set_layer_display (LayerDisplay d, bool apply_to_selection)
{
+ if (_ignore_set_layer_display) {
+ return;
+ }
+
if (apply_to_selection) {
_editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_layer_display, _1, d, false));
} else {