(gtk_accel_path "<Actions>/Editor/jump-backward-to-mark" "<%PRIMARY%>KP_Left")
; (gtk_accel_path "<Actions>/Main/AudioFileFormatData" "")
; (gtk_accel_path "<Actions>/options/MeterFalloffFastest" "")
-(gtk_accel_path "<Actions>/Editor/audition-region" "w")
+(gtk_accel_path "<Actions>/Editor/play-selected-regions" "w")
(gtk_accel_path "<Actions>/Transport/Forward" "<%PRIMARY%>rightarrow")
; (gtk_accel_path "<Actions>/Snap/snap-to-smpte-seconds" "")
; (gtk_accel_path "<Actions>/Snap/snap-to-smpte-frame" "")
<menuitem action='edit-to-playhead'/>
</menu>
<menu name='KeyMouse Actions' action='KeyMouse Actions'>
- <menuitem action='audition-region'/>
+ <menuitem action='play-selected-regions'/>
<menuitem action='brush-at-mouse'/>
<menuitem action='mute-unmute-region'/>
<separator/>
_dragging_edit_point = false;
_dragging_hscrollbar = false;
select_new_marker = false;
+ zoomed_to_region = false;
scrubbing_direction = 0;
items.push_back (MenuElem (_("Remove sync point"), mem_fun(*this, &Editor::remove_region_sync)));
items.push_back (SeparatorElem());
- items.push_back (MenuElem (_("Audition"), mem_fun(*this, &Editor::audition_selected_region)));
+ items.push_back (MenuElem (_("Audition"), mem_fun(*this, &Editor::play_selected_region)));
items.push_back (MenuElem (_("Export"), mem_fun(*this, &Editor::export_region)));
items.push_back (MenuElem (_("Bounce"), mem_fun(*this, &Editor::bounce_region_selection)));
void play_from_start ();
void play_from_edit_point ();
void play_selected_region ();
- void audition_selected_region ();
void loop_selected_region ();
void play_location (ARDOUR::Location&);
void loop_location (ARDOUR::Location&);
void temporal_zoom_selection ();
void temporal_zoom_region ();
+ void toggle_zoom_region ();
+ bool zoomed_to_region;
void temporal_zoom_session ();
void temporal_zoom (gdouble scale);
void temporal_zoom_by_frame (nframes_t start, nframes_t end, const string & op);
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "zoom-to-session", _("Zoom to Session"), mem_fun(*this, &Editor::temporal_zoom_session));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (editor_actions, "zoom-to-region", _("Zoom to Region"), mem_fun(*this, &Editor::temporal_zoom_region));
+ act = ActionManager::register_action (editor_actions, "zoom-to-region", _("Zoom to Region"), mem_fun(*this, &Editor::toggle_zoom_region));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "toggle-zoom", _("Toggle Zoom State"), mem_fun(*this, &Editor::swap_visual_state));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "align-regions-sync-relative", _("Align Regions Sync Relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::SyncPoint));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (editor_actions, "audition-region", _("Audition Region"), mem_fun(*this, &Editor::audition_selected_region));
+ act = ActionManager::register_action (editor_actions, "play-selected-regions", _("Play Selected Region(s)"), mem_fun(*this, &Editor::play_selected_region));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "brush-at-mouse", _("Brush at Mouse"), mem_fun(*this, &Editor::kbd_brush));
ActionManager::session_sensitive_actions.push_back (act);
bool
Editor::track_canvas_button_press_event (GdkEventButton *event)
{
+ selection->clear ();
track_canvas.grab_focus();
return false;
}
/* no drag, just a click */
switch (item_type) {
case RegionItem:
- audition_selected_region ();
+ play_selected_region ();
break;
default:
break;
}
temporal_zoom_by_frame (start, end, "zoom to region");
+ zoomed_to_region = true;
+}
+
+void
+Editor::toggle_zoom_region ()
+{
+ if (zoomed_to_region) {
+ swap_visual_state ();
+ } else {
+ temporal_zoom_region ();
+ }
}
void
session->request_play_range (true);
}
-void
-Editor::play_selected_region ()
-{
- if (!selection->regions.empty()) {
- RegionView *rv = *(selection->regions.begin());
-
- session->request_bounded_roll (rv->region()->position(), rv->region()->last_frame());
- }
-}
-
void
Editor::loop_selected_region ()
{
}
void
-Editor::audition_selected_region ()
+Editor::play_selected_region ()
{
nframes64_t start = max_frames;
nframes64_t end = 0;
}
}
- list<AudioRange> lr;
- lr.push_back (AudioRange (start, end, 0));
-
- session->set_audio_range (lr);
- session->request_play_range (true);
+ session->request_bounded_roll (start, end);
}
void
{
vector<ustring> paths;
+ cerr << "ERLD:dddr target = " << data.get_target() << endl;
+
if (convert_drop_to_paths (paths, context, x, y, data, info, time) == 0) {
nframes64_t pos = 0;
do_embed (paths, Editing::ImportDistinctFiles, ImportAsRegion, pos);