-void
-Editor::smpte_fps_chosen (SmpteFormat format)
-{
- /* this is driven by a toggle on a radio group, and so is invoked twice,
- once for the item that became inactive and once for the one that became
- active.
- */
-
- if (session) {
-
- RefPtr<Action> act;
-
- switch (format) {
- case smpte_23976:
- act = ActionManager::get_action (X_("Editor"), X_("Smpte23976"));
- break;
- case smpte_24:
- act = ActionManager::get_action (X_("Editor"), X_("Smpte24"));
- break;
- case smpte_24976:
- act = ActionManager::get_action (X_("Editor"), X_("Smpte24976"));
- break;
- case smpte_25:
- act = ActionManager::get_action (X_("Editor"), X_("Smpte25"));
- break;
- case smpte_2997:
- act = ActionManager::get_action (X_("Editor"), X_("Smpte2997"));
- break;
- case smpte_2997drop:
- act = ActionManager::get_action (X_("Editor"), X_("Smpte2997drop"));
- break;
- case smpte_30:
- act = ActionManager::get_action (X_("Editor"), X_("Smpte30"));
- break;
- case smpte_30drop:
- act = ActionManager::get_action (X_("Editor"), X_("Smpte30drop"));
- break;
- case smpte_5994:
- act = ActionManager::get_action (X_("Editor"), X_("Smpte5994"));
- break;
- case smpte_60:
- act = ActionManager::get_action (X_("Editor"), X_("Smpte60"));
- break;
- default:
- cerr << "Editor received unexpected smpte type" << endl;
- }
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && ract->get_active()) {
- session->set_smpte_format (format);
- }
- }
- }
-}
-
-void
-Editor::video_pullup_chosen (Session::PullupFormat pullup)
-{
- /* this is driven by a toggle on a radio group, and so is invoked twice,
- once for the item that became inactive and once for the one that became
- active.
- */
-
- const char* action = 0;
-
- RefPtr<Action> act;
-
- float pull = 0.0;
-
- switch (pullup) {
- case Session::pullup_Plus4Plus1:
- pull = 4.1667 + 0.1;
- action = X_("PullupPlus4Plus1");
- break;
- case Session::pullup_Plus4:
- pull = 4.1667;
- action = X_("PullupPlus4");
- break;
- case Session::pullup_Plus4Minus1:
- pull = 4.1667 - 0.1;
- action = X_("PullupPlus4Minus1");
- break;
- case Session::pullup_Plus1:
- pull = 0.1;
- action = X_("PullupPlus1");
- break;
- case Session::pullup_None:
- pull = 0.0;
- action = X_("PullupNone");
- break;
- case Session::pullup_Minus1:
- pull = -0.1;
- action = X_("PullupMinus1");
- break;
- case Session::pullup_Minus4Plus1:
- pull = -4.1667 + 0.1;
- action = X_("PullupMinus4Plus1");
- break;
- case Session::pullup_Minus4:
- pull = -4.1667;
- action = X_("PullupMinus4");
- break;
- case Session::pullup_Minus4Minus1:
- pull = -4.1667 - 0.1;
- action = X_("PullupMinus4Minus1");
- break;
- default:
- fatal << string_compose (_("programming error: %1"), "Session received unexpected pullup type") << endmsg;
- /*NOTREACHED*/
- }
-
- act = ActionManager::get_action (X_("Editor"), action);
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && ract->get_active()) {
- Config->set_video_pullup ( pull );
- }
-
- } else {
- error << string_compose (_("programming error: %1"), "Editor::video_pullup_chosen could not find action to match pullup.") << endmsg;
- }
-}
-
-void
-Editor::update_subframes_per_frame ()
-{
- ENSURE_GUI_THREAD (mem_fun(*this, &Editor::update_subframes_per_frame));
-
- RefPtr<Action> act;
- const char* action = 0;
-
- uint32_t sfpf = Config->get_subframes_per_frame();
-
- if (sfpf == 80) {
- action = X_("Subframes80");
- } else if (sfpf == 100) {
- action = X_("Subframes100");
- } else {
- warning << string_compose (_("Configuraton is using unhandled subframes per frame value: %1"), sfpf) << endmsg;
- /*NOTREACHED*/
- return;
- }
-
- act = ActionManager::get_action (X_("Editor"), action);
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && !ract->get_active()) {
- ract->set_active (true);
- }
- }
-}
-
-void
-Editor::subframes_per_frame_chosen (uint32_t sfpf)
-{
- /* this is driven by a toggle on a radio group, and so is invoked twice,
- once for the item that became inactive and once for the one that became
- active.
- */
-
- const char* action = 0;
-
- RefPtr<Action> act;
-
- if (sfpf == 80) {
- action = X_("Subframes80");
- } else if (sfpf == 100) {
- action = X_("Subframes100");
- } else {
- fatal << string_compose (_("programming error: %1 %2"), "Session received unexpected subframes per frame value: ", sfpf) << endmsg;
- /*NOTREACHED*/
- }
-
- act = ActionManager::get_action (X_("Editor"), action);
-
- if (act) {
- RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
- if (ract && ract->get_active()) {
- Config->set_subframes_per_frame ((uint32_t) rint (sfpf));
- }
-
- } else {
- error << string_compose (_("programming error: %1"), "Editor::subframes_per_frame_chosen could not find action to match value.") << endmsg;
- }
-}
-
-void
-Editor::toggle_region_fades ()
-{
- ActionManager::toggle_config_state ("Editor", "toggle-region-fades", &Configuration::set_use_region_fades, &Configuration::get_use_region_fades);
-}
-
-void
-Editor::toggle_region_fades_visible ()
-{
- ActionManager::toggle_config_state ("Editor", "toggle-region-fades-visible", &Configuration::set_show_region_fades, &Configuration::get_show_region_fades);
-}
-
-void
-Editor::toggle_auto_xfade ()
-{
- ActionManager::toggle_config_state ("Editor", "toggle-auto-xfades", &Configuration::set_auto_xfade, &Configuration::get_auto_xfade);
-}
-
-void
-Editor::toggle_xfades_active ()
-{
- ActionManager::toggle_config_state ("Editor", "toggle-xfades-active", &Configuration::set_xfades_active, &Configuration::get_xfades_active);
-}
-
-void
-Editor::toggle_xfade_visibility ()
-{
- ActionManager::toggle_config_state ("Editor", "toggle-xfades-visible", &Configuration::set_xfades_visible, &Configuration::get_xfades_visible);
-}
-
-void
-Editor::toggle_link_region_and_track_selection ()
-{
- ActionManager::toggle_config_state ("Editor", "link-region-and-track-selection", &Configuration::set_link_region_and_track_selection, &Configuration::get_link_region_and_track_selection);
-}
-