another replacement of ActionManager::get_action() by ActionMap::find_action()
This commit is contained in:
parent
4423945643
commit
2eae3b5cd1
|
@ -129,7 +129,7 @@ ARDOUR_UI::toggle_click ()
|
|||
void
|
||||
ARDOUR_UI::toggle_session_monitoring_in ()
|
||||
{
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("SessionMonitorIn"));
|
||||
Glib::RefPtr<Action> act = global_actions.find_action (X_("Transport"), X_("SessionMonitorIn"));
|
||||
if (!act) {
|
||||
return;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ ARDOUR_UI::toggle_session_monitoring_in ()
|
|||
void
|
||||
ARDOUR_UI::toggle_session_monitoring_disk ()
|
||||
{
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("SessionMonitorDisk"));
|
||||
Glib::RefPtr<Action> act = global_actions.find_action (X_("Transport"), X_("SessionMonitorDisk"));
|
||||
if (!act) {
|
||||
return;
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ ARDOUR_UI::toggle_session_monitoring_disk ()
|
|||
void
|
||||
ARDOUR_UI::unset_dual_punch ()
|
||||
{
|
||||
Glib::RefPtr<Action> action = ActionManager::get_action ("Transport", "TogglePunch");
|
||||
Glib::RefPtr<Action> action = global_actions.find_action ("Transport", "TogglePunch");
|
||||
|
||||
if (action) {
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(action);
|
||||
|
@ -199,7 +199,7 @@ ARDOUR_UI::toggle_punch ()
|
|||
return;
|
||||
}
|
||||
|
||||
Glib::RefPtr<Action> action = ActionManager::get_action ("Transport", "TogglePunch");
|
||||
Glib::RefPtr<Action> action = global_actions.find_action ("Transport", "TogglePunch");
|
||||
|
||||
if (action) {
|
||||
|
||||
|
@ -211,8 +211,8 @@ ARDOUR_UI::toggle_punch ()
|
|||
|
||||
/* drive the other two actions from this one */
|
||||
|
||||
Glib::RefPtr<Action> in_action = ActionManager::get_action ("Transport", "TogglePunchIn");
|
||||
Glib::RefPtr<Action> out_action = ActionManager::get_action ("Transport", "TogglePunchOut");
|
||||
Glib::RefPtr<Action> in_action = global_actions.find_action ("Transport", "TogglePunchIn");
|
||||
Glib::RefPtr<Action> out_action = global_actions.find_action ("Transport", "TogglePunchOut");
|
||||
|
||||
if (in_action && out_action) {
|
||||
Glib::RefPtr<ToggleAction> tiact = Glib::RefPtr<ToggleAction>::cast_dynamic(in_action);
|
||||
|
@ -226,7 +226,7 @@ ARDOUR_UI::toggle_punch ()
|
|||
void
|
||||
ARDOUR_UI::toggle_punch_in ()
|
||||
{
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("TogglePunchIn"));
|
||||
Glib::RefPtr<Action> act = global_actions.find_action (X_("Transport"), X_("TogglePunchIn"));
|
||||
if (!act) {
|
||||
return;
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ ARDOUR_UI::toggle_punch_in ()
|
|||
void
|
||||
ARDOUR_UI::toggle_punch_out ()
|
||||
{
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("TogglePunchOut"));
|
||||
Glib::RefPtr<Action> act = global_actions.find_action (X_("Transport"), X_("TogglePunchOut"));
|
||||
if (!act) {
|
||||
return;
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ ARDOUR_UI::toggle_punch_out ()
|
|||
void
|
||||
ARDOUR_UI::show_loop_punch_ruler_and_disallow_hide ()
|
||||
{
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Rulers"), "toggle-loop-punch-ruler");
|
||||
Glib::RefPtr<Action> act = editor->find_action (X_("Rulers"), "toggle-loop-punch-ruler");
|
||||
if (!act) {
|
||||
return;
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ ARDOUR_UI::reenable_hide_loop_punch_ruler_if_appropriate ()
|
|||
{
|
||||
if (!_session->config.get_punch_in() && !_session->config.get_punch_out()) {
|
||||
/* if punch in/out are now both off, reallow hiding of the loop/punch ruler */
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Rulers"), "toggle-loop-punch-ruler");
|
||||
Glib::RefPtr<Action> act = editor->find_action (X_("Rulers"), "toggle-loop-punch-ruler");
|
||||
if (act) {
|
||||
act->set_sensitive (true);
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ ARDOUR_UI::reenable_hide_loop_punch_ruler_if_appropriate ()
|
|||
void
|
||||
ARDOUR_UI::toggle_video_sync()
|
||||
{
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action ("Transport", "ToggleVideoSync");
|
||||
Glib::RefPtr<Action> act = global_actions.find_action ("Transport", "ToggleVideoSync");
|
||||
if (act) {
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
_session->config.set_use_video_sync (tact->get_active());
|
||||
|
@ -321,7 +321,7 @@ ARDOUR_UI::toggle_video_sync()
|
|||
void
|
||||
ARDOUR_UI::toggle_editing_space()
|
||||
{
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalEditor");
|
||||
Glib::RefPtr<Action> act = global_actions.find_action ("Common", "ToggleMaximalEditor");
|
||||
|
||||
if (act) {
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
|
@ -352,14 +352,14 @@ ARDOUR_UI::parameter_changed (std::string p)
|
|||
|
||||
if (!_session->config.get_external_sync()) {
|
||||
sync_button.set_text (S_("SyncSource|Int."));
|
||||
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
|
||||
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
|
||||
ActionManager::get_action ("Transport", "ToggleFollowEdits")->set_sensitive (true);
|
||||
global_actions.find_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
|
||||
global_actions.find_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
|
||||
global_actions.find_action ("Transport", "ToggleFollowEdits")->set_sensitive (true);
|
||||
} else {
|
||||
/* XXX we need to make sure that auto-play is off as well as insensitive */
|
||||
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
|
||||
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
|
||||
ActionManager::get_action ("Transport", "ToggleFollowEdits")->set_sensitive (false);
|
||||
global_actions.find_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
|
||||
global_actions.find_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
|
||||
global_actions.find_action ("Transport", "ToggleFollowEdits")->set_sensitive (false);
|
||||
}
|
||||
|
||||
} else if (p == "sync-source") {
|
||||
|
@ -398,8 +398,8 @@ ARDOUR_UI::parameter_changed (std::string p)
|
|||
} else if (p == "auto-input") {
|
||||
ActionManager::map_some_state ("Transport", "ToggleAutoInput", sigc::mem_fun (_session->config, &SessionConfiguration::get_auto_input));
|
||||
} else if (p == "session-monitoring") {
|
||||
Glib::RefPtr<Action> iact = ActionManager::get_action (X_("Transport"), X_("SessionMonitorIn"));
|
||||
Glib::RefPtr<Action> dact = ActionManager::get_action (X_("Transport"), X_("SessionMonitorDisk"));
|
||||
Glib::RefPtr<Action> iact = global_actions.find_action (X_("Transport"), X_("SessionMonitorIn"));
|
||||
Glib::RefPtr<Action> dact = global_actions.find_action (X_("Transport"), X_("SessionMonitorDisk"));
|
||||
if (iact && dact) {
|
||||
Glib::RefPtr<ToggleAction> tdact = Glib::RefPtr<ToggleAction>::cast_dynamic(dact);
|
||||
Glib::RefPtr<ToggleAction> tiact = Glib::RefPtr<ToggleAction>::cast_dynamic(iact);
|
||||
|
@ -577,7 +577,7 @@ ARDOUR_UI::reset_main_clocks ()
|
|||
void
|
||||
ARDOUR_UI::synchronize_sync_source_and_video_pullup ()
|
||||
{
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Transport"), X_("ToggleExternalSync"));
|
||||
Glib::RefPtr<Action> act = global_actions.find_action (X_("Transport"), X_("ToggleExternalSync"));
|
||||
|
||||
if (!act) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user