+void
+Editor::toggle_logo_visibility ()
+{
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleLogoVisibility"));
+
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ if (logo_item) {
+ if (tact->get_active()) {
+ logo_item->show ();
+ } else {
+ logo_item->hide ();
+ }
+ }
+ }
+}
+
+void
+Editor::set_crossfade_model (CrossfadeModel model)
+{
+ RefPtr<Action> act;
+
+ /* 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.
+ */
+
+ switch (model) {
+ case FullCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
+ break;
+ case ShortCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
+ break;
+ }
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active()) {
+ Config->set_xfade_model (model);
+ }
+ }
+}
+
+void
+Editor::update_crossfade_model ()
+{
+ RefPtr<Action> act;
+
+ switch (Config->get_xfade_model()) {
+ case FullCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
+ break;
+ case ShortCrossfade:
+ act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
+ break;
+ }
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
+ }
+}
+
+
+void
+Editor::update_smpte_mode ()
+{
+ ENSURE_GUI_THREAD(mem_fun(*this, &Editor::update_smpte_mode));
+
+ RefPtr<Action> act;
+ const char* action = 0;
+
+ switch (Config->get_smpte_format()) {
+ case smpte_23976:
+ action = X_("Smpte23976");
+ break;
+ case smpte_24:
+ action = X_("Smpte24");
+ break;
+ case smpte_24976:
+ action = X_("Smpte24976");
+ break;
+ case smpte_25:
+ action = X_("Smpte25");
+ break;
+ case smpte_2997:
+ action = X_("Smpte2997");
+ break;
+ case smpte_2997drop:
+ action = X_("Smpte2997drop");
+ break;
+ case smpte_30:
+ action = X_("Smpte30");
+ break;
+ case smpte_30drop:
+ action = X_("Smpte30drop");
+ break;
+ case smpte_5994:
+ action = X_("Smpte5994");
+ break;
+ case smpte_60:
+ action = X_("Smpte60");
+ break;
+ }
+
+ 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::update_video_pullup ()
+{
+ ENSURE_GUI_THREAD (mem_fun(*this, &Editor::update_video_pullup));
+
+ RefPtr<Action> act;
+ const char* action = 0;
+
+ float pullup = Config->get_video_pullup();
+
+ if ( pullup < (-4.1667 - 0.1) * 0.99) {
+ action = X_("PullupMinus4Minus1");
+ } else if ( pullup < (-4.1667) * 0.99 ) {
+ action = X_("PullupMinus4");
+ } else if ( pullup < (-4.1667 + 0.1) * 0.99 ) {
+ action = X_("PullupMinus4Plus1");
+ } else if ( pullup < (-0.1) * 0.99 ) {
+ action = X_("PullupMinus1");
+ } else if (pullup > (4.1667 + 0.1) * 0.99 ) {
+ action = X_("PullupPlus4Plus1");
+ } else if ( pullup > (4.1667) * 0.99 ) {
+ action = X_("PullupPlus4");
+ } else if ( pullup > (4.1667 - 0.1) * 0.99) {
+ action = X_("PullupPlus4Minus1");
+ } else if ( pullup > (0.1) * 0.99 ) {
+ action = X_("PullupPlus1");
+ } else {
+ action = X_("PullupNone");
+ }
+
+ 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::update_layering_model ()
+{
+ RefPtr<Action> act;
+
+ switch (Config->get_layer_model()) {
+ case LaterHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
+ break;
+ case MoveAddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
+ break;
+ case AddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
+ break;
+ }
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && !ract->get_active()) {
+ ract->set_active (true);
+ }
+ }
+}
+
+void
+Editor::set_layer_model (LayerModel model)
+{
+ /* 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.
+ */
+
+ RefPtr<Action> act;
+
+ switch (model) {
+ case LaterHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
+ break;
+ case MoveAddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
+ break;
+ case AddHigher:
+ act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
+ break;
+ }
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ if (ract && ract->get_active() && Config->get_layer_model() != model) {
+ Config->set_layer_model (model);
+ }
+ }
+}
+
+RefPtr<RadioAction>
+Editor::snap_type_action (SnapType type)
+{
+
+ const char* action = 0;
+ RefPtr<Action> act;
+
+ switch (type) {
+ case Editing::SnapToCDFrame:
+ action = "snap-to-cd-frame";
+ break;
+ case Editing::SnapToSMPTEFrame:
+ action = "snap-to-smpte-frame";
+ break;
+ case Editing::SnapToSMPTESeconds:
+ action = "snap-to-smpte-seconds";
+ break;
+ case Editing::SnapToSMPTEMinutes:
+ action = "snap-to-smpte-minutes";
+ break;
+ case Editing::SnapToSeconds:
+ action = "snap-to-seconds";
+ break;
+ case Editing::SnapToMinutes:
+ action = "snap-to-minutes";
+ break;
+ case Editing::SnapToAThirtysecondBeat:
+ action = "snap-to-thirtyseconds";
+ break;
+ case Editing::SnapToASixteenthBeat:
+ action = "snap-to-asixteenthbeat";
+ break;
+ case Editing::SnapToAEighthBeat:
+ action = "snap-to-eighths";
+ break;
+ case Editing::SnapToAQuarterBeat:
+ action = "snap-to-quarters";
+ break;
+ case Editing::SnapToAThirdBeat:
+ action = "snap-to-thirds";
+ break;
+ case Editing::SnapToBeat:
+ action = "snap-to-beat";
+ break;
+ case Editing::SnapToBar:
+ action = "snap-to-bar";
+ break;
+ case Editing::SnapToMark:
+ action = "snap-to-mark";
+ break;
+ case Editing::SnapToRegionStart:
+ action = "snap-to-region-start";
+ break;
+ case Editing::SnapToRegionEnd:
+ action = "snap-to-region-end";
+ break;
+ case Editing::SnapToRegionSync:
+ action = "snap-to-region-sync";
+ break;
+ case Editing::SnapToRegionBoundary:
+ action = "snap-to-region-boundary";
+ break;
+ default:
+ fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible snap-to type", (int) type) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ act = ActionManager::get_action (X_("Snap"), action);
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ return ract;
+
+ } else {
+ error << string_compose (_("programming error: %1"), "Editor::snap_type_chosen could not find action to match type.") << endmsg;
+ return RefPtr<RadioAction>();
+ }
+}
+
+void
+Editor::cycle_snap_choice()
+{
+ switch (snap_type) {
+ case Editing::SnapToCDFrame:
+ set_snap_to (Editing::SnapToSMPTEFrame);
+ break;
+ case Editing::SnapToSMPTEFrame:
+ set_snap_to (Editing::SnapToSMPTESeconds);
+ break;
+ case Editing::SnapToSMPTESeconds:
+ set_snap_to (Editing::SnapToSMPTEMinutes);
+ break;
+ case Editing::SnapToSMPTEMinutes:
+ set_snap_to (Editing::SnapToSeconds);
+ break;
+ case Editing::SnapToSeconds:
+ set_snap_to (Editing::SnapToMinutes);
+ break;
+ case Editing::SnapToMinutes:
+ set_snap_to (Editing::SnapToAThirtysecondBeat);
+ break;
+ case Editing::SnapToAThirtysecondBeat:
+ set_snap_to (Editing::SnapToASixteenthBeat);
+ break;
+ case Editing::SnapToASixteenthBeat:
+ set_snap_to (Editing::SnapToAEighthBeat);
+ break;
+ case Editing::SnapToAEighthBeat:
+ set_snap_to (Editing::SnapToAQuarterBeat);
+ break;
+ case Editing::SnapToAQuarterBeat:
+ set_snap_to (Editing::SnapToAThirdBeat);
+ break;
+ case Editing::SnapToAThirdBeat:
+ set_snap_to (Editing::SnapToBeat);
+ break;
+ case Editing::SnapToBeat:
+ set_snap_to (Editing::SnapToBar);
+ break;
+ case Editing::SnapToBar:
+ set_snap_to (Editing::SnapToMark);
+ break;
+ case Editing::SnapToMark:
+ set_snap_to (Editing::SnapToRegionStart);
+ break;
+ case Editing::SnapToRegionStart:
+ set_snap_to (Editing::SnapToRegionEnd);
+ break;
+ case Editing::SnapToRegionEnd:
+ set_snap_to (Editing::SnapToRegionSync);
+ break;
+ case Editing::SnapToRegionSync:
+ set_snap_to (Editing::SnapToRegionBoundary);
+ break;
+ case Editing::SnapToRegionBoundary:
+ set_snap_to (Editing::SnapToCDFrame);
+ break;
+ }
+}
+
+void
+Editor::snap_type_chosen (SnapType type)
+{
+ /* 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.
+ */
+
+ RefPtr<RadioAction> ract = snap_type_action (type);
+
+ if (ract && ract->get_active()) {
+ set_snap_to (type);
+ }
+}
+
+RefPtr<RadioAction>
+Editor::snap_mode_action (SnapMode mode)
+{
+ const char* action = 0;
+ RefPtr<Action> act;
+
+ switch (mode) {
+ case Editing::SnapOff:
+ action = X_("snap-off");
+ break;
+ case Editing::SnapNormal:
+ action = X_("snap-normal");
+ break;
+ case Editing::SnapMagnetic:
+ action = X_("snap-magnetic");
+ break;
+ default:
+ fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible snap mode type", (int) mode) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ act = ActionManager::get_action (X_("Editor"), action);
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ return ract;
+
+ } else {
+ error << string_compose (_("programming error: %1: %2"), "Editor::snap_mode_chosen could not find action to match mode.", action) << endmsg;
+ return RefPtr<RadioAction> ();
+ }
+}
+
+void
+Editor::cycle_snap_mode ()
+{
+ switch (snap_mode) {
+ case SnapOff:
+ set_snap_mode (SnapNormal);
+ break;
+ case SnapNormal:
+ set_snap_mode (SnapMagnetic);
+ break;
+ case SnapMagnetic:
+ set_snap_mode (SnapOff);
+ break;
+ }
+}
+
+void
+Editor::snap_mode_chosen (SnapMode mode)
+{
+ /* 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.
+ */
+
+ RefPtr<RadioAction> ract = snap_mode_action (mode);
+
+ if (ract && ract->get_active()) {
+ set_snap_mode (mode);
+ }
+}
+
+RefPtr<RadioAction>
+Editor::edit_point_action (EditPoint ep)
+{
+ const char* action = 0;
+ RefPtr<Action> act;
+
+ switch (ep) {
+ case Editing::EditAtPlayhead:
+ action = X_("edit-at-playhead");
+ break;
+ case Editing::EditAtSelectedMarker:
+ action = X_("edit-at-selected-marker");
+ break;
+ case Editing::EditAtMouse:
+ action = X_("edit-at-mouse");
+ break;
+ default:
+ fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible edit point type", (int) ep) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ act = ActionManager::get_action (X_("Editor"), action);
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ return ract;
+
+ } else {
+ error << string_compose (_("programming error: %1: %2"), "Editor::edit_point_action could not find action to match edit point.", action) << endmsg;
+ return RefPtr<RadioAction> ();
+ }
+}
+
+void
+Editor::edit_point_chosen (EditPoint ep)
+{
+ /* 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.
+ */
+
+ RefPtr<RadioAction> ract = edit_point_action (ep);
+
+ if (ract && ract->get_active()) {
+ set_edit_point_preference (ep);
+ }
+}
+
+
+RefPtr<RadioAction>
+Editor::zoom_focus_action (ZoomFocus focus)
+{
+ const char* action = 0;
+ RefPtr<Action> act;
+
+ switch (focus) {
+ case ZoomFocusLeft:
+ action = X_("zoom-focus-left");
+ break;
+ case ZoomFocusRight:
+ action = X_("zoom-focus-right");
+ break;
+ case ZoomFocusCenter:
+ action = X_("zoom-focus-center");
+ break;
+ case ZoomFocusPlayhead:
+ action = X_("zoom-focus-playhead");
+ break;
+ case ZoomFocusMouse:
+ action = X_("zoom-focus-mouse");
+ break;
+ case ZoomFocusEdit:
+ action = X_("zoom-focus-edit");
+ break;
+ default:
+ fatal << string_compose (_("programming error: %1: %2"), "Editor: impossible focus type", (int) focus) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ act = ActionManager::get_action (X_("Zoom"), action);
+
+ if (act) {
+ RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
+ return ract;
+ } else {
+ error << string_compose (_("programming error: %1: %2"), "Editor::zoom_focus_action could not find action to match focus.", action) << endmsg;
+ }
+
+ return RefPtr<RadioAction> ();
+}
+
+void
+Editor::zoom_focus_chosen (ZoomFocus focus)
+{
+ /* 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.
+ */
+
+ RefPtr<RadioAction> ract = zoom_focus_action (focus);
+
+ if (ract && ract->get_active()) {
+ set_zoom_focus (focus);
+ }
+}
+
+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_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);
+}
+
+/** A Configuration parameter has changed.
+ * @param parameter_name Name of the changed parameter.
+ */
+void
+Editor::parameter_changed (const char* parameter_name)
+{
+#define PARAM_IS(x) (!strcmp (parameter_name, (x)))
+ //cerr << "Editor::parameter_changed: " << parameter_name << endl;
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::parameter_changed), parameter_name));
+
+ if (PARAM_IS ("auto-loop")) {
+ update_loop_range_view (true);
+ } else if (PARAM_IS ("punch-in")) {
+ update_punch_range_view (true);
+ } else if (PARAM_IS ("punch-out")) {
+ update_punch_range_view (true);
+ } else if (PARAM_IS ("layer-model")) {
+ update_layering_model ();
+ } else if (PARAM_IS ("smpte-format")) {
+ update_smpte_mode ();
+ update_just_smpte ();
+ } else if (PARAM_IS ("video-pullup")) {
+ update_video_pullup ();
+ } else if (PARAM_IS ("xfades-active")) {
+ ActionManager::map_some_state ("Editor", "toggle-xfades-active", &Configuration::get_xfades_active);
+ } else if (PARAM_IS ("xfades-visible")) {
+ ActionManager::map_some_state ("Editor", "toggle-xfades-visible", &Configuration::get_xfades_visible);
+ update_xfade_visibility ();
+ } else if (PARAM_IS ("auto-xfade")) {
+ ActionManager::map_some_state ("Editor", "toggle-auto-xfades", &Configuration::get_auto_xfade);
+ } else if (PARAM_IS ("xfade-model")) {
+ update_crossfade_model ();
+ } else if (PARAM_IS ("edit-mode")) {
+ edit_mode_selector.set_active_text (edit_mode_to_string (Config->get_edit_mode()));
+ } else if (PARAM_IS ("subframes-per-frame")) {
+ update_subframes_per_frame ();
+ update_just_smpte ();
+ } else if (PARAM_IS ("show-track-meters")) {
+ toggle_meter_updating();
+ } else if (PARAM_IS ("link-region-and-track-selection")) {
+ ActionManager::map_some_state ("Editor", "link-region-and-track-selection", &Configuration::get_link_region_and_track_selection);
+ }
+
+#undef PARAM_IS
+}
+
+void
+Editor::reset_focus ()
+{
+ track_canvas.grab_focus();
+}