first pass hiding/rearrangement of UI elements related to trx

This commit is contained in:
Paul Davis
2014-04-10 13:30:25 -04:00
parent 2974c87684
commit 509159c3c6
9 changed files with 166 additions and 82 deletions

View File

@@ -387,20 +387,29 @@ ARDOUR_UI::setup_transport ()
HBox* clock_box = manage (new HBox);
clock_box->pack_start (*primary_clock, false, false);
if (!ARDOUR::Profile->get_small_screen()) {
if (!ARDOUR::Profile->get_small_screen() && !ARDOUR::Profile->get_trx()) {
clock_box->pack_start (*secondary_clock, false, false);
}
clock_box->set_spacing (3);
shuttle_box = new ShuttleControl;
shuttle_box->show ();
VBox* transport_vbox = manage (new VBox);
transport_vbox->set_name ("TransportBase");
transport_vbox->set_border_width (0);
transport_vbox->set_spacing (3);
transport_vbox->pack_start (*tbox, true, true, 0);
transport_vbox->pack_start (*shuttle_box, false, false, 0);
if (!Profile->get_trx()) {
transport_vbox->pack_start (*shuttle_box, false, false, 0);
}
time_info_box = manage (new TimeInfoBox);
if (ARDOUR::Profile->get_trx()) {
transport_tearoff_hbox.pack_start (*time_info_box, false, false);
}
transport_tearoff_hbox.pack_start (*transport_vbox, false, false);
@@ -410,21 +419,33 @@ ARDOUR_UI::setup_transport ()
auto_box->set_homogeneous (true);
auto_box->set_spacing (2);
auto_box->pack_start (sync_button, false, false);
auto_box->pack_start (follow_edits_button, false, false);
auto_box->pack_start (auto_return_button, false, false);
if (!ARDOUR::Profile->get_trx()) {
auto_box->pack_start (follow_edits_button, false, false);
auto_box->pack_start (auto_return_button, false, false);
}
transport_tearoff_hbox.pack_start (*auto_box, false, false);
if (!ARDOUR::Profile->get_trx()) {
transport_tearoff_hbox.pack_start (*auto_box, false, false);
}
transport_tearoff_hbox.pack_start (*clock_box, true, true);
time_info_box = manage (new TimeInfoBox);
transport_tearoff_hbox.pack_start (*time_info_box, false, false);
if (ARDOUR::Profile->get_trx()) {
transport_tearoff_hbox.pack_start (*auto_box, false, false);
}
if (Profile->get_small_screen()) {
if (!ARDOUR::Profile->get_trx()) {
transport_tearoff_hbox.pack_start (*time_info_box, false, false);
}
if (ARDOUR::Profile->get_small_screen()) {
transport_tearoff_hbox.pack_start (_editor_transport_box, false, false);
}
transport_tearoff_hbox.pack_start (alert_box, false, false);
transport_tearoff_hbox.pack_start (meter_box, false, false);
transport_tearoff_hbox.pack_start (editor_meter_peak_display, false, false);
if (!ARDOUR::Profile->get_trx()) {
transport_tearoff_hbox.pack_start (alert_box, false, false);
transport_tearoff_hbox.pack_start (meter_box, false, false);
transport_tearoff_hbox.pack_start (editor_meter_peak_display, false, false);
}
if (Profile->get_sae()) {
Image* img = manage (new Image ((::get_icon (X_("sae")))));

View File

@@ -23,9 +23,10 @@
This is to cut down on the compile times. It also helps with my sanity.
*/
#include "ardour/session.h"
#include "ardour/audioengine.h"
#include "ardour/automation_watch.h"
#include "ardour/profile.h"
#include "ardour/session.h"
#ifdef interface
#undef interface
@@ -210,13 +211,15 @@ ARDOUR_UI::set_session (Session *s)
_session->master_out() &&
_session->master_out()->n_outputs().n(DataType::AUDIO) > 0) {
editor_meter = new LevelMeterHBox(_session);
editor_meter->set_meter (_session->master_out()->shared_peak_meter().get());
editor_meter->clear_meters();
editor_meter->set_type (_session->master_out()->meter_type());
editor_meter->setup_meters (30, 12, 6);
editor_meter->show();
meter_box.pack_start(*editor_meter);
if (!ARDOUR::Profile->get_trx()) {
editor_meter = new LevelMeterHBox(_session);
editor_meter->set_meter (_session->master_out()->shared_peak_meter().get());
editor_meter->clear_meters();
editor_meter->set_type (_session->master_out()->meter_type());
editor_meter->setup_meters (30, 12, 6);
editor_meter->show();
meter_box.pack_start(*editor_meter);
}
ArdourMeter::ResetAllPeakDisplays.connect (sigc::mem_fun(*this, &ARDOUR_UI::reset_peak_display));
ArdourMeter::ResetRoutePeakDisplays.connect (sigc::mem_fun(*this, &ARDOUR_UI::reset_route_peak_display));
@@ -231,7 +234,7 @@ ARDOUR_UI::set_session (Session *s)
editor_meter_max_peak = -INFINITY;
editor_meter_peak_display.signal_button_release_event().connect (sigc::mem_fun(*this, &ARDOUR_UI::editor_meter_peak_button_release), false);
if (Config->get_show_editor_meter()) {
if (Config->get_show_editor_meter() && !ARDOUR::Profile->get_trx()) {
transport_tearoff_hbox.pack_start (meter_box, false, false);
transport_tearoff_hbox.pack_start (editor_meter_peak_display, false, false);
meter_box.show();

View File

@@ -262,10 +262,11 @@ Editor::Editor ()
/* tool bar related */
, zoom_range_clock (new AudioClock (X_("zoomrange"), false, X_("zoom range"), true, false, true))
, toolbar_selection_clock_table (2,3)
, _mouse_mode_tearoff (0)
, automation_mode_button (_("mode"))
, _zoom_tearoff (0)
, _tools_tearoff (0)
, _toolbar_viewport (*manage (new Gtk::Adjustment (0, 0, 1e10)), *manage (new Gtk::Adjustment (0, 0, 1e10)))
@@ -484,7 +485,9 @@ Editor::Editor ()
HBox* h = manage (new HBox);
_group_tabs = new EditorGroupTabs (this);
h->pack_start (*_group_tabs, PACK_SHRINK);
if (!ARDOUR::Profile->get_trx()) {
h->pack_start (*_group_tabs, PACK_SHRINK);
}
h->pack_start (edit_controls_vbox);
controls_layout.add (*h);
@@ -603,10 +606,14 @@ Editor::Editor ()
_summary_hbox.pack_start (*summary_frame, true, true);
_summary_hbox.pack_start (*summary_arrows_right, false, false);
editor_summary_pane.pack2 (_summary_hbox);
if (!ARDOUR::Profile->get_trx()) {
editor_summary_pane.pack2 (_summary_hbox);
}
edit_pane.pack1 (editor_summary_pane, true, true);
edit_pane.pack2 (_the_notebook, false, true);
if (!ARDOUR::Profile->get_trx()) {
edit_pane.pack2 (_the_notebook, false, true);
}
editor_summary_pane.signal_size_allocate().connect (sigc::bind (sigc::mem_fun (*this, &Editor::pane_allocation_handler), static_cast<Paned*> (&editor_summary_pane)));
@@ -2871,15 +2878,21 @@ Editor::setup_toolbar ()
mouse_mode_hbox->set_spacing (2);
mouse_mode_hbox->pack_start (smart_mode_button, false, false);
if (!ARDOUR::Profile->get_trx()) {
mouse_mode_hbox->pack_start (smart_mode_button, false, false);
}
mouse_mode_hbox->pack_start (mouse_move_button, false, false);
mouse_mode_hbox->pack_start (mouse_select_button, false, false);
mouse_mode_hbox->pack_start (mouse_zoom_button, false, false);
mouse_mode_hbox->pack_start (mouse_gain_button, false, false);
mouse_mode_hbox->pack_start (mouse_timefx_button, false, false);
mouse_mode_hbox->pack_start (mouse_audition_button, false, false);
mouse_mode_hbox->pack_start (mouse_draw_button, false, false);
mouse_mode_hbox->pack_start (internal_edit_button, false, false, 8);
if (!ARDOUR::Profile->get_trx()) {
mouse_mode_hbox->pack_start (mouse_gain_button, false, false);
mouse_mode_hbox->pack_start (mouse_timefx_button, false, false);
mouse_mode_hbox->pack_start (mouse_audition_button, false, false);
mouse_mode_hbox->pack_start (mouse_draw_button, false, false);
mouse_mode_hbox->pack_start (internal_edit_button, false, false, 8);
}
mouse_mode_vbox->pack_start (*mouse_mode_hbox);
@@ -2898,7 +2911,9 @@ Editor::setup_toolbar ()
edit_mode_selector.set_size_request (65, -1);
edit_mode_selector.add_elements (ArdourButton::Inset);
mode_box->pack_start (edit_mode_selector, false, false);
if (!ARDOUR::Profile->get_trx()) {
mode_box->pack_start (edit_mode_selector, false, false);
}
mode_box->pack_start (*mouse_mode_box, false, false);
_mouse_mode_tearoff = manage (new TearOff (*mode_box));
@@ -2950,11 +2965,15 @@ Editor::setup_toolbar ()
zoom_focus_selector.set_size_request (80, -1);
// zoom_focus_selector.add_elements (ArdourButton::Inset);
_zoom_box.pack_start (zoom_out_button, false, false);
_zoom_box.pack_start (zoom_in_button, false, false);
_zoom_box.pack_start (zoom_out_full_button, false, false);
_zoom_box.pack_start (zoom_focus_selector, false, false);
if (!ARDOUR::Profile->get_trx()) {
_zoom_box.pack_start (zoom_out_button, false, false);
_zoom_box.pack_start (zoom_in_button, false, false);
_zoom_box.pack_start (zoom_out_full_button, false, false);
_zoom_box.pack_start (zoom_focus_selector, false, false);
} else {
mode_box->pack_start (zoom_out_button, false, false);
mode_box->pack_start (zoom_in_button, false, false);
}
/* Track zoom buttons */
visible_tracks_selector.set_name ("zoom button");
@@ -2977,21 +2996,24 @@ Editor::setup_toolbar ()
act = ActionManager::get_action (X_("Editor"), X_("shrink-tracks"));
tav_shrink_button.set_related_action (act);
_zoom_box.pack_start (visible_tracks_selector);
if (!ARDOUR::Profile->get_trx()) {
_zoom_box.pack_start (visible_tracks_selector);
}
_zoom_box.pack_start (tav_shrink_button);
_zoom_box.pack_start (tav_expand_button);
_zoom_tearoff = manage (new TearOff (_zoom_box));
_zoom_tearoff->Detach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
&_zoom_tearoff->tearoff_window()));
_zoom_tearoff->Attach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
&_zoom_tearoff->tearoff_window(), 0));
_zoom_tearoff->Hidden.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
&_zoom_tearoff->tearoff_window()));
_zoom_tearoff->Visible.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
&_zoom_tearoff->tearoff_window(), 0));
if (!ARDOUR::Profile->get_trx()) {
_zoom_tearoff = manage (new TearOff (_zoom_box));
_zoom_tearoff->Detach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
&_zoom_tearoff->tearoff_window()));
_zoom_tearoff->Attach.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
&_zoom_tearoff->tearoff_window(), 0));
_zoom_tearoff->Hidden.connect (sigc::bind (sigc::mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
&_zoom_tearoff->tearoff_window()));
_zoom_tearoff->Visible.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
&_zoom_tearoff->tearoff_window(), 0));
}
snap_box.set_spacing (2);
snap_box.set_border_width (2);
@@ -3055,15 +3077,19 @@ Editor::setup_toolbar ()
toolbar_hbox.set_border_width (1);
toolbar_hbox.pack_start (*_mouse_mode_tearoff, false, false);
toolbar_hbox.pack_start (*_zoom_tearoff, false, false);
toolbar_hbox.pack_start (*_tools_tearoff, false, false);
if (!ARDOUR::Profile->get_trx()) {
toolbar_hbox.pack_start (*_zoom_tearoff, false, false);
toolbar_hbox.pack_start (*_tools_tearoff, false, false);
}
hbox->pack_start (snap_box, false, false);
if (!Profile->get_small_screen()) {
hbox->pack_start (*nudge_box, false, false);
} else {
ARDOUR_UI::instance()->editor_transport_box().pack_start (*nudge_box, false, false);
}
if (!ARDOUR::Profile->get_trx()) {
hbox->pack_start (snap_box, false, false);
if (!Profile->get_small_screen()) {
hbox->pack_start (*nudge_box, false, false);
} else {
ARDOUR_UI::instance()->editor_transport_box().pack_start (*nudge_box, false, false);
}
}
hbox->pack_start (panic_box, false, false);
hbox->show_all ();
@@ -3704,7 +3730,7 @@ Editor::detach_tearoff (Box* /*b*/, Window* /*w*/)
{
if ((_tools_tearoff->torn_off() || !_tools_tearoff->visible()) &&
(_mouse_mode_tearoff->torn_off() || !_mouse_mode_tearoff->visible()) &&
(_zoom_tearoff->torn_off() || !_zoom_tearoff->visible())) {
(_zoom_tearoff && (_zoom_tearoff->torn_off() || !_zoom_tearoff->visible()))) {
top_hbox.remove (toolbar_frame);
}
}
@@ -4014,7 +4040,9 @@ Editor::update_tearoff_visibility()
bool visible = Config->get_keep_tearoffs();
_mouse_mode_tearoff->set_visible (visible);
_tools_tearoff->set_visible (visible);
_zoom_tearoff->set_visible (visible);
if (_zoom_tearoff) {
_zoom_tearoff->set_visible (visible);
}
}
void

View File

@@ -1650,7 +1650,9 @@ Editor::parameter_changed (std::string p)
} else if (p == "timecode-offset" || p == "timecode-offset-negative") {
update_just_timecode ();
} else if (p == "show-zoom-tools") {
_zoom_tearoff->set_visible (Config->get_show_zoom_tools(), true);
if (_zoom_tearoff) {
_zoom_tearoff->set_visible (Config->get_show_zoom_tools(), true);
}
} else if (p == "sound-midi-notes") {
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("sound-midi-notes"));

View File

@@ -1608,7 +1608,7 @@ EngineControl::EngineControl ()
uint32_t il = (uint32_t) input_latency.get_value ();
uint32_t ol = (uint32_t) input_latency.get_value ();
/* reset to zero so that our new test instance of JACK
/* reset to zero so that our new test instance
will be clean of any existing latency measures.
*/

View File

@@ -132,6 +132,8 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session* sess, boost::shared_ptr<Route> rt
void
MixerStrip::init ()
{
int button_table_row = 0;
input_selector = 0;
output_selector = 0;
group_menu = 0;
@@ -207,15 +209,19 @@ MixerStrip::init ()
top_button_table.set_homogeneous (true);
top_button_table.set_spacings (2);
top_button_table.attach (*monitor_input_button, 0, 1, 0, 1);
top_button_table.attach (*monitor_disk_button, 1, 2, 0, 1);
if (!ARDOUR::Profile->get_trx()) {
top_button_table.attach (*monitor_input_button, 0, 1, 0, 1);
top_button_table.attach (*monitor_disk_button, 1, 2, 0, 1);
}
top_button_table.show ();
rec_solo_table.set_homogeneous (true);
rec_solo_table.set_row_spacings (2);
rec_solo_table.set_col_spacings (2);
rec_solo_table.attach (*solo_isolated_led, 1, 2, 0, 1);
rec_solo_table.attach (*solo_safe_led, 1, 2, 1, 2);
if (!ARDOUR::Profile->get_trx()) {
rec_solo_table.attach (*solo_isolated_led, 1, 2, 0, 1);
rec_solo_table.attach (*solo_safe_led, 1, 2, 1, 2);
}
rec_solo_table.show ();
button_table.set_homogeneous (false);
@@ -237,17 +243,24 @@ MixerStrip::init ()
button_size_group->add_widget (*monitor_input_button);
}
button_table.attach (name_button, 0, 1, 0, 1);
button_table.attach (input_button_box, 0, 1, 1, 2);
button_table.attach (_invert_button_box, 0, 1, 2, 3);
if (!ARDOUR::Profile->get_trx()) {
button_table.attach (name_button, button_table_row, button_table_row+1, 0, 1);
button_table_row++;
button_table.attach (input_button_box, button_table_row, button_table_row+1, 1, 2);
button_table_row++;
button_table.attach (_invert_button_box, button_table_row, button_table_row+1, 2, 3);
button_table_row++;
}
middle_button_table.set_homogeneous (true);
middle_button_table.set_spacings (2);
bottom_button_table.set_spacings (2);
bottom_button_table.set_homogeneous (true);
// bottom_button_table.attach (group_button, 0, 1, 0, 1);
bottom_button_table.attach (gpm.gain_automation_state_button, 0, 1, 0, 1);
bottom_button_table.attach (group_button, button_table_row, button_table_row+1, 0, 1);
button_table_row++;
bottom_button_table.attach (gpm.gain_automation_state_button, button_table_row, button_table_row+1, 0, 1);
button_table_row++;
name_button.set_name ("mixer strip button");
name_button.set_text (" "); /* non empty text, forces creation of the layout */
@@ -281,17 +294,23 @@ MixerStrip::init ()
whvbox.pack_start (width_hide_box, true, true);
global_vpacker.set_spacing (2);
global_vpacker.pack_start (whvbox, Gtk::PACK_SHRINK);
global_vpacker.pack_start (button_table, Gtk::PACK_SHRINK);
global_vpacker.pack_start (processor_box, true, true);
if (!ARDOUR::Profile->get_trx()) {
global_vpacker.pack_start (whvbox, Gtk::PACK_SHRINK);
global_vpacker.pack_start (button_table, Gtk::PACK_SHRINK);
global_vpacker.pack_start (processor_box, true, true);
}
global_vpacker.pack_start (panners, Gtk::PACK_SHRINK);
global_vpacker.pack_start (top_button_table, Gtk::PACK_SHRINK);
global_vpacker.pack_start (rec_solo_table, Gtk::PACK_SHRINK);
global_vpacker.pack_start (middle_button_table, Gtk::PACK_SHRINK);
global_vpacker.pack_start (gpm, Gtk::PACK_SHRINK);
global_vpacker.pack_start (bottom_button_table, Gtk::PACK_SHRINK);
global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK);
global_vpacker.pack_start (_comment_button, Gtk::PACK_SHRINK);
if (!ARDOUR::Profile->get_trx()) {
global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK);
global_vpacker.pack_start (_comment_button, Gtk::PACK_SHRINK);
} else {
global_vpacker.pack_start (name_button, Gtk::PACK_SHRINK);
}
global_frame.add (global_vpacker);
global_frame.set_shadow_type (Gtk::SHADOW_IN);
@@ -497,6 +516,10 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
rec_enable_button->set_sensitive (_session->writable());
rec_enable_button->show();
if (ARDOUR::Profile->get_trx()) {
rec_solo_table.attach (*monitor_input_button, 1, 2, 0, 2);
}
} else {
/* non-master bus */

View File

@@ -207,8 +207,10 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
controls_table.attach (*solo_button, 7, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
}
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::FILL|Gtk::EXPAND, Gtk::AttachOptions (0), 3, 0);
if (!ARDOUR::Profile->get_trx()) {
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::FILL|Gtk::EXPAND, Gtk::AttachOptions (0), 3, 0);
}
ARDOUR_UI::instance()->set_tip(*solo_button,_("Solo"));
ARDOUR_UI::instance()->set_tip(*mute_button,_("Mute"));
@@ -222,9 +224,11 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
label_view ();
controls_table.attach (automation_button, 6, 7, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
if (!ARDOUR::Profile->get_trx()) {
controls_table.attach (automation_button, 6, 7, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
}
if (is_track() && track()->mode() == ARDOUR::Normal) {
if (!ARDOUR::Profile->get_trx() && is_track() && track()->mode() == ARDOUR::Normal) {
controls_table.attach (playlist_button, 5, 6, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
}

View File

@@ -588,7 +588,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
}
if (!_session->engine().connected()) {
MessageDialog msg (_("Not connected to JACK - cannot engage record"));
MessageDialog msg (_("Not connected to AudioEngine - cannot engage record"));
msg.run ();
return true;
}

View File

@@ -27,6 +27,7 @@
#include "gtkmm2ext/actions.h"
#include "ardour/location.h"
#include "ardour/profile.h"
#include "ardour/session.h"
#include "time_info_box.h"
@@ -71,7 +72,9 @@ TimeInfoBox::TimeInfoBox ()
set_border_width (2);
pack_start (left, true, true);
pack_start (right, true, true);
if (!ARDOUR::Profile->get_trx()) {
pack_start (right, true, true);
}
left.set_homogeneous (false);
left.set_spacings (0);