}
void
-ARDOUR_UI::display_message (const char *prefix, gint prefix_len, RefPtr<TextBuffer::Tag> ptag, RefPtr<TextBuffer::Tag> mtag, const char *msg)
+ARDOUR_UI::display_message (const char* prefix, gint prefix_len, RefPtr<TextBuffer::Tag> ptag, RefPtr<TextBuffer::Tag> mtag, const char* msg)
{
- string text;
-
UI::display_message (prefix, prefix_len, ptag, mtag, msg);
ArdourLogLevel ll = LogLevelNone;
if (strcmp (prefix, _("[ERROR]: ")) == 0) {
- text = "<span color=\"red\" weight=\"bold\">";
ll = LogLevelError;
} else if (strcmp (prefix, _("[WARNING]: ")) == 0) {
- text = "<span color=\"yellow\" weight=\"bold\">";
ll = LogLevelWarning;
} else if (strcmp (prefix, _("[INFO]: ")) == 0) {
- text = "<span color=\"green\" weight=\"bold\">";
ll = LogLevelInfo;
- } else {
- text = "<span color=\"white\" weight=\"bold\">???";
}
_log_not_acknowledged = std::max(_log_not_acknowledged, ll);
-
-#ifdef TOP_MENUBAR
- text += prefix;
- text += "</span>";
- text += msg;
-
- status_bar_label.set_markup (text);
-#endif
}
XMLNode*
void
ARDOUR_UI::repack_transport_hbox ()
{
- if (dsp_load_indicator.get_parent()) {
- transport_hbox.remove (dsp_load_indicator);
- }
- if (UIConfiguration::instance().get_show_dsp_load_info ()) {
- transport_hbox.pack_start (dsp_load_indicator, false, false);
- dsp_load_indicator.show();
- }
-
- if (disk_space_indicator.get_parent()) {
- transport_hbox.remove (disk_space_indicator);
- }
- if (UIConfiguration::instance().get_show_disk_space_info ()) {
- transport_hbox.pack_start (disk_space_indicator, false, false);
- disk_space_indicator.show();
- }
-
- if (status_spacer.get_parent()) {
- transport_hbox.remove (status_spacer);
- }
- transport_hbox.pack_start (status_spacer, false, false, 3);
-
if (time_info_box) {
if (time_info_box->get_parent()) {
transport_hbox.remove (*time_info_box);
}
if (editor_meter) {
- if (meter_box.get_parent()) {
- transport_hbox.remove (meter_box);
- transport_hbox.remove (editor_meter_peak_display);
+ if (editor_meter_table.get_parent()) {
+ transport_hbox.remove (editor_meter_table);
+ }
+ if (meterbox_spacer.get_parent()) {
+ transport_hbox.remove (meterbox_spacer);
+ transport_hbox.remove (meterbox_spacer2);
}
if (UIConfiguration::instance().get_show_editor_meter()) {
- transport_hbox.pack_end (editor_meter_peak_display, false, false);
- transport_hbox.pack_end (meter_box, false, false);
- meter_box.show();
- editor_meter_peak_display.show();
+ transport_hbox.pack_end (meterbox_spacer, false, false, 3);
+ transport_hbox.pack_end (editor_meter_table, false, false);
+ transport_hbox.pack_end (meterbox_spacer2, false, false, 3);
+ editor_meter_table.show();
+ meterbox_spacer.show();
+ meterbox_spacer2.show();
}
}
RefPtr<Action> act;
/* setup actions */
- act = ActionManager::get_action (X_("Transport"), X_("ToggleExternalSync"));
+ act = global_actions.find_action (X_("Transport"), X_("ToggleExternalSync"));
sync_button.set_related_action (act);
sync_button.signal_button_press_event().connect (sigc::mem_fun (*this, &ARDOUR_UI::sync_button_clicked), false);
sync_button.set_sizing_text (S_("LogestSync|M-Clk"));
/* CANNOT sigc::bind these to clicked or toggled, must use pressed or released */
- act = ActionManager::get_action (X_("Main"), X_("cancel-solo"));
+ act = global_actions.find_action (X_("Main"), X_("cancel-solo"));
solo_alert_button.set_related_action (act);
auditioning_alert_button.signal_clicked.connect (sigc::mem_fun(*this,&ARDOUR_UI::audition_alert_clicked));
error_alert_button.signal_button_release_event().connect (sigc::mem_fun(*this,&ARDOUR_UI::error_alert_press), false);
- act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window"));
+ act = editor->find_action (X_("Editor"), X_("toggle-log-window"));
error_alert_button.set_related_action(act);
error_alert_button.set_fallthrough_to_parent(true);
layered_button.signal_clicked.connect (sigc::mem_fun(*this,&ARDOUR_UI::layered_button_clicked));
- editor_visibility_button.set_related_action (ActionManager::get_action (X_("Common"), X_("change-editor-visibility")));
- mixer_visibility_button.set_related_action (ActionManager::get_action (X_("Common"), X_("change-mixer-visibility")));
- prefs_visibility_button.set_related_action (ActionManager::get_action (X_("Common"), X_("change-preferences-visibility")));
+ editor_visibility_button.set_related_action (global_actions.find_action (X_("Common"), X_("change-editor-visibility")));
+ mixer_visibility_button.set_related_action (global_actions.find_action (X_("Common"), X_("change-mixer-visibility")));
+ prefs_visibility_button.set_related_action (global_actions.find_action (X_("Common"), X_("change-preferences-visibility")));
- act = ActionManager::get_action ("Transport", "ToggleAutoReturn");
+ act = global_actions.find_action ("Transport", "ToggleAutoReturn");
auto_return_button.set_related_action (act);
- act = ActionManager::get_action (X_("Transport"), X_("ToggleFollowEdits"));
+ act = global_actions.find_action (X_("Transport"), X_("ToggleFollowEdits"));
follow_edits_button.set_related_action (act);
- act = ActionManager::get_action ("Transport", "ToggleAutoInput");
+ act = global_actions.find_action ("Transport", "ToggleAutoInput");
auto_input_button.set_related_action (act);
- act = ActionManager::get_action ("Transport", "TogglePunchIn");
+ act = global_actions.find_action ("Transport", "TogglePunchIn");
punch_in_button.set_related_action (act);
- act = ActionManager::get_action ("Transport", "TogglePunchOut");
+ act = global_actions.find_action ("Transport", "TogglePunchOut");
punch_out_button.set_related_action (act);
- act = ActionManager::get_action ("Transport", "SessionMonitorIn");
+ act = global_actions.find_action ("Transport", "SessionMonitorIn");
monitor_in_button.set_related_action (act);
- act = ActionManager::get_action ("Transport", "SessionMonitorDisk");
+ act = global_actions.find_action ("Transport", "SessionMonitorDisk");
monitor_disk_button.set_related_action (act);
/* connect signals */
/* top level packing */
transport_table.set_spacings (0);
transport_table.set_row_spacings (4);
- transport_table.set_border_width (2);
+ transport_table.set_border_width (0);
transport_frame.set_name ("TransportFrame");
transport_frame.set_shadow_type (Gtk::SHADOW_NONE);
if (ev->button == 1) {
if (_log_not_acknowledged == LogLevelError) {
// just acknowledge the error, don't hide the log if it's already visible
- RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window"));
+ RefPtr<Action> act = editor->find_action (X_("Editor"), X_("toggle-log-window"));
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
if (tact && tact->get_active()) {
do_toggle = false;
void
ARDOUR_UI::toggle_follow_edits ()
{
- RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("ToggleFollowEdits"));
+ RefPtr<Action> act = global_actions.find_action (X_("Transport"), X_("ToggleFollowEdits"));
assert (act);
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic (act);
}
}
+
+void
+ARDOUR_UI::toggle_use_monitor_section ()
+{
+ RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), "UseMonitorSection");
+ assert (act); RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+ assert (tact);
+
+ bool yn = tact->get_active ();
+
+ if (yn) {
+ _session->add_monitor_section ();
+ } else {
+ _session->remove_monitor_section ();
+ }
+
+ Config->set_use_monitor_bus (yn);
+}