diff options
-rw-r--r-- | gtk2_ardour/audio_time_axis.cc | 9 | ||||
-rw-r--r-- | gtk2_ardour/axis_view.h | 4 | ||||
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 9 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 8 |
5 files changed, 34 insertions, 0 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 61c7b25cfc..1e56fbc312 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -290,6 +290,15 @@ void AudioTimeAxisView::route_active_changed () { update_control_names (); + + if (!_route->active()) { + controls_table.hide(); + inactive_table.show_all(); + RouteTimeAxisView::hide_all_automation(); + } else { + inactive_table.hide(); + controls_table.show(); + } } void diff --git a/gtk2_ardour/axis_view.h b/gtk2_ardour/axis_view.h index 3c72a78c84..3a3d901317 100644 --- a/gtk2_ardour/axis_view.h +++ b/gtk2_ardour/axis_view.h @@ -28,6 +28,7 @@ #include <boost/unordered_map.hpp> #include <gtkmm/label.h> +#include <gtkmm/table.h> #include <gdkmm/color.h> #include "pbd/xml++.h" @@ -123,6 +124,9 @@ protected: Gtk::Label name_label; + Gtk::Label inactive_label; + Gtk::Table inactive_table; + mutable boost::unordered_map<std::string, std::string> property_hashtable; }; /* class AxisView */ diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 888bf3ee02..8b8fadfbed 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -1361,6 +1361,15 @@ MidiTimeAxisView::route_active_changed () { RouteUI::route_active_changed (); update_control_names(); + + if (!_route->active()) { + controls_table.hide(); + inactive_table.show_all(); + RouteTimeAxisView::hide_all_automation(); + } else { + inactive_table.hide(); + controls_table.show(); + } } void diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 8c659c6c3e..db5edd27d8 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -288,6 +288,7 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt) } update_track_number_visibility(); + route_active_changed(); label_view (); if (ARDOUR::Profile->get_mixbus()) { @@ -424,6 +425,9 @@ RouteTimeAxisView::label_view () if (x != name_label.get_text ()) { name_label.set_text (x); } + + inactive_label.set_text (string_compose("(%1)", x)); + const int64_t track_number = _route->track_number (); if (track_number == 0) { number_label.set_text (""); diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 6ae0c3c5b8..f5b3cce11f 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -158,6 +158,10 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie name_label.set_width_chars (12); set_tooltip (name_label, _("Track/Bus name (double click to edit)")); + inactive_label.set_name (X_("TrackNameEditor")); + inactive_label.set_alignment (0.0, 0.5); + set_tooltip (inactive_label, _("This track is inactive. (right-click to activate)")); + { boost::scoped_ptr<Gtk::Entry> an_entry (new FocusEntry); an_entry->set_name (X_("TrackNameEditor")); @@ -185,6 +189,10 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie controls_table.show_all (); controls_table.set_no_show_all (); + inactive_table.set_border_width (4); //try to match the offset of the label on an "active" track + inactive_table.attach (inactive_label, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0); + controls_vbox.pack_start (inactive_table, false, false); + controls_vbox.pack_start (controls_table, false, false); controls_vbox.show (); |