13
0

make master-meter in toolbar optional

This commit is contained in:
Robin Gareus 2013-08-04 00:06:29 +02:00 committed by Paul Davis
parent ee610da977
commit 9ff32d1b52
5 changed files with 28 additions and 2 deletions

View File

@ -1039,7 +1039,7 @@ ARDOUR_UI::every_point_zero_something_seconds ()
// august 2007: actual update frequency: 25Hz (40ms), not 100Hz
SuperRapidScreenUpdate(); /* EMIT_SIGNAL */
if (editor_meter) {
if (editor_meter && Config->get_show_editor_meter()) {
float mpeak = editor_meter->update_meters();
if (mpeak > editor_meter_max_peak) {
if (mpeak >= Config->get_meter_peak()) {

View File

@ -203,6 +203,7 @@ ARDOUR_UI::set_session (Session *s)
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));
@ -214,10 +215,17 @@ ARDOUR_UI::set_session (Session *s)
editor_meter_peak_display.unset_flags (Gtk::CAN_FOCUS);
editor_meter_peak_display.set_size_request(6, -1);
editor_meter_peak_display.set_corner_radius(2);
editor_meter_peak_display.show();
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()) {
meter_box.show();
editor_meter_peak_display.show();
} else {
meter_box.hide();
editor_meter_peak_display.hide();
}
}
}

View File

@ -415,6 +415,15 @@ ARDOUR_UI::parameter_changed (std::string p)
start_clocking ();
} else if (p == "waveform-gradient-depth") {
ArdourCanvas::WaveView::set_global_gradient_depth (config()->get_waveform_gradient_depth());
} else if (p == "show-editor-meter") {
bool show = Config->get_show_editor_meter();
if (editor_meter && show) {
meter_box.show();
editor_meter_peak_display.show();
} else if (editor_meter && !show) {
meter_box.hide();
editor_meter_peak_display.hide();
}
}
}

View File

@ -1315,6 +1315,14 @@ RCOptionEditor::RCOptionEditor ()
sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_track_meters)
));
add_option (_("Editor"),
new BoolOption (
"show-editor-meter",
_("Display master-meter in the toolbar"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_editor_meter),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_editor_meter)
));
bco = new BoolComboOption (
"use-overlap-equivalency",
_("Regions in active edit groups are edited together"),

View File

@ -154,6 +154,7 @@ CONFIG_VARIABLE (MeterLineUp, meter_line_up_level, "meter-line-up-level", Meteri
CONFIG_VARIABLE (MeterLineUp, meter_line_up_din, "meter-line-up-din", MeteringLineUp15)
CONFIG_VARIABLE (float, meter_peak, "meter-peak", 0.0f)
CONFIG_VARIABLE (bool, meter_style_led, "meter-style-led", true)
CONFIG_VARIABLE (bool, show_editor_meter, "show-editor-meter", true)
/* miscellany */