new keymouse binding 'set region sync point'

git-svn-id: svn://localhost/trunk/ardour2@286 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge
2006-01-22 13:29:08 +00:00
parent 860749eb13
commit b0686e9056
5 changed files with 24 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
(gtk_accel_path "<Actions>/Editor/duplicate-region" "d")
(gtk_accel_path "<Actions>/Editor/set-edit-cursor" "e")
(gtk_accel_path "<Actions>/Editor/split-region" "s")
(gtk_accel_path "<Actions>/Editor/set-region-sync-position" "v")
(gtk_accel_path "<Actions>/Editor/insert-region" "i")
(gtk_accel_path "<Actions>/Editor/normalize-region" "n")
(gtk_accel_path "<Actions>/Transport/loop" "l")

View File

@@ -207,6 +207,7 @@
<menuitem action='set-edit-cursor'/>
<menuitem action='set-playhead'/>
<menuitem action='split-region'/>
<menuitem action='set-region-sync-position'/>
</menu>
</menu>
</menubar>

View File

@@ -1187,12 +1187,14 @@ class Editor : public PublicEditor
void kbd_set_playhead_cursor ();
void kbd_set_edit_cursor ();
void kbd_split ();
void kbd_set_sync_position ();
void kbd_align (ARDOUR::RegionPoint);
void kbd_align_relative (ARDOUR::RegionPoint);
void kbd_brush ();
void kbd_audition ();
void kbd_do_split (GdkEvent*);
void kbd_do_set_sync_position (GdkEvent* ev);
void kbd_do_align (GdkEvent*, ARDOUR::RegionPoint);
void kbd_do_align_relative (GdkEvent*, ARDOUR::RegionPoint);
void kbd_do_brush (GdkEvent*);

View File

@@ -149,6 +149,8 @@ Editor::register_actions ()
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "split-region", _("split region"), mem_fun(*this, &Editor::kbd_split));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "set-region-sync-position", _("set region sync position"), mem_fun(*this, &Editor::kbd_set_sync_position));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "undo", _("undo"), bind (mem_fun(*this, &Editor::undo), 1U));
ActionManager::session_sensitive_actions.push_back (act);

View File

@@ -94,6 +94,24 @@ Editor::kbd_split ()
kbd_driver (mem_fun(*this, &Editor::kbd_do_split), true, true, false);
}
void
Editor::kbd_set_sync_position ()
{
kbd_driver (mem_fun(*this, &Editor::kbd_do_set_sync_position), true, true, false);
}
void
Editor::kbd_do_set_sync_position (GdkEvent* ev)
{
jack_nframes_t where = event_frame (ev);
snap_to (where);
if (entered_regionview) {
entered_regionview->region.set_sync_position (where);
}
}
void
Editor::kbd_do_align (GdkEvent* ev, ARDOUR::RegionPoint what)
{