, TimeAxisView(sess,ed,(TimeAxisView*) 0, canvas)
, _view (0)
, parent_canvas (canvas)
+ , no_redraw (false)
, button_table (3, 3)
, route_group_button (_("g"))
, playlist_button (_("p"))
}
if (!_route->is_hidden()) {
- set_gui_property ("visible", "yes");
+ if (gui_property ("visible").empty()) {
+ set_gui_property ("visible", true);
+ }
+ } else {
+ set_gui_property ("visible", false);
}
mute_changed (0);
rec_enable_button->set_sensitive (_session->writable());
}
-
+
controls_hbox.pack_start(gm.get_level_meter(), false, false);
_route->meter_change.connect (*this, invalidator (*this), bind (&RouteTimeAxisView::meter_changed, this), gui_context());
_route->input()->changed.connect (*this, invalidator (*this), ui_bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context());
gm.get_gain_slider().signal_scroll_event().connect(sigc::mem_fun(*this, &RouteTimeAxisView::controls_ebox_scroll), false);
gm.get_gain_slider().set_name ("TrackGainFader");
+ gm.get_level_meter().signal_scroll_event().connect (sigc::mem_fun (*this, &RouteTimeAxisView::controls_ebox_scroll), false);
+
show_name_entry ();
hide_name_label ();
}
}
void
-RouteTimeAxisView::set_color (Gdk::Color const & c)
+RouteTimeAxisView::route_color_changed ()
{
- RouteUI::set_color (c);
-
if (_view) {
- _view->apply_color (_color, StreamView::RegionColor);
+ _view->apply_color (color(), StreamView::RegionColor);
}
}
void
RouteTimeAxisView::name_entry_changed ()
{
- string x;
-
- x = name_entry.get_text ();
+ string x = name_entry.get_text ();
if (x == _route->name()) {
return;
}
- strip_whitespace_edges(x);
+ strip_whitespace_edges (x);
if (x.length() == 0) {
name_entry.set_text (_route->name());
return;
}
- if (!_session->route_name_unique (x)) {
- ARDOUR_UI::instance()->popup_error (_("A track already exists with that name"));
- name_entry.set_text (_route->name());
- } else if (_session->route_name_internal (x)) {
+ if (_session->route_name_internal (x)) {
ARDOUR_UI::instance()->popup_error (string_compose (_("You cannot create a track with that name as it is reserved for %1"),
- PROGRAM_NAME));
- name_entry.set_text (_route->name());
- } else {
+ PROGRAM_NAME));
+ name_entry.grab_focus ();
+ } else if (RouteUI::verify_new_route_name (x)) {
_route->set_name (x);
+ } else {
+ name_entry.grab_focus ();
}
}
playlist_action_menu->set_name ("ArdourContextMenu");
playlist_items.clear();
- vector<boost::shared_ptr<Playlist> > playlists, playlists_tr;
- boost::shared_ptr<Track> tr = track();
RadioMenuItem::Group playlist_group;
+ boost::shared_ptr<Track> tr = track ();
- _session->playlists->get (playlists);
-
- /* find the playlists for this diskstream */
- for (vector<boost::shared_ptr<Playlist> >::iterator i = playlists.begin(); i != playlists.end(); ++i) {
- if (((*i)->get_orig_diskstream_id() == tr->diskstream_id()) || (tr->playlist()->id() == (*i)->id())) {
- playlists_tr.push_back(*i);
- }
- }
+ vector<boost::shared_ptr<Playlist> > playlists_tr = _session->playlists->playlists_for_track (tr);
/* sort the playlists */
PlaylistSorter cmp;
}
void
-RouteTimeAxisView::processor_automation_track_hidden (RouteTimeAxisView::ProcessorAutomationNode* pan, boost::shared_ptr<Processor> i)
+RouteTimeAxisView::processor_automation_track_hidden (RouteTimeAxisView::ProcessorAutomationNode* pan, boost::shared_ptr<Processor>)
{
if (!_hidden) {
pan->menu_item->set_active (false);
}
void
-RouteTimeAxisView::add_underlay (StreamView* v, bool update_xml)
+RouteTimeAxisView::add_underlay (StreamView* v, bool /*update_xml*/)
{
if (!v) {
return;
rec_enable_button_label.set_text (_("r"));
if (_route && _route->solo_safe()) {
- solo_button_label.set_text (X_("!"));
+ solo_button->remove ();
+ if (solo_safe_image == 0) {
+ solo_safe_image = new Gtk::Image (::get_icon("solo-safe-enabled"));
+ solo_safe_image->show ();
+ }
+ solo_button->add (*solo_safe_image);
} else {
+ solo_button->remove ();
+ solo_button->add (solo_button_label);
+ solo_button_label.show ();
if (Config->get_solo_control_is_listen_control()) {
switch (Config->get_listen_position()) {
case AfterFaderListen:
{
return string_compose ("rtav %1", _route->id().to_s());
}
+