1 #include <ardour/ardour.h>
14 using namespace ARDOUR;
16 using namespace Editing;
19 Editor::register_actions ()
23 editor_actions = ActionGroup::create (X_("Editor"));
25 /* non-operative menu items for menu bar */
27 ActionManager::register_action (editor_actions, X_("Edit"), _("Edit"));
28 ActionManager::register_action (editor_actions, X_("EditSelectRegionOptions"), _("Select regions"));
29 ActionManager::register_action (editor_actions, X_("EditSelectRangeOptions"), _("Select range operations"));
30 ActionManager::register_action (editor_actions, X_("EditCursorMovementOptions"), _("Move edit cursor"));
31 ActionManager::register_action (editor_actions, X_("RegionEditOps"), _("Region operations"));
32 ActionManager::register_action (editor_actions, X_("Tools"), _("Tools"));
33 ActionManager::register_action (editor_actions, X_("View"), _("View"));
34 ActionManager::register_action (editor_actions, X_("ZoomFocus"), _("ZoomFocus"));
35 ActionManager::register_action (editor_actions, X_("MeterHold"), _("Meter hold"));
36 ActionManager::register_action (editor_actions, X_("MeterFalloff"), _("Meter falloff"));
37 ActionManager::register_action (editor_actions, X_("Solo"), _("Solo"));
38 ActionManager::register_action (editor_actions, X_("Crossfades"), _("Crossfades"));
39 ActionManager::register_action (editor_actions, X_("Monitoring"), _("Monitoring"));
40 ActionManager::register_action (editor_actions, X_("Autoconnect"), _("Autoconnect"));
41 ActionManager::register_action (editor_actions, X_("Layering"), _("Layering"));
42 ActionManager::register_action (editor_actions, X_("SMPTE"), _("SMPTE fps"));
43 ActionManager::register_action (editor_actions, X_("Pullup"), _("Pullup / Pulldown"));
44 ActionManager::register_action (editor_actions, X_("Metering"), _("Metering"));
45 ActionManager::register_action (editor_actions, X_("MeteringFallOffRate"), _("Fall off rate"));
46 ActionManager::register_action (editor_actions, X_("MeteringHoldTime"), _("Hold Time"));
47 ActionManager::register_action (editor_actions, X_("addExistingAudioFiles"), _("Add Existing Audio"));
49 /* add named actions for the editor */
52 act = ActionManager::register_toggle_action (editor_actions, "show-editor-mixer", _("Show Editor Mixer"), mem_fun (*this, &Editor::editor_mixer_button_toggled));
53 ActionManager::session_sensitive_actions.push_back (act);
55 RadioAction::Group crossfade_model_group;
57 act = ActionManager::register_radio_action (editor_actions, crossfade_model_group, "CrossfadesFull", _("Span Entire Overlap"), bind (mem_fun(*this, &Editor::set_crossfade_model), FullCrossfade));
58 ActionManager::session_sensitive_actions.push_back (act);
59 act = ActionManager::register_radio_action (editor_actions, crossfade_model_group, "CrossfadesShort", _("Short"), bind (mem_fun(*this, &Editor::set_crossfade_model), ShortCrossfade));
60 ActionManager::session_sensitive_actions.push_back (act);
62 act = ActionManager::register_toggle_action (editor_actions, "toggle-xfades-active", _("Active"), mem_fun(*this, &Editor::toggle_xfades_active));
63 ActionManager::session_sensitive_actions.push_back (act);
64 act = ActionManager::register_toggle_action (editor_actions, "toggle-xfades-visible", _("Visible"), mem_fun(*this, &Editor::toggle_xfade_visibility));
65 ActionManager::session_sensitive_actions.push_back (act);
66 act = ActionManager::register_toggle_action (editor_actions, "toggle-auto-xfades", _("Created Automatically"), mem_fun(*this, &Editor::toggle_auto_xfade));
67 ActionManager::session_sensitive_actions.push_back (act);
69 act = ActionManager::register_action (editor_actions, "playhead-to-next-region-start", _("Playhead to Next Region Start"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (Start)));
70 ActionManager::session_sensitive_actions.push_back (act);
71 act = ActionManager::register_action (editor_actions, "playhead-to-next-region-end", _("Playhead to Next Region End"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (End)));
72 ActionManager::session_sensitive_actions.push_back (act);
73 act = ActionManager::register_action (editor_actions, "playhead-to-next-region-sync", _("Playhead to Next Region Sync"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (SyncPoint)));
74 ActionManager::session_sensitive_actions.push_back (act);
76 act = ActionManager::register_action (editor_actions, "playhead-to-previous-region-start", _("Playhead to Previous Region Start"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (Start)));
77 ActionManager::session_sensitive_actions.push_back (act);
78 act = ActionManager::register_action (editor_actions, "playhead-to-previous-region-end", _("Playhead to Previous Region End"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (End)));
79 ActionManager::session_sensitive_actions.push_back (act);
80 act = ActionManager::register_action (editor_actions, "playhead-to-previous-region-sync", _("Playhead to Previous Region Sync"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (SyncPoint)));
81 ActionManager::session_sensitive_actions.push_back (act);
83 act = ActionManager::register_action (editor_actions, "edit-cursor-to-next-region-start", _("Edit Cursor to Next Region Start"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (Start)));
84 ActionManager::session_sensitive_actions.push_back (act);
85 act = ActionManager::register_action (editor_actions, "edit-cursor-to-next-region-end", _("Edit Cursor to Next Region End"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (End)));
86 ActionManager::session_sensitive_actions.push_back (act);
87 act = ActionManager::register_action (editor_actions, "edit-cursor-to-next-region-sync", _("Edit Cursor to Next Region Sync"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (SyncPoint)));
88 ActionManager::session_sensitive_actions.push_back (act);
90 act = ActionManager::register_action (editor_actions, "edit-cursor-to-previous-region-start", _("Edit Cursor to Previous Region Start"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (Start)));
91 ActionManager::session_sensitive_actions.push_back (act);
92 act = ActionManager::register_action (editor_actions, "edit-cursor-to-previous-region-end", _("Edit Cursor to Previous Region End"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (End)));
93 ActionManager::session_sensitive_actions.push_back (act);
94 act = ActionManager::register_action (editor_actions, "edit-cursor-to-previous-region-sync", _("Edit Cursor to Previous Region Sync"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (SyncPoint)));
95 ActionManager::session_sensitive_actions.push_back (act);
97 act = ActionManager::register_action (editor_actions, "playhead-to-range-start", _("Playhead to Range Start"), bind (mem_fun(*this, &Editor::cursor_to_selection_start), playhead_cursor));
98 ActionManager::session_sensitive_actions.push_back (act);
99 act = ActionManager::register_action (editor_actions, "playhead-to-range-end", _("Playhead to Range End"), bind (mem_fun(*this, &Editor::cursor_to_selection_end), playhead_cursor));
100 ActionManager::session_sensitive_actions.push_back (act);
102 act = ActionManager::register_action (editor_actions, "edit-cursor-to-range-start", _("Edit Cursor to Range Start"), bind (mem_fun(*this, &Editor::cursor_to_selection_start), edit_cursor));
103 ActionManager::session_sensitive_actions.push_back (act);
104 act = ActionManager::register_action (editor_actions, "edit-cursor-to-range-end", _("Edit Cursor to Range End"), bind (mem_fun(*this, &Editor::cursor_to_selection_end), edit_cursor));
105 ActionManager::session_sensitive_actions.push_back (act);
107 act = ActionManager::register_action (editor_actions, "select-all", _("select all"), bind (mem_fun(*this, &Editor::select_all), Selection::Set));
108 ActionManager::session_sensitive_actions.push_back (act);
109 act = ActionManager::register_action (editor_actions, "select-all-after-edit-cursor", _("Select All After Edit Cursor"), bind (mem_fun(*this, &Editor::select_all_selectables_using_cursor), edit_cursor, true));
110 ActionManager::session_sensitive_actions.push_back (act);
111 act = ActionManager::register_action (editor_actions, "select-all-before-edit-cursor", _("Select All Before Edit Cursor"), bind (mem_fun(*this, &Editor::select_all_selectables_using_cursor), edit_cursor, false));
112 ActionManager::session_sensitive_actions.push_back (act);
114 act = ActionManager::register_action (editor_actions, "select-all-after-playhead", _("Select All After Playhead"), bind (mem_fun(*this, &Editor::select_all_selectables_using_cursor), playhead_cursor, true));
115 ActionManager::session_sensitive_actions.push_back (act);
116 act = ActionManager::register_action (editor_actions, "select-all-before-playhead", _("Select All Before Playhead"), bind (mem_fun(*this, &Editor::select_all_selectables_using_cursor), playhead_cursor, false));
117 ActionManager::session_sensitive_actions.push_back (act);
118 act = ActionManager::register_action (editor_actions, "select-all-between-cursors", _("Select All Between Cursors"), bind (mem_fun(*this, &Editor::select_all_selectables_between_cursors), playhead_cursor, edit_cursor));
119 ActionManager::session_sensitive_actions.push_back (act);
121 act = ActionManager::register_action (editor_actions, "select-all-in-punch-range", _("Select All in Punch Range"), mem_fun(*this, &Editor::select_all_selectables_using_punch));
122 ActionManager::session_sensitive_actions.push_back (act);
123 act = ActionManager::register_action (editor_actions, "select-all-in-loop-range", _("Select All in Loop Range"), mem_fun(*this, &Editor::select_all_selectables_using_loop));
124 ActionManager::session_sensitive_actions.push_back (act);
126 act = ActionManager::register_action (editor_actions, "jump-forward-to-mark", _("Jump Forward to Mark"), mem_fun(*this, &Editor::jump_forward_to_mark));
127 ActionManager::session_sensitive_actions.push_back (act);
128 act = ActionManager::register_action (editor_actions, "jump-backward-to-mark", _("Jump Backward to Mark"), mem_fun(*this, &Editor::jump_backward_to_mark));
129 ActionManager::session_sensitive_actions.push_back (act);
130 act = ActionManager::register_action (editor_actions, "add-location-from-playhead", _("Add Location from Playhead"), mem_fun(*this, &Editor::add_location_from_playhead_cursor));
131 ActionManager::session_sensitive_actions.push_back (act);
133 act = ActionManager::register_action (editor_actions, "nudge-forward", _("Nudge Forward"), bind (mem_fun(*this, &Editor::nudge_forward), false));
134 ActionManager::session_sensitive_actions.push_back (act);
135 act = ActionManager::register_action (editor_actions, "nudge-next-forward", _("Nudge Next Forward"), bind (mem_fun(*this, &Editor::nudge_forward), true));
136 ActionManager::session_sensitive_actions.push_back (act);
137 act = ActionManager::register_action (editor_actions, "nudge-backward", _("Nudge Backward"), bind (mem_fun(*this, &Editor::nudge_backward), false));
138 ActionManager::session_sensitive_actions.push_back (act);
139 act = ActionManager::register_action (editor_actions, "nudge-next-backward", _("Nudge Next Backward"), bind (mem_fun(*this, &Editor::nudge_backward), true));
140 ActionManager::session_sensitive_actions.push_back (act);
142 act = ActionManager::register_action (editor_actions, "temporal-zoom-out", _("Zoom Out"), bind (mem_fun(*this, &Editor::temporal_zoom_step), true));
143 ActionManager::session_sensitive_actions.push_back (act);
144 act = ActionManager::register_action (editor_actions, "temporal-zoom-in", _("Zoom In"), bind (mem_fun(*this, &Editor::temporal_zoom_step), false));
145 ActionManager::session_sensitive_actions.push_back (act);
146 act = ActionManager::register_action (editor_actions, "zoom-to-session", _("Zoom to Session"), mem_fun(*this, &Editor::temporal_zoom_session));
147 ActionManager::session_sensitive_actions.push_back (act);
149 act = ActionManager::register_action (editor_actions, "scroll-tracks-up", _("Scroll Tracks Up"), mem_fun(*this, &Editor::scroll_tracks_up));
150 ActionManager::session_sensitive_actions.push_back (act);
151 act = ActionManager::register_action (editor_actions, "scroll-tracks-down", _("Scroll Tracks Down"), mem_fun(*this, &Editor::scroll_tracks_down));
152 ActionManager::session_sensitive_actions.push_back (act);
153 act = ActionManager::register_action (editor_actions, "step-tracks-up", _("Step Tracks Up"), mem_fun(*this, &Editor::scroll_tracks_up_line));
154 ActionManager::session_sensitive_actions.push_back (act);
155 act = ActionManager::register_action (editor_actions, "step-tracks-down", _("Step Tracks Down"), mem_fun(*this, &Editor::scroll_tracks_down_line));
156 ActionManager::session_sensitive_actions.push_back (act);
158 act = ActionManager::register_action (editor_actions, "scroll-backward", _("Scroll Backward"), bind (mem_fun(*this, &Editor::scroll_backward), 0.8f));
159 ActionManager::session_sensitive_actions.push_back (act);
160 act = ActionManager::register_action (editor_actions, "scroll-forward", _("Scroll Forward"), bind (mem_fun(*this, &Editor::scroll_forward), 0.8f));
161 ActionManager::session_sensitive_actions.push_back (act);
162 act = ActionManager::register_action (editor_actions, "goto", _("goto"), mem_fun(*this, &Editor::goto_frame));
163 ActionManager::session_sensitive_actions.push_back (act);
164 act = ActionManager::register_action (editor_actions, "center-playhead", _("Center Playhead"), mem_fun(*this, &Editor::center_playhead));
165 ActionManager::session_sensitive_actions.push_back (act);
166 act = ActionManager::register_action (editor_actions, "center-edit-cursor", _("Center Edit Cursor"), mem_fun(*this, &Editor::center_edit_cursor));
167 ActionManager::session_sensitive_actions.push_back (act);
168 act = ActionManager::register_action (editor_actions, "playhead-forward", _("Playhead Forward"), mem_fun(*this, &Editor::playhead_forward));
169 ActionManager::session_sensitive_actions.push_back (act);
170 act = ActionManager::register_action (editor_actions, "playhead-backward", _("Playhead Backward"), mem_fun(*this, &Editor::playhead_backward));
171 ActionManager::session_sensitive_actions.push_back (act);
172 act = ActionManager::register_action (editor_actions, "playhead-to-edit", _("Playhead to Edit"), bind (mem_fun(*this, &Editor::cursor_align), true));
173 ActionManager::session_sensitive_actions.push_back (act);
174 act = ActionManager::register_action (editor_actions, "edit-to-playhead", _("Edit to Playhead"), bind (mem_fun(*this, &Editor::cursor_align), false));
175 ActionManager::session_sensitive_actions.push_back (act);
177 act = ActionManager::register_action (editor_actions, "align-regions-start", _("Align Regions Start"), bind (mem_fun(*this, &Editor::align), ARDOUR::Start));
178 ActionManager::session_sensitive_actions.push_back (act);
179 act = ActionManager::register_action (editor_actions, "align-regions-start-relative", _("Align Regions Start Relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::Start));
180 ActionManager::session_sensitive_actions.push_back (act);
181 act = ActionManager::register_action (editor_actions, "align-regions-end", _("Align Regions End"), bind (mem_fun(*this, &Editor::align), ARDOUR::End));
182 ActionManager::session_sensitive_actions.push_back (act);
183 act = ActionManager::register_action (editor_actions, "align-regions-end-relative", _("Align Regions End Relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::End));
184 ActionManager::session_sensitive_actions.push_back (act);
186 act = ActionManager::register_action (editor_actions, "align-regions-sync", _("Align Regions Sync"), bind (mem_fun(*this, &Editor::align), ARDOUR::SyncPoint));
187 ActionManager::session_sensitive_actions.push_back (act);
188 act = ActionManager::register_action (editor_actions, "align-regions-sync-relative", _("Align Regions Sync Relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::SyncPoint));
189 ActionManager::session_sensitive_actions.push_back (act);
191 act = ActionManager::register_action (editor_actions, "audition-at-mouse", _("Audition at Mouse"), mem_fun(*this, &Editor::kbd_audition));
192 ActionManager::session_sensitive_actions.push_back (act);
193 act = ActionManager::register_action (editor_actions, "brush-at-mouse", _("Brush at Mouse"), mem_fun(*this, &Editor::kbd_brush));
194 ActionManager::session_sensitive_actions.push_back (act);
195 act = ActionManager::register_action (editor_actions, "set-edit-cursor", _("Set Edit Cursor"), mem_fun(*this, &Editor::kbd_set_edit_cursor));
196 ActionManager::session_sensitive_actions.push_back (act);
197 act = ActionManager::register_action (editor_actions, "mute-unmute-region", _("Mute/Unmute Region"), mem_fun(*this, &Editor::kbd_mute_unmute_region));
198 ActionManager::session_sensitive_actions.push_back (act);
199 act = ActionManager::register_action (editor_actions, "set-playhead", _("Set Playhead"), mem_fun(*this, &Editor::kbd_set_playhead_cursor));
200 ActionManager::session_sensitive_actions.push_back (act);
201 act = ActionManager::register_action (editor_actions, "split-region", _("Split Region"), mem_fun(*this, &Editor::kbd_split));
202 ActionManager::session_sensitive_actions.push_back (act);
203 act = ActionManager::register_action (editor_actions, "set-region-sync-position", _("Set Region Sync Position"), mem_fun(*this, &Editor::kbd_set_sync_position));
204 ActionManager::session_sensitive_actions.push_back (act);
206 act = ActionManager::register_action (editor_actions, "undo", _("Undo"), bind (mem_fun(*this, &Editor::undo), 1U));
207 ActionManager::session_sensitive_actions.push_back (act);
208 act = ActionManager::register_action (editor_actions, "redo", _("Redo"), bind (mem_fun(*this, &Editor::redo), 1U));
209 ActionManager::session_sensitive_actions.push_back (act);
211 act = ActionManager::register_action (editor_actions, "export-session", _("Export Session"), mem_fun(*this, &Editor::export_session));
212 ActionManager::session_sensitive_actions.push_back (act);
213 act = ActionManager::register_action (editor_actions, "export-range", _("Export Range"), mem_fun(*this, &Editor::export_selection));
214 ActionManager::session_sensitive_actions.push_back (act);
216 act = ActionManager::register_action (editor_actions, "editor-cut", _("Cut"), mem_fun(*this, &Editor::cut));
217 ActionManager::session_sensitive_actions.push_back (act);
218 /* Note: for now, editor-delete does the exact same thing as editor-cut */
219 act = ActionManager::register_action (editor_actions, "editor-delete", _("Delete"), mem_fun(*this, &Editor::cut));
220 ActionManager::session_sensitive_actions.push_back (act);
221 act = ActionManager::register_action (editor_actions, "editor-copy", _("Copy"), mem_fun(*this, &Editor::copy));
222 ActionManager::session_sensitive_actions.push_back (act);
223 act = ActionManager::register_action (editor_actions, "editor-paste", _("Paste"), mem_fun(*this, &Editor::keyboard_paste));
224 ActionManager::session_sensitive_actions.push_back (act);
225 act = ActionManager::register_action (editor_actions, "duplicate-region", _("Duplicate Region"), mem_fun(*this, &Editor::keyboard_duplicate_region));
226 ActionManager::session_sensitive_actions.push_back (act);
227 act = ActionManager::register_action (editor_actions, "duplicate-range", _("Duplicate Range"), mem_fun(*this, &Editor::keyboard_duplicate_selection));
228 ActionManager::session_sensitive_actions.push_back (act);
229 act = ActionManager::register_action (editor_actions, "insert-region", _("Insert Region"), mem_fun(*this, &Editor::keyboard_insert_region_list_selection));
230 ActionManager::session_sensitive_actions.push_back (act);
231 act = ActionManager::register_action (editor_actions, "reverse-region", _("Reverse Region"), mem_fun(*this, &Editor::reverse_region));
232 ActionManager::session_sensitive_actions.push_back (act);
233 act = ActionManager::register_action (editor_actions, "normalize-region", _("Normalize Region"), mem_fun(*this, &Editor::normalize_region));
234 ActionManager::session_sensitive_actions.push_back (act);
235 act = ActionManager::register_action (editor_actions, "crop", _("crop"), mem_fun(*this, &Editor::crop_region_to_selection));
236 ActionManager::session_sensitive_actions.push_back (act);
237 act = ActionManager::register_action (editor_actions, "insert-chunk", _("Insert Chunk"), bind (mem_fun(*this, &Editor::paste_named_selection), 1.0f));
238 ActionManager::session_sensitive_actions.push_back (act);
240 act = ActionManager::register_action (editor_actions, "split-at-edit-cursor", _("Split at edit cursor"), mem_fun(*this, &Editor::split_region));
241 ActionManager::edit_cursor_in_region_sensitive_actions.push_back (act);
243 act = ActionManager::register_action (editor_actions, "start-range", _("Start Range"), mem_fun(*this, &Editor::keyboard_selection_begin));
244 ActionManager::session_sensitive_actions.push_back (act);
245 act = ActionManager::register_action (editor_actions, "finish-range", _("Finish Range"), bind (mem_fun(*this, &Editor::keyboard_selection_finish), false));
246 ActionManager::session_sensitive_actions.push_back (act);
247 act = ActionManager::register_action (editor_actions, "finish-add-range", _("Finish add Range"), bind (mem_fun(*this, &Editor::keyboard_selection_finish), true));
248 ActionManager::session_sensitive_actions.push_back (act);
250 act = ActionManager::register_action (editor_actions, "extend-range-to-end-of-region", _("Extend Range to End of Region"), bind (mem_fun(*this, &Editor::extend_selection_to_end_of_region), false));
251 ActionManager::session_sensitive_actions.push_back (act);
252 act = ActionManager::register_action (editor_actions, "extend-range-to-start-of-region", _("Extend Range to Start of Region"), bind (mem_fun(*this, &Editor::extend_selection_to_start_of_region), false));
253 ActionManager::session_sensitive_actions.push_back (act);
255 act = ActionManager::register_toggle_action (editor_actions, "toggle-follow-playhead", _("Follow Playhead"), (mem_fun(*this, &Editor::toggle_follow_playhead)));
256 ActionManager::session_sensitive_actions.push_back (act);
257 act = ActionManager::register_action (editor_actions, "remove-last-capture", _("Remove Last Capture"), (mem_fun(*this, &Editor::remove_last_capture)));
258 ActionManager::session_sensitive_actions.push_back (act);
260 Glib::RefPtr<ActionGroup> zoom_actions = ActionGroup::create (X_("Zoom"));
261 RadioAction::Group zoom_group;
263 ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-left", _("Zoom Focus Left"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusLeft));
264 ActionManager::session_sensitive_actions.push_back (act);
265 ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-right", _("Zoom Focus Right"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusRight));
266 ActionManager::session_sensitive_actions.push_back (act);
267 ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-center", _("Zoom Focus Center"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusCenter));
268 ActionManager::session_sensitive_actions.push_back (act);
269 ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-playhead", _("Zoom Focus Playhead"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusPlayhead));
270 ActionManager::session_sensitive_actions.push_back (act);
271 ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-edit", _("Zoom Focus Edit"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusEdit));
272 ActionManager::session_sensitive_actions.push_back (act);
274 Glib::RefPtr<ActionGroup> mouse_mode_actions = ActionGroup::create (X_("MouseMode"));
275 RadioAction::Group mouse_mode_group;
277 ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("Object Tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseObject, false));
278 ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseRange, false));
279 ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-gain", _("Gain Tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseGain, false));
280 ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-zoom", _("Zoom Tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseZoom, false));
281 ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Timefx Tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseTimeFX, false));
283 Glib::RefPtr<ActionGroup> snap_actions = ActionGroup::create (X_("Snap"));
284 RadioAction::Group snap_choice_group;
286 ActionManager::register_action (editor_actions, X_("SnapTo"), _("Snap To"));
288 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-frame"), _("Snap to frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToFrame)));
289 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-cd-frame"), _("Snap to cd frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToCDFrame)));
290 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-frame"), _("Snap to SMPTE frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTEFrame)));
291 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-seconds"), _("Snap to SMPTE seconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTESeconds)));
292 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-minutes"), _("Snap to SMPTE minutes"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTEMinutes)));
293 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-seconds"), _("Snap to seconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSeconds)));
294 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-minutes"), _("Snap to minutes"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToMinutes)));
295 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("Snap to thirtyseconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAThirtysecondBeat)));
296 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("Snap to asixteenthbeat"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToASixteenthBeat)));
297 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-eighths"), _("Snap to eighths"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAEighthBeat)));
298 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-quarters"), _("Snap to quarters"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAQuarterBeat)));
299 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirds"), _("Snap to thirds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAThirdBeat)));
300 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-beat"), _("Snap to beat"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToBeat)));
301 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-bar"), _("Snap to bar"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToBar)));
302 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-mark"), _("Snap to mark"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToMark)));
303 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-edit-cursor"), _("Snap to edit cursor"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToEditCursor)));
304 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-start"), _("Snap to region start"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionStart)));
305 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-end"), _("Snap to region end"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionEnd)));
306 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-sync"), _("Snap to region sync"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionSync)));
307 ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-boundary"), _("Snap to region boundary"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionBoundary)));
311 Glib::RefPtr<ActionGroup> rl_actions = ActionGroup::create (X_("RegionList"));
312 RadioAction::Group sort_type_group;
313 RadioAction::Group sort_order_group;
315 /* the region list popup menu */
316 ActionManager::register_action (rl_actions, X_("RegionListSort"), _("Sort"));
318 act = ActionManager::register_action (rl_actions, X_("rlAudition"), _("Audition"), mem_fun(*this, &Editor::audition_region_from_region_list));
319 ActionManager::region_list_selection_sensitive_actions.push_back (act);
320 act = ActionManager::register_action (rl_actions, X_("rlHide"), _("Hide"), mem_fun(*this, &Editor::hide_region_from_region_list));
321 ActionManager::region_list_selection_sensitive_actions.push_back (act);
322 act = ActionManager::register_action (rl_actions, X_("rlRemove"), _("Remove"), mem_fun (*this, &Editor::remove_region_from_region_list));
323 ActionManager::region_list_selection_sensitive_actions.push_back (act);
324 ActionManager::register_toggle_action (rl_actions, X_("rlShowAll"), _("Show all"), mem_fun(*this, &Editor::toggle_full_region_list));
325 ActionManager::register_toggle_action (rl_actions, X_("rlShowAuto"), _("Show automatic regions"), mem_fun(*this, &Editor::toggle_show_auto_regions));
327 ActionManager::register_radio_action (rl_actions, sort_order_group, X_("SortAscending"), _("Ascending"),
328 bind (mem_fun(*this, &Editor::reset_region_list_sort_direction), true));
329 ActionManager::register_radio_action (rl_actions, sort_order_group, X_("SortDescending"), _("Descending"),
330 bind (mem_fun(*this, &Editor::reset_region_list_sort_direction), false));
332 ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionName"), _("By Region Name"),
333 bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByName));
334 ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionLength"), _("By Region Length"),
335 bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByLength));
336 ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionPosition"), _("By Region Position"),
337 bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByPosition));
338 ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionTimestamp"), _("By Region Timestamp"),
339 bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByTimestamp));
340 ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionStartinFile"), _("By Region Start in File"),
341 bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByStartInFile));
342 ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionEndinFile"), _("By Region End in File"),
343 bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByEndInFile));
344 ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileName"), _("By Source File Name"),
345 bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileName));
346 ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileLength"), _("By Source File Length"),
347 bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileLength));
348 ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileCreationDate"), _("By Source File Creation Date"),
349 bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileCreationDate));
350 ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFilesystem"), _("By Source Filesystem"),
351 bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileFS));
354 /* the next two are duplicate items with different names for use in two different contexts */
356 act = ActionManager::register_action (editor_actions, X_("addExternalAudioToRegionList"), _("Add External Audio"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportAsRegion));
357 ActionManager::session_sensitive_actions.push_back (act);
358 act = ActionManager::register_action (editor_actions, X_("addExternalAudioAsRegion"), _("as Region(s)"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportAsRegion));
359 ActionManager::session_sensitive_actions.push_back (act);
360 act = ActionManager::register_action (editor_actions, X_("addExternalAudioAsTrack"), _("as Tracks"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportAsTrack));
361 ActionManager::session_sensitive_actions.push_back (act);
362 act = ActionManager::register_action (editor_actions, X_("addExternalAudioAsTapeTrack"), _("as Tape Tracks"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportAsTapeTrack));
363 ActionManager::session_sensitive_actions.push_back (act);
364 act = ActionManager::register_action (editor_actions, X_("addExternalAudioToTrack"), _("to Tracks"), bind (mem_fun(*this, &Editor::add_external_audio_action), ImportToTrack));
365 ActionManager::session_sensitive_actions.push_back (act);
367 ActionManager::register_toggle_action (editor_actions, X_("ToggleWaveformVisibility"), _("Show Waveforms"), mem_fun (*this, &Editor::toggle_waveform_visibility));
368 ActionManager::register_toggle_action (editor_actions, X_("ToggleWaveformsWhileRecording"), _("Show Waveforms While Recording"), mem_fun (*this, &Editor::toggle_waveforms_while_recording));
369 act = ActionManager::register_toggle_action (editor_actions, X_("ToggleMeasureVisibility"), _("Show Measures"), mem_fun (*this, &Editor::toggle_measure_visibility));
371 RadioAction::Group meter_falloff_group;
372 RadioAction::Group meter_hold_group;
375 Slowest = 6.6dB/sec falloff at update rate of 40ms
376 Slow = 6.8dB/sec falloff at update rate of 40ms
379 ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffOff"), _("Off"), hide_return (bind (mem_fun (*Config, &Configuration::set_meter_falloff), 0.0f)));
380 ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlowest"), _("Slowest"), hide_return (bind (mem_fun (*Config, &Configuration::set_meter_falloff), 1.0f)));
381 ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlow"), _("Slow"), hide_return (bind (mem_fun (*Config, &Configuration::set_meter_falloff), 2.0f)));
382 ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffMedium"), _("Medium"), hide_return (bind (mem_fun (*Config, &Configuration::set_meter_falloff), 3.0f)));
383 ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFast"), _("Fast"), hide_return (bind (mem_fun (*Config, &Configuration::set_meter_falloff), 4.0f)));
384 ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFaster"), _("Faster"), hide_return (bind (mem_fun (*Config, &Configuration::set_meter_falloff), 5.0f)));
385 ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFastest"), _("Fastest"), hide_return (bind (mem_fun (*Config, &Configuration::set_meter_falloff), 6.0f)));
387 ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldOff"), _("Off"), hide_return (bind (mem_fun (*Config, &Configuration::set_meter_hold), 0.0f)));
388 ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldShort"), _("Short"), hide_return (bind (mem_fun (*Config, &Configuration::set_meter_hold), 40.0f)));
389 ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldMedium"), _("Medium"), hide_return (bind (mem_fun (*Config, &Configuration::set_meter_hold), 100.0f)));
390 ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldLong"), _("Long"), hide_return (bind (mem_fun (*Config, &Configuration::set_meter_hold), 200.0f)));
392 RadioAction::Group layer_model_group;
394 ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerLaterHigher"), _("Later is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), LaterHigher));
395 ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerMoveAddHigher"), _("Most Recently Moved/Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), MoveAddHigher));
396 ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerAddHigher"), _("Most Recently Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), AddHigher));
398 RadioAction::Group smpte_group;
400 ActionManager::register_radio_action (editor_actions, smpte_group, X_("Smpte23976"), _("23.976"), bind (mem_fun (*this, &Editor::smpte_fps_chosen), Session::smpte_23976));
401 ActionManager::register_radio_action (editor_actions, smpte_group, X_("Smpte24"), _("24"), bind (mem_fun (*this, &Editor::smpte_fps_chosen), Session::smpte_24));
402 ActionManager::register_radio_action (editor_actions, smpte_group, X_("Smpte24976"), _("24.976"), bind (mem_fun (*this, &Editor::smpte_fps_chosen), Session::smpte_24976));
403 ActionManager::register_radio_action (editor_actions, smpte_group, X_("Smpte25"), _("25"), bind (mem_fun (*this, &Editor::smpte_fps_chosen), Session::smpte_25));
404 ActionManager::register_radio_action (editor_actions, smpte_group, X_("Smpte2997"), _("29.97"), bind (mem_fun (*this, &Editor::smpte_fps_chosen), Session::smpte_2997));
405 ActionManager::register_radio_action (editor_actions, smpte_group, X_("Smpte2997drop"), _("29.97 drop"), bind (mem_fun (*this, &Editor::smpte_fps_chosen), Session::smpte_2997drop));
406 ActionManager::register_radio_action (editor_actions, smpte_group, X_("Smpte30"), _("30"), bind (mem_fun (*this, &Editor::smpte_fps_chosen), Session::smpte_30));
407 ActionManager::register_radio_action (editor_actions, smpte_group, X_("Smpte30drop"), _("30 drop"), bind (mem_fun (*this, &Editor::smpte_fps_chosen), Session::smpte_30drop));
408 ActionManager::register_radio_action (editor_actions, smpte_group, X_("Smpte5994"), _("59.94"), bind (mem_fun (*this, &Editor::smpte_fps_chosen), Session::smpte_5994));
409 ActionManager::register_radio_action (editor_actions, smpte_group, X_("Smpte60"), _("60"), bind (mem_fun (*this, &Editor::smpte_fps_chosen), Session::smpte_60));
411 RadioAction::Group pullup_group;
413 ActionManager::register_radio_action (editor_actions, pullup_group, X_("PullupPlus4Plus1"), _("+4.1667% + 0.1%"), bind (mem_fun (*this, &Editor::video_pullup_chosen), Session::pullup_Plus4Plus1));
414 ActionManager::register_radio_action (editor_actions, pullup_group, X_("PullupPlus4"), _("+4.1667%"), bind (mem_fun (*this, &Editor::video_pullup_chosen), Session::pullup_Plus4));
415 ActionManager::register_radio_action (editor_actions, pullup_group, X_("PullupPlus4Minus1"), _("+4.1667% - 0.1%"), bind (mem_fun (*this, &Editor::video_pullup_chosen), Session::pullup_Plus4Minus1));
416 ActionManager::register_radio_action (editor_actions, pullup_group, X_("PullupPlus1"), _("+ 0.1%"), bind (mem_fun (*this, &Editor::video_pullup_chosen), Session::pullup_Plus1));
417 ActionManager::register_radio_action (editor_actions, pullup_group, X_("PullupNone"), _("None"), bind (mem_fun (*this, &Editor::video_pullup_chosen), Session::pullup_None));
418 ActionManager::register_radio_action (editor_actions, pullup_group, X_("PullupMinus1"), _("- 0.1%"), bind (mem_fun (*this, &Editor::video_pullup_chosen), Session::pullup_Minus1));
419 ActionManager::register_radio_action (editor_actions, pullup_group, X_("PullupMinus4Plus1"), _("-4.1667% + 0.1%"), bind (mem_fun (*this, &Editor::video_pullup_chosen), Session::pullup_Minus4Plus1));
420 ActionManager::register_radio_action (editor_actions, pullup_group, X_("PullupMinus4"), _("-4.1667%"), bind (mem_fun (*this, &Editor::video_pullup_chosen), Session::pullup_Minus4));
421 ActionManager::register_radio_action (editor_actions, pullup_group, X_("PullupMinus4Minus1"), _("-4.1667% - 0.1%"), bind (mem_fun (*this, &Editor::video_pullup_chosen), Session::pullup_Minus4Minus1));
423 ActionManager::add_action_group (rl_actions);
424 ActionManager::add_action_group (zoom_actions);
425 ActionManager::add_action_group (mouse_mode_actions);
426 ActionManager::add_action_group (snap_actions);
427 ActionManager::add_action_group (editor_actions);
431 Editor::toggle_waveform_visibility ()
433 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformVisibility"));
435 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
436 set_show_waveforms (tact->get_active());
441 Editor::toggle_waveforms_while_recording ()
443 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformVisibility"));
445 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
446 set_show_waveforms_recording (tact->get_active());
451 Editor::toggle_measure_visibility ()
453 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleMeasureVisibility"));
455 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
456 set_show_measures (tact->get_active());
461 Editor::toggle_auto_xfade ()
463 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-auto-xfades"));
465 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
466 Config->set_auto_xfade (tact->get_active());
471 Editor::toggle_xfades_active ()
473 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-xfades-active"));
474 if (session && act) {
475 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
476 Config->set_crossfades_active (tact->get_active());
481 Editor::toggle_xfade_visibility ()
483 Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-xfades-visible"));
484 if (session && act) {
485 Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
486 // set_xfade_visibility (tact->get_active());
491 Editor::set_layer_model (LayerModel model)
493 /* this is driven by a toggle on a radio group, and so is invoked twice,
494 once for the item that became inactive and once for the one that became
503 act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
506 act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
509 act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
514 RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
515 if (ract && ract->get_active()) {
516 Config->set_layer_model (model);
523 Editor::smpte_fps_chosen (Session::SmpteFormat format)
525 /* this is driven by a toggle on a radio group, and so is invoked twice,
526 once for the item that became inactive and once for the one that became
538 case Session::smpte_23976: {
541 act = ActionManager::get_action (X_("Editor"), X_("Smpte23976"));
543 case Session::smpte_24: {
546 act = ActionManager::get_action (X_("Editor"), X_("Smpte24"));
548 case Session::smpte_24976: {
551 act = ActionManager::get_action (X_("Editor"), X_("Smpte24976"));
553 case Session::smpte_25: {
556 act = ActionManager::get_action (X_("Editor"), X_("Smpte25"));
558 case Session::smpte_2997: {
561 act = ActionManager::get_action (X_("Editor"), X_("Smpte2997"));
563 case Session::smpte_2997drop: {
566 act = ActionManager::get_action (X_("Editor"), X_("Smpte2997drop"));
568 case Session::smpte_30: {
571 act = ActionManager::get_action (X_("Editor"), X_("Smpte30"));
573 case Session::smpte_30drop: {
576 act = ActionManager::get_action (X_("Editor"), X_("Smpte30drop"));
578 case Session::smpte_5994: {
581 act = ActionManager::get_action (X_("Editor"), X_("Smpte5994"));
583 case Session::smpte_60: {
586 act = ActionManager::get_action (X_("Editor"), X_("Smpte60"));
589 cerr << "Editor received unexpected smpte type" << endl;
593 RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
594 if (ract && ract->get_active()) {
595 session->set_smpte_type (fps, drop);
602 Editor::video_pullup_chosen (Session::PullupFormat pullup)
604 /* this is driven by a toggle on a radio group, and so is invoked twice,
605 once for the item that became inactive and once for the one that became
616 case Session::pullup_Plus4Plus1:{
618 act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4Plus1"));
620 case Session::pullup_Plus4:{
622 act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4"));
624 case Session::pullup_Plus4Minus1:{
626 act = ActionManager::get_action (X_("Editor"), X_("PullupPlus4Minus1"));
628 case Session::pullup_Plus1:{
630 act = ActionManager::get_action (X_("Editor"), X_("PullupPlus1"));
632 case Session::pullup_None:{
634 act = ActionManager::get_action (X_("Editor"), X_("PullupNone"));
636 case Session::pullup_Minus1:{
638 act = ActionManager::get_action (X_("Editor"), X_("PullupMinus1"));
640 case Session::pullup_Minus4Plus1:{
641 pull = -4.1667 + 0.1;
642 act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4Plus1"));
644 case Session::pullup_Minus4:{
646 act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4"));
648 case Session::pullup_Minus4Minus1:{
649 pull = -4.1667 - 0.1;
650 act = ActionManager::get_action (X_("Editor"), X_("PullupMinus4Minus1"));
653 cerr << "Session received unexpected pullup type" << endl;
657 RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
658 if (ract && ract->get_active()) {
659 Config->set_video_pullup ( pull );
661 } else cerr << "Editor::video_pullup_chosen could not find action to match pullup." << endl;
667 Editor::set_crossfade_model (CrossfadeModel model)
671 /* this is driven by a toggle on a radio group, and so is invoked twice,
672 once for the item that became inactive and once for the one that became
679 act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
682 act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
687 RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
688 if (ract && ract->get_active()) {
689 Config->set_xfade_model (model);