diff options
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 20 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui2.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_ed.cc | 56 | ||||
-rw-r--r-- | gtk2_ardour/editor.cc | 11 | ||||
-rw-r--r-- | gtk2_ardour/editor_export_audio.cc | 2 |
6 files changed, 72 insertions, 21 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index b2da3fdc4c..8f86054ddd 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -564,21 +564,11 @@ ARDOUR_UI::update_disk_space() int secs; nframes_t fr = session->frame_rate(); - if (session->actively_recording()){ - - rec_enabled_diskstreams = 0; - session->foreach_route (this, &ARDOUR_UI::count_recenabled_diskstreams); - - if (rec_enabled_diskstreams) { - frames /= rec_enabled_diskstreams; - } - - } else { - - /* hmmm. shall we divide by the route count? or the diskstream count? - or what? for now, do nothing ... - */ - + rec_enabled_diskstreams = 0; + session->foreach_route (this, &ARDOUR_UI::count_recenabled_diskstreams); + + if (rec_enabled_diskstreams) { + frames /= rec_enabled_diskstreams; } hrs = frames / (fr * 3600); diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 69f2cd0492..4b03352bb6 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -689,6 +689,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI void map_meter_falloff (); void toggle_control_protocol (ARDOUR::ControlProtocolInfo*); + void toggle_control_protocol_feedback (ARDOUR::ControlProtocolInfo*, const char* group_name, const char* action_name); }; #endif /* __ardour_gui_h__ */ diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index f1b8ddad2f..7f724312aa 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -363,6 +363,9 @@ ARDOUR_UI::setup_transport () auditioning_alert_button.set_name ("TransportAuditioningAlert"); auditioning_alert_button.signal_pressed().connect (mem_fun(*this,&ARDOUR_UI::audition_alert_toggle)); + tooltips().set_tip (solo_alert_button, _("When active, something is soloed.\nClick to de-solo everything")); + tooltips().set_tip (auditioning_alert_button, _("When active, auditioning is taking place\nClick to stop the audition")); + alert_box.pack_start (solo_alert_button, false, false); alert_box.pack_start (auditioning_alert_button, false, false); diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index d7c294c681..e764779300 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -479,9 +479,35 @@ ARDOUR_UI::toggle_control_protocol (ControlProtocolInfo* cpi) } void +ARDOUR_UI::toggle_control_protocol_feedback (ControlProtocolInfo* cpi, const char* group, const char* action) +{ + if (!session) { + /* this happens when we build the menu bar when control protocol support + has been used in the past for some given protocol - the item needs + to be made active, but there is no session yet. + */ + return; + } + + if (cpi->protocol) { + Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (group, action); + + if (act) { + Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act); + bool x = tact->get_active(); + + if (tact && x != cpi->protocol->get_feedback()) { + cpi->protocol->set_feedback (!x); + } + } + } +} + +void ARDOUR_UI::build_control_surface_menu () { list<ControlProtocolInfo*>::iterator i; + bool with_feedback; /* !!! this has to match the top level entry from ardour.menus */ @@ -501,6 +527,8 @@ ARDOUR_UI::build_control_surface_menu () (bind (mem_fun (*this, &ARDOUR_UI::toggle_control_protocol), *i))); Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act); + + with_feedback = false; if ((*i)->protocol || (*i)->requested) { tact->set_active (); @@ -509,6 +537,34 @@ ARDOUR_UI::build_control_surface_menu () ui += "<menuitem action='"; ui += action_name; ui += "'/>\n"; + + if ((*i)->supports_feedback) { + + string submenu_name = action_name; + + submenu_name += "SubMenu"; + + ActionManager::register_action (editor->editor_actions, submenu_name.c_str(), _("Controls")); + + action_name += "Feedback"; + + Glib::RefPtr<Action> act = ActionManager::register_toggle_action (editor->editor_actions, action_name.c_str(), _("Feedback"), + (bind (mem_fun (*this, &ARDOUR_UI::toggle_control_protocol_feedback), + *i, + "Editor", + action_name.c_str()))); + + ui += "<menu action='"; + ui += submenu_name; + ui += "'>\n<menuitem action='"; + ui += action_name; + ui += "'/>\n</menu>\n"; + + if ((*i)->protocol) { + Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act); + tact->set_active ((*i)->protocol->get_feedback ()); + } + } } } diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index ed09a03597..67f3acccf9 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -129,11 +129,11 @@ static const gchar *snap_mode_strings[] = { }; static const gchar *zoom_focus_strings[] = { - N_("Focus Left"), - N_("Focus Right"), - N_("Focus Center"), - N_("Focus Playhead"), - N_("Focus Edit Cursor"), + N_("Left"), + N_("Right"), + N_("Center"), + N_("Playhead"), + N_("Edit Cursor"), 0 }; @@ -2589,6 +2589,7 @@ Editor::setup_toolbar () Gtkmm2ext::set_size_request_to_display_given_text (zoom_focus_selector, "Focus Center", 2+FUDGE, 0); set_popdown_strings (zoom_focus_selector, internationalize (zoom_focus_strings)); zoom_focus_selector.signal_changed().connect (mem_fun(*this, &Editor::zoom_focus_selection_done)); + ARDOUR_UI::instance()->tooltips().set_tip (zoom_focus_selector, _("Zoom focus")); zoom_box.pack_start (zoom_focus_selector, false, false); diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc index 7ea87a2969..fd40b9cae0 100644 --- a/gtk2_ardour/editor_export_audio.cc +++ b/gtk2_ardour/editor_export_audio.cc @@ -55,7 +55,7 @@ void Editor::export_session() { if (session) { - export_range (0, session->current_end_frame()); + export_range (session->current_start_frame(), session->current_end_frame()); } } |