summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_time_axis.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-08-31 16:12:43 +0200
committerRobin Gareus <robin@gareus.org>2014-08-31 16:12:43 +0200
commit098a6980520183796f3c2faac6262224a6b0b4b3 (patch)
treea015456d3eab01845f785aac95647476f2c74d30 /gtk2_ardour/route_time_axis.cc
parentdb34d9a556c5bcf62259656e6114f340bb444ab7 (diff)
right side track-header control buttons (for non mixbus profile)
Diffstat (limited to 'gtk2_ardour/route_time_axis.cc')
-rw-r--r--gtk2_ardour/route_time_axis.cc69
1 files changed, 56 insertions, 13 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 6ea0af9a50..9eb700d658 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -181,7 +181,11 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
break;
}
- controls_table.attach (*rec_enable_button, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ if (ARDOUR::Profile->get_mixbus()) {
+ controls_table.attach (*rec_enable_button, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ } else {
+ controls_table.attach (*rec_enable_button, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ }
controls_button_size_group->add_widget(*rec_enable_button);
if (is_midi_track()) {
@@ -202,34 +206,59 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
gm.set_fader_name ("AudioBusFader");
Gtk::Fixed *blank = manage(new Gtk::Fixed());
controls_button_size_group->add_widget(*blank);
- controls_table.attach (*blank, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ if (ARDOUR::Profile->get_mixbus() ) {
+ controls_table.attach (*blank, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ } else {
+ controls_table.attach (*blank, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ }
blank->show();
}
top_hbox.pack_end(gm.get_level_meter(), false, false, 4);
+ if (!ARDOUR::Profile->get_mixbus()) {
+ controls_meters_size_group->add_widget (gm.get_level_meter());
+ }
+
_route->meter_change.connect (*this, invalidator (*this), bind (&RouteTimeAxisView::meter_changed, this), gui_context());
_route->input()->changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context());
_route->output()->changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context());
_route->track_number_changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::label_view, this), gui_context());
- controls_table.attach (*mute_button, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ if (ARDOUR::Profile->get_mixbus()) {
+ controls_table.attach (*mute_button, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ } else {
+ controls_table.attach (*mute_button, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ }
controls_button_size_group->add_widget(*mute_button);
if (!_route->is_master()) {
- controls_table.attach (*solo_button, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ if (ARDOUR::Profile->get_mixbus()) {
+ controls_table.attach (*solo_button, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ } else {
+ controls_table.attach (*solo_button, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ }
controls_button_size_group->add_widget(*solo_button);
} else {
Gtk::Fixed *blank = manage(new Gtk::Fixed());
controls_button_size_group->add_widget(*blank);
- controls_table.attach (*blank, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ if (ARDOUR::Profile->get_mixbus()) {
+ controls_table.attach (*blank, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ } else {
+ controls_table.attach (*blank, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ }
blank->show();
}
- if (!ARDOUR::Profile->get_trx()) {
+ if (ARDOUR::Profile->get_mixbus()) {
+ controls_button_size_group->add_widget(route_group_button);
controls_table.attach (route_group_button, 2, 3, 3, 4, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ controls_table.attach (gm.get_gain_slider(), 3, 5, 2, 4, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
+ }
+ else if (!ARDOUR::Profile->get_trx()) {
controls_button_size_group->add_widget(route_group_button);
- controls_table.attach (gm.get_gain_slider(), 3, 6, 2, 4, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
+ controls_table.attach (route_group_button, 4, 5, 3, 4, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ controls_table.attach (gm.get_gain_slider(), 0, 2, 2, 4, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
}
ARDOUR_UI::instance()->set_tip(*solo_button,_("Solo"));
@@ -245,14 +274,24 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
update_track_number_visibility();
label_view ();
- if (!ARDOUR::Profile->get_trx()) {
+ if (ARDOUR::Profile->get_mixbus()) {
controls_table.attach (automation_button, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK);
controls_button_size_group->add_widget(automation_button);
}
+ else if (!ARDOUR::Profile->get_trx()) {
+ controls_table.attach (automation_button, 3, 4, 3, 4, Gtk::SHRINK, Gtk::SHRINK);
+ controls_button_size_group->add_widget(automation_button);
+ }
- if (!ARDOUR::Profile->get_trx() && is_track() && track()->mode() == ARDOUR::Normal) {
- controls_table.attach (playlist_button, 0, 1, 3, 4, Gtk::SHRINK, Gtk::SHRINK);
- controls_button_size_group->add_widget(playlist_button);
+ if (is_track() && track()->mode() == ARDOUR::Normal) {
+ if (ARDOUR::Profile->get_mixbus()) {
+ controls_table.attach (playlist_button, 0, 1, 3, 4, Gtk::SHRINK, Gtk::SHRINK);
+ controls_button_size_group->add_widget(playlist_button);
+ }
+ else if (!ARDOUR::Profile->get_trx()) {
+ controls_table.attach (playlist_button, 2, 3, 3, 4, Gtk::SHRINK, Gtk::SHRINK);
+ controls_button_size_group->add_widget(playlist_button);
+ }
}
_y_position = -1;
@@ -382,10 +421,14 @@ RouteTimeAxisView::update_track_number_visibility ()
}
if (number_label.get_parent()) {
- controls_table.remove (number_label); // XXX
+ controls_table.remove (number_label);
}
if (show_label) {
- controls_table.attach (number_label, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ if (ARDOUR::Profile->get_mixbus()) {
+ controls_table.attach (number_label, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ } else {
+ controls_table.attach (number_label, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+ }
const int tnw = std::max(2u, _session->track_number_decimals()) * 8; // TODO 8 = max_width_of_digit_0_to_9()
number_label.set_size_request(3 + tnw, -1);
number_label.show ();