13
0
Fork 0

L: set Actions for marker buttons, incl "Add Section Marker" action

This commit is contained in:
Ben Loftis 2024-05-07 15:51:39 -05:00
parent 9134a6968a
commit 796720b685
3 changed files with 28 additions and 11 deletions

View File

@ -321,9 +321,9 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
, editor_meter(0)
, _clear_editor_meter( true)
, _editor_meter_peaked (false)
, _livetrax_btn_rec_none (_("Rec None"))
, _livetrax_btn_peak_reset (_("Reset Peaks"))
, _livetrax_btn_marker_new (_("Marker"))
, _livetrax_btn_new_section (_("+Sec"))
, _livetrax_btn_new_location (_("+Loc"))
, _livetrax_btn_prev_marker (_("<< Prev"))
, _livetrax_btn_next_marker (_("Next >>"))
, _livetrax_centering_sizegroup (Gtk::SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL))

View File

@ -657,10 +657,10 @@ private:
Gtk::HBox livetrax_prefs_bar;
Gtk::HBox livetrax_mixer_bar;
ArdourWidgets::ArdourButton _livetrax_btn_rec_none;
ArdourWidgets::ArdourButton _livetrax_btn_peak_reset;
ArdourWidgets::ArdourButton _livetrax_btn_marker_new;
ArdourWidgets::ArdourButton _livetrax_btn_new_section;
ArdourWidgets::ArdourButton _livetrax_btn_new_location;
ArdourWidgets::ArdourButton _livetrax_btn_prev_marker;
ArdourWidgets::ArdourButton _livetrax_btn_next_marker;

View File

@ -481,8 +481,9 @@ ARDOUR_UI::livetrax_setup_windows ()
int TCOL = 0;
livetrax_top_table_l.attach (_livetrax_btn_prev_marker, TCOL, TCOL+1, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table_l.attach (_livetrax_btn_marker_new, TCOL+1, TCOL+2, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table_l.attach (_livetrax_btn_next_marker, TCOL+2, TCOL+3, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table_l.attach (_livetrax_btn_new_section, TCOL+1, TCOL+2, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table_l.attach (_livetrax_btn_new_location, TCOL+2, TCOL+3, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table_l.attach (_livetrax_btn_next_marker, TCOL+3, TCOL+4, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table_l.attach (transport_ctrl, TCOL, TCOL+4, 1, 2, FILL, FILL, 4, 4); TCOL+=4;
livetrax_top_table_l.attach (sync_button, TCOL, TCOL+1, 0, 1, FILL, FILL, 4, 4); TCOL++;
@ -500,16 +501,13 @@ ARDOUR_UI::livetrax_setup_windows ()
TCOL = 0;
livetrax_top_table_r.attach (*editor->mouse_mode_hbox, TCOL, TCOL+1, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table_r.attach (editor->_track_box, TCOL, TCOL+1, 1, 2, FILL, FILL, 4, 4); TCOL+=2;
livetrax_top_table_r.attach (_livetrax_btn_peak_reset, TCOL, TCOL+1, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table_r.attach (editor->_zoom_box, TCOL, TCOL+1, 1, 2, FILL, FILL, 4, 4); TCOL++;
livetrax_top_table_r.attach (*manage(new Label("")), TCOL, TCOL+1, 0, 2, EXPAND, FILL, 4, 4); TCOL++;
livetrax_top_table_r.attach (_livetrax_btn_rec_none, TCOL+1, TCOL+2, 0, 1, FILL, FILL, 4, 4); TCOL+=2;
livetrax_top_table_r.attach (_livetrax_btn_peak_reset, TCOL, TCOL+1, 0, 2, FILL, FILL, 4, 4); TCOL++;
livetrax_top_table_r.attach (*manage(new Label("")), TCOL, TCOL+1, 0, 2, EXPAND, FILL, 4, 4); TCOL++;
livetrax_top_table_r.attach (*manage(new Label("")), TCOL, TCOL+1, 0, 2, EXPAND, FILL, 4, 4); TCOL++;
livetrax_top_table_r.attach (*ev_dsp, TCOL, TCOL+1, 0, 1, FILL, FILL, 4, 4);
livetrax_top_table_r.attach (disk_space_label, TCOL, TCOL+1, 1, 2, FILL, FILL, 4, 4); TCOL++;
@ -593,6 +591,25 @@ ARDOUR_UI::livetrax_setup_windows ()
we_have_dependents ();
_livetrax_btn_prev_marker.set_tooltip_text(_("Jump to Prior Marker"));
_livetrax_btn_prev_marker.set_elements(ArdourButton::Element (ArdourButton::VectorIcon|ArdourButton::Edge|ArdourButton::Body));
_livetrax_btn_prev_marker.set_icon(ArdourWidgets::ArdourIcon::ScrollLeft);
act = ActionManager::get_action (X_("Common"), X_("jump-backward-to-mark"));
_livetrax_btn_prev_marker.set_related_action (act);
_livetrax_btn_next_marker.set_tooltip_text(_("Jump to Next Marker"));
_livetrax_btn_next_marker.set_icon(ArdourWidgets::ArdourIcon::ScrollRight);
act = ActionManager::get_action (X_("Common"), X_("jump-forward-to-mark"));
_livetrax_btn_next_marker.set_related_action (act);
_livetrax_btn_new_location.set_tooltip_text(_("Create a New Location at Playhead"));
act = ActionManager::get_action (X_("Common"), X_("add-location-from-playhead"));
_livetrax_btn_new_location.set_related_action (act);
_livetrax_btn_new_section.set_tooltip_text(_("Start a New Section at Playhead"));
act = ActionManager::get_action (X_("Common"), X_("add-section-from-playhead"));
_livetrax_btn_new_section.set_related_action (act);
/* order of addition affects order seen in initial window display */
main_vpacker.pack_start (menu_bar_base, false, false);