change the error-log button to toggle the log window

This commit is contained in:
Robin Gareus 2015-03-17 02:05:02 +01:00
parent 5c0e3d4f04
commit bf43019eed
2 changed files with 3 additions and 7 deletions

View File

@ -211,7 +211,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
, auditioning_alert_button (_("Audition"))
, solo_alert_button (_("Solo"))
, feedback_alert_button (_("Feedback"))
, error_alert_button ( ArdourButton::Element (ArdourButton::Edge | ArdourButton::Indicator) )
, error_alert_button ( ArdourButton::just_led_default_elements )
, editor_meter(0)
, editor_meter_peak_display()

View File

@ -332,6 +332,8 @@ ARDOUR_UI::setup_transport ()
feedback_alert_button.signal_button_press_event().connect (sigc::mem_fun (*this, &ARDOUR_UI::feedback_alert_press), false);
error_alert_button.set_name ("error alert");
error_alert_button.signal_button_press_event().connect (sigc::mem_fun(*this,&ARDOUR_UI::error_alert_press), false);
act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window"));
error_alert_button.set_related_action(act);
alert_box.set_homogeneous (true);
alert_box.set_spacing (2);
@ -548,7 +550,6 @@ ARDOUR_UI::error_alert_press (GdkEventButton*)
{
_log_not_acknowledged = LogLevelNone;
error_blink (false); // immediate acknowledge
UI::show_errors();
return true;
}
@ -633,23 +634,18 @@ ARDOUR_UI::error_blink (bool onoff)
// blink
if (onoff) {
error_alert_button.set_custom_led_color(0xff0000ff); // bright red
error_alert_button.set_active (true);
} else {
error_alert_button.set_custom_led_color(0x880000ff); // dark red
error_alert_button.set_active (false);
}
break;
case LogLevelWarning:
error_alert_button.set_custom_led_color(0xccaa00ff); // yellow
error_alert_button.set_active (true);
break;
case LogLevelInfo:
error_alert_button.set_custom_led_color(0x88cc00ff); // lime green
error_alert_button.set_active (true);
break;
default:
error_alert_button.set_custom_led_color(0x333333ff); // gray
error_alert_button.set_active (false);
break;
}
}