start work on auto return target dropdown rather than button
Conflicts: gtk2_ardour/ardour_ui.cc
This commit is contained in:
parent
6c8e11d3f8
commit
eb791b7302
|
@ -205,7 +205,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir, UIConfi
|
|||
, auto_loop_controllable (new TransportControllable ("transport auto loop", *this, TransportControllable::AutoLoop))
|
||||
, play_selection_controllable (new TransportControllable ("transport play selection", *this, TransportControllable::PlaySelection))
|
||||
, rec_controllable (new TransportControllable ("transport rec-enable", *this, TransportControllable::RecordEnable))
|
||||
, auto_return_button (ArdourButton::led_default_elements)
|
||||
, follow_edits_button (ArdourButton::led_default_elements)
|
||||
, auto_input_button (ArdourButton::led_default_elements)
|
||||
, auditioning_alert_button (_("Audition"))
|
||||
|
@ -4789,16 +4788,16 @@ ARDOUR_UI::transport_numpad_event (int num)
|
|||
_pending_locate_num = _pending_locate_num*10 + num;
|
||||
} else {
|
||||
switch (num) {
|
||||
case 0: toggle_roll(false, false); break;
|
||||
case 1: transport_rewind(1); break;
|
||||
case 2: transport_forward(1); break;
|
||||
case 3: transport_record(true); break;
|
||||
case 4: toggle_session_auto_loop(); break;
|
||||
case 5: transport_record(false); toggle_session_auto_loop(); break;
|
||||
case 6: toggle_punch(); break;
|
||||
case 7: toggle_click(); break;
|
||||
case 8: toggle_auto_return(); break;
|
||||
case 9: toggle_follow_edits(); break;
|
||||
case 0: toggle_roll(false, false); break;
|
||||
case 1: transport_rewind(1); break;
|
||||
case 2: transport_forward(1); break;
|
||||
case 3: transport_record(true); break;
|
||||
case 4: toggle_session_auto_loop(); break;
|
||||
case 5: transport_record(false); toggle_session_auto_loop(); break;
|
||||
case 6: toggle_punch(); break;
|
||||
case 7: toggle_click(); break;
|
||||
case 8: toggle_all_auto_return (); break;
|
||||
case 9: toggle_follow_edits(); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4871,3 +4870,29 @@ ARDOUR_UI::hide_application ()
|
|||
{
|
||||
Application::instance ()-> hide ();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_auto_return_state (AutoReturnTarget t)
|
||||
{
|
||||
AutoReturnTarget art = Config->get_auto_return_target_list ();
|
||||
if (art & t) {
|
||||
Config->set_auto_return_target_list (AutoReturnTarget (art & ~t));
|
||||
} else {
|
||||
Config->set_auto_return_target_list (AutoReturnTarget (art | t));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_all_auto_return ()
|
||||
{
|
||||
AutoReturnTarget art = Config->get_auto_return_target_list ();
|
||||
if (art) {
|
||||
Config->set_auto_return_target_list (AutoReturnTarget (0));
|
||||
} else {
|
||||
Config->set_auto_return_target_list (AutoReturnTarget (LastLocate|
|
||||
RangeSelectionStart|
|
||||
RegionSelectionStart|
|
||||
Loop));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
#include "about.h"
|
||||
#include "ardour_button.h"
|
||||
#include "ardour_dialog.h"
|
||||
#include "ardour_dropdown.h"
|
||||
#include "ardour_window.h"
|
||||
#include "editing.h"
|
||||
#include "engine_dialog.h"
|
||||
|
@ -322,7 +323,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void toggle_punch_out ();
|
||||
void show_loop_punch_ruler_and_disallow_hide ();
|
||||
void reenable_hide_loop_punch_ruler_if_appropriate ();
|
||||
void toggle_auto_return ();
|
||||
void toggle_click ();
|
||||
void toggle_audio_midi_setup ();
|
||||
void toggle_session_auto_loop ();
|
||||
|
@ -453,7 +453,16 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
|
||||
ShuttleControl* shuttle_box;
|
||||
|
||||
ArdourButton auto_return_button;
|
||||
ArdourDropdown auto_return_dropdown;
|
||||
Gtk::CheckMenuItem *auto_return_last_locate;
|
||||
Gtk::CheckMenuItem *auto_return_range_selection;
|
||||
Gtk::CheckMenuItem *auto_return_region_selection;
|
||||
Gtk::CheckMenuItem *auto_return_loop;
|
||||
Gtk::MenuItem *auto_return_toggle;
|
||||
|
||||
void toggle_auto_return_state (ARDOUR::AutoReturnTarget);
|
||||
void toggle_all_auto_return ();
|
||||
|
||||
ArdourButton follow_edits_button;
|
||||
ArdourButton auto_input_button;
|
||||
ArdourButton click_button;
|
||||
|
|
|
@ -133,7 +133,6 @@ ARDOUR_UI::setup_tooltips ()
|
|||
set_tip (goto_end_button, _("Go to end of session"));
|
||||
set_tip (auto_loop_button, _("Play loop range"));
|
||||
set_tip (midi_panic_button, _("MIDI Panic\nSend note off and reset controller messages on all MIDI channels"));
|
||||
set_tip (auto_return_button, _("Return to last playback start when stopped"));
|
||||
set_tip (follow_edits_button, _("Playhead follows Range Selections and Edits"));
|
||||
set_tip (auto_input_button, _("Be sensible about input monitoring"));
|
||||
set_tip (click_button, _("Enable/Disable audio click"));
|
||||
|
@ -252,7 +251,19 @@ ARDOUR_UI::setup_transport ()
|
|||
transport_tearoff->Visible.connect (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::reattach_tearoff), static_cast<Box*> (&top_packer),
|
||||
static_cast<Widget*> (&transport_frame), 1));
|
||||
|
||||
auto_return_button.set_text(_("Auto Return"));
|
||||
/* build auto-return dropdown */
|
||||
|
||||
auto_return_dropdown.set_text (_("Auto Return"));
|
||||
|
||||
auto_return_last_locate = manage (new CheckMenuItem (_("Play from last roll")));
|
||||
auto_return_last_locate->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::toggle_auto_return_state), LastLocate));
|
||||
auto_return_last_locate->show ();
|
||||
auto_return_dropdown.AddMenuElem (Gtk::Menu_Helpers::CheckMenuElem (*auto_return_last_locate));
|
||||
|
||||
auto_return_region_selection = manage (new CheckMenuItem (_("Play from region selection")));
|
||||
auto_return_region_selection->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::toggle_auto_return_state), RegionSelectionStart));
|
||||
auto_return_region_selection->show ();
|
||||
auto_return_dropdown.AddMenuElem (Gtk::Menu_Helpers::CheckMenuElem (*auto_return_region_selection));
|
||||
|
||||
follow_edits_button.set_text(_("Follow Edits"));
|
||||
|
||||
|
@ -264,7 +275,6 @@ ARDOUR_UI::setup_transport ()
|
|||
click_button.set_related_action (act);
|
||||
click_button.signal_button_press_event().connect (sigc::mem_fun (*this, &ARDOUR_UI::click_button_clicked), false);
|
||||
|
||||
auto_return_button.set_name ("transport option button");
|
||||
follow_edits_button.set_name ("transport option button");
|
||||
auto_input_button.set_name ("transport option button");
|
||||
|
||||
|
@ -312,8 +322,6 @@ ARDOUR_UI::setup_transport ()
|
|||
secondary_clock->ValueChanged.connect (sigc::mem_fun(*this, &ARDOUR_UI::secondary_clock_value_changed));
|
||||
big_clock->ValueChanged.connect (sigc::mem_fun(*this, &ARDOUR_UI::big_clock_value_changed));
|
||||
|
||||
act = ActionManager::get_action ("Transport", "ToggleAutoReturn");
|
||||
auto_return_button.set_related_action (act);
|
||||
act = ActionManager::get_action (X_("Transport"), X_("ToggleFollowEdits"));
|
||||
follow_edits_button.set_related_action (act);
|
||||
act = ActionManager::get_action ("Transport", "ToggleAutoInput");
|
||||
|
@ -438,7 +446,7 @@ ARDOUR_UI::setup_transport ()
|
|||
auto_box->pack_start (sync_button, true, true);
|
||||
if (!ARDOUR::Profile->get_trx()) {
|
||||
auto_box->pack_start (follow_edits_button, true, true);
|
||||
auto_box->pack_start (auto_return_button, true, true);
|
||||
auto_box->pack_start (auto_return_dropdown, true, true);
|
||||
}
|
||||
|
||||
if (!ARDOUR::Profile->get_trx()) {
|
||||
|
|
|
@ -405,7 +405,7 @@ if (Profile->get_mixbus())
|
|||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleAutoPlay"), _("Auto Play"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_auto_play));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleAutoReturn"), _("Auto Return"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_auto_return));
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleAutoReturn"), _("Auto Return"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_all_auto_return));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleFollowEdits"), _("Follow Edits"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_follow_edits));
|
||||
|
|
|
@ -130,12 +130,6 @@ ARDOUR_UI::toggle_auto_play ()
|
|||
ActionManager::toggle_config_state_foo ("Transport", "ToggleAutoPlay", sigc::mem_fun (_session->config, &SessionConfiguration::set_auto_play), sigc::mem_fun (_session->config, &SessionConfiguration::get_auto_play));
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_auto_return ()
|
||||
{
|
||||
ActionManager::toggle_config_state_foo ("Transport", "ToggleAutoReturn", sigc::mem_fun (_session->config, &SessionConfiguration::set_auto_return), sigc::mem_fun (_session->config, &SessionConfiguration::get_auto_return));
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_click ()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user