mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 13:46:30 +01:00
parametize modifier key usage; fix keyboard-driven sync point setting; add ladspa whitelist to allow subset of plugins to be shown (hardcoded for now, but to expanded in the future)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2722 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
b8e300b36c
commit
c73f4fde75
18 changed files with 170 additions and 106 deletions
|
|
@ -28,7 +28,7 @@
|
|||
; (gtk_accel_path "<Actions>/options/MeterFalloffSlow" "")
|
||||
; (gtk_accel_path "<Actions>/RegionList/rlHide" "")
|
||||
; (gtk_accel_path "<Actions>/Main/Metering" "")
|
||||
(gtk_accel_path "<Actions>/Editor/playhead-to-next-region-boundary" "period")
|
||||
(gtk_accel_path "<Actions>/Editor/playhead-to-next-region-boundary" "rightarrow")
|
||||
; (gtk_accel_path "<Actions>/Zoom/zoom-focus-playhead" "")
|
||||
; (gtk_accel_path "<Actions>/Editor/center-edit-cursor" "")
|
||||
; (gtk_accel_path "<Actions>/Editor/Monitoring" "")
|
||||
|
|
@ -36,7 +36,6 @@
|
|||
; (gtk_accel_path "<Actions>/options/LatchedRecordEnable" "")
|
||||
; (gtk_accel_path "<Actions>/Transport/TogglePunchIn" "")
|
||||
; (gtk_accel_path "<Actions>/ShuttleActions/SetShuttleUnitsPercentage" "")
|
||||
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-previous-region-start" "bracketleft")
|
||||
; (gtk_accel_path "<Actions>/Main/Close" "")
|
||||
; (gtk_accel_path "<Actions>/Main/New" "")
|
||||
(gtk_accel_path "<Actions>/Editor/nudge-next-backward" "<%PRIMARY%>KP_Subtract")
|
||||
|
|
@ -99,7 +98,7 @@
|
|||
(gtk_accel_path "<Actions>/Editor/set-edit-point" "o")
|
||||
; (gtk_accel_path "<Actions>/Editor/Smpte30drop" "")
|
||||
; (gtk_accel_path "<Actions>/Zoom/zoom-focus-edit" "")
|
||||
(gtk_accel_path "<Actions>/Editor/playhead-to-previous-region-boundary" "comma")
|
||||
(gtk_accel_path "<Actions>/Editor/playhead-to-previous-region-boundary" "leftarrow")
|
||||
; (gtk_accel_path "<Actions>/Editor/EditCursorMovementOptions" "")
|
||||
; (gtk_accel_path "<Actions>/redirectmenu/activate_all" "")
|
||||
; (gtk_accel_path "<Actions>/redirectmenu/paste" "")
|
||||
|
|
@ -206,7 +205,7 @@
|
|||
; (gtk_accel_path "<Actions>/Main/ExportSession" "")
|
||||
; (gtk_accel_path "<Actions>/options/InputAutoConnectPhysical" "")
|
||||
; (gtk_accel_path "<Actions>/Snap/snap-to-edit-cursor" "")
|
||||
(gtk_accel_path "<Actions>/Editor/temporal-zoom-in" "r")
|
||||
(gtk_accel_path "<Actions>/Editor/temporal-zoom-in" "t")
|
||||
; (gtk_accel_path "<Actions>/JACK/Latency" "")
|
||||
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-range-end" "<%TERTIARY%>F2")
|
||||
; (gtk_accel_path "<Actions>/redirectmenu/rename" "")
|
||||
|
|
@ -292,7 +291,7 @@
|
|||
; (gtk_accel_path "<Actions>/Editor/ToggleGeneric MIDISurface" "")
|
||||
(gtk_accel_path "<Actions>/Editor/editor-delete" "BackSpace")
|
||||
; (gtk_accel_path "<Actions>/JACK/JACKLatency256" "")
|
||||
(gtk_accel_path "<Actions>/Editor/select-all-between-cursors" "u")
|
||||
(gtk_accel_path "<Actions>/Editor/select-all-between-cursors" "F16")
|
||||
; (gtk_accel_path "<Actions>/Editor/LayerAddHigher" "")
|
||||
; (gtk_accel_path "<Actions>/Editor/Solo" "")
|
||||
; (gtk_accel_path "<Actions>/JACK/JACKLatency1024" "")
|
||||
|
|
@ -304,7 +303,7 @@
|
|||
; (gtk_accel_path "<Actions>/redirectmenu/selectall" "")
|
||||
(gtk_accel_path "<Actions>/Editor/editor-copy" "<%PRIMARY%>c")
|
||||
; (gtk_accel_path "<Actions>/Snap/snap-to-quarters" "")
|
||||
(gtk_accel_path "<Actions>/Editor/temporal-zoom-out" "t")
|
||||
(gtk_accel_path "<Actions>/Editor/temporal-zoom-out" "r")
|
||||
; (gtk_accel_path "<Actions>/options/UseSoftwareMonitoring" "")
|
||||
; (gtk_accel_path "<Actions>/Editor/Subframes100" "")
|
||||
(gtk_accel_path "<Actions>/Editor/mute-unmute-region" "m")
|
||||
|
|
@ -315,7 +314,6 @@
|
|||
; (gtk_accel_path "<Actions>/Editor/ToggleGeneric MIDISurfaceFeedback" "")
|
||||
; (gtk_accel_path "<Actions>/Editor/PullupPlus4Minus1" "")
|
||||
; (gtk_accel_path "<Actions>/JACK/JACKLatency512" "")
|
||||
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-next-region-end" "<%PRIMARY%>bracketright")
|
||||
; (gtk_accel_path "<Actions>/Main/Recent" "")
|
||||
; (gtk_accel_path "<Actions>/redirectmenu/newplugin" "")
|
||||
; (gtk_accel_path "<Actions>/options/InputAutoConnectManual" "")
|
||||
|
|
|
|||
|
|
@ -1047,7 +1047,7 @@ AudioClock::field_button_release_event (GdkEventButton *ev, Field field)
|
|||
if (dragging) {
|
||||
gdk_pointer_ungrab (GDK_CURRENT_TIME);
|
||||
dragging = false;
|
||||
if (ev->y > drag_start_y+1 || ev->y < drag_start_y-1 || Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)){
|
||||
if (ev->y > drag_start_y+1 || ev->y < drag_start_y-1 || Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)){
|
||||
// we actually dragged so return without setting editing focus, or we shift clicked
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1127,7 +1127,7 @@ AudioClock::field_button_press_event (GdkEventButton *ev, Field field)
|
|||
|
||||
switch (ev->button) {
|
||||
case 1:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
|
||||
set (frames, true);
|
||||
ValueChanged (); /* EMIT_SIGNAL */
|
||||
}
|
||||
|
|
@ -1143,7 +1143,7 @@ AudioClock::field_button_press_event (GdkEventButton *ev, Field field)
|
|||
break;
|
||||
|
||||
case 2:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
|
||||
set (frames, true);
|
||||
ValueChanged (); /* EMIT_SIGNAL */
|
||||
}
|
||||
|
|
@ -1176,7 +1176,7 @@ AudioClock::field_button_scroll_event (GdkEventScroll *ev, Field field)
|
|||
case GDK_SCROLL_UP:
|
||||
frames = get_frames (field);
|
||||
if (frames != 0) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
frames *= 10;
|
||||
}
|
||||
set (current_time() + frames, true);
|
||||
|
|
@ -1187,7 +1187,7 @@ AudioClock::field_button_scroll_event (GdkEventScroll *ev, Field field)
|
|||
case GDK_SCROLL_DOWN:
|
||||
frames = get_frames (field);
|
||||
if (frames != 0) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
frames *= 10;
|
||||
}
|
||||
|
||||
|
|
@ -1219,13 +1219,13 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
|
|||
float pixel_frame_scale_factor = 0.2f;
|
||||
|
||||
/*
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
pixel_frame_scale_factor = 0.1f;
|
||||
}
|
||||
|
||||
|
||||
if (Keyboard::modifier_state_contains (ev->state,
|
||||
Keyboard::Control|Keyboard::Alt)) {
|
||||
Keyboard::PrimaryModifier|Keyboard::SecondaryModifier)) {
|
||||
|
||||
pixel_frame_scale_factor = 0.025f;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2099,6 +2099,8 @@ Editor::set_snap_mode (SnapMode mode)
|
|||
void
|
||||
Editor::set_edit_point_preference (EditPoint ep)
|
||||
{
|
||||
bool changed = _edit_point != ep;
|
||||
|
||||
_edit_point = ep;
|
||||
string str = edit_point_strings[(int)ep];
|
||||
|
||||
|
|
@ -2106,6 +2108,33 @@ Editor::set_edit_point_preference (EditPoint ep)
|
|||
edit_point_selector.set_active_text (str);
|
||||
}
|
||||
|
||||
if (!changed) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Profile->get_sae()) {
|
||||
|
||||
switch (zoom_focus) {
|
||||
case ZoomFocusMouse:
|
||||
case ZoomFocusPlayhead:
|
||||
case ZoomFocusEdit:
|
||||
switch (_edit_point) {
|
||||
case EditAtMouse:
|
||||
set_zoom_focus (ZoomFocusMouse);
|
||||
break;
|
||||
case EditAtPlayhead:
|
||||
set_zoom_focus (ZoomFocusPlayhead);
|
||||
break;
|
||||
case EditAtSelectedMarker:
|
||||
set_zoom_focus (ZoomFocusEdit);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
instant_save ();
|
||||
}
|
||||
|
||||
|
|
@ -3239,11 +3268,11 @@ Editor::edit_point_selection_done ()
|
|||
EditPoint ep = EditAtSelectedMarker;
|
||||
|
||||
if (choice == _("Marker")) {
|
||||
_edit_point = EditAtSelectedMarker;
|
||||
set_edit_point_preference (EditAtSelectedMarker);
|
||||
} else if (choice == _("Playhead")) {
|
||||
_edit_point = EditAtPlayhead;
|
||||
set_edit_point_preference (EditAtPlayhead);
|
||||
} else {
|
||||
_edit_point = EditAtMouse;
|
||||
set_edit_point_preference (EditAtMouse);
|
||||
}
|
||||
|
||||
RefPtr<RadioAction> ract = edit_point_action (ep);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
|
|||
|
||||
switch (ev->direction) {
|
||||
case GDK_SCROLL_UP:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
//if (ev->state == GDK_CONTROL_MASK) {
|
||||
/* XXX
|
||||
the ev->x will be out of step with the canvas
|
||||
|
|
@ -75,7 +75,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
|
|||
nframes_t where = event_frame (&event, 0, 0);
|
||||
temporal_zoom_to_frame (false, where);
|
||||
return true;
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
|
||||
if (!current_stepping_trackview) {
|
||||
step_timeout = Glib::signal_timeout().connect (mem_fun(*this, &Editor::track_height_step_timeout), 500);
|
||||
if (!(current_stepping_trackview = trackview_by_y_position (ev->y))) {
|
||||
|
|
@ -91,7 +91,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
|
|||
}
|
||||
break;
|
||||
case GDK_SCROLL_DOWN:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
//if (ev->state == GDK_CONTROL_MASK) {
|
||||
track_canvas.get_pointer (x, y);
|
||||
track_canvas.window_to_world (x, y, wx, wy);
|
||||
|
|
@ -106,7 +106,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
|
|||
nframes_t where = event_frame (&event, 0, 0);
|
||||
temporal_zoom_to_frame (true, where);
|
||||
return true;
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
|
||||
if (!current_stepping_trackview) {
|
||||
step_timeout = Glib::signal_timeout().connect (mem_fun(*this, &Editor::track_height_step_timeout), 500);
|
||||
if (!(current_stepping_trackview = trackview_by_y_position (ev->y))) {
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
return true;
|
||||
|
||||
case MarkerItem:
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::ModifierMask(Keyboard::Control|Keyboard::Shift))) {
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::ModifierMask(Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||
hide_marker (item, event);
|
||||
} else {
|
||||
start_marker_grab (item, event);
|
||||
|
|
@ -470,7 +470,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
return true;
|
||||
|
||||
case TempoMarkerItem:
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::CopyModifier)) {
|
||||
start_tempo_marker_copy_grab (item, event);
|
||||
} else {
|
||||
start_tempo_marker_grab (item, event);
|
||||
|
|
@ -478,7 +478,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
return true;
|
||||
|
||||
case MeterMarkerItem:
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::CopyModifier)) {
|
||||
start_meter_marker_copy_grab (item, event);
|
||||
} else {
|
||||
start_meter_marker_grab (item, event);
|
||||
|
|
@ -524,10 +524,10 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
|
||||
case SelectionItem:
|
||||
if (Keyboard::modifier_state_contains
|
||||
(event->button.state, Keyboard::ModifierMask(Keyboard::Alt))) {
|
||||
(event->button.state, Keyboard::ModifierMask(Keyboard::SecondaryModifier))) {
|
||||
// contains and not equals because I can't use alt as a modifier alone.
|
||||
start_selection_grab (item, event);
|
||||
} else if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Control)) {
|
||||
} else if (Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
|
||||
/* grab selection for moving */
|
||||
start_selection_op (item, event, SelectionMove);
|
||||
} else {
|
||||
|
|
@ -544,7 +544,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
break;
|
||||
|
||||
case MouseObject:
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::ModifierMask(Keyboard::Control|Keyboard::Alt)) &&
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::ModifierMask(Keyboard::PrimaryModifier|Keyboard::SecondaryModifier)) &&
|
||||
event->type == GDK_BUTTON_PRESS) {
|
||||
|
||||
start_rubberband_select (item, event);
|
||||
|
|
@ -561,7 +561,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
return true;
|
||||
|
||||
case RegionItem:
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::CopyModifier)) {
|
||||
start_region_copy_grab (item, event);
|
||||
} else if (Keyboard::the_keyboard().key_is_down (GDK_b)) {
|
||||
start_region_brush_grab (item, event);
|
||||
|
|
@ -726,7 +726,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
if (event->type == GDK_BUTTON_PRESS) {
|
||||
switch (item_type) {
|
||||
case RegionItem:
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::CopyModifier)) {
|
||||
start_region_copy_grab (item, event);
|
||||
} else {
|
||||
start_region_grab (item, event);
|
||||
|
|
@ -772,7 +772,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
|
||||
|
||||
case MouseZoom:
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
|
||||
temporal_zoom_session();
|
||||
} else {
|
||||
temporal_zoom_to_frame (true, event_frame(event));
|
||||
|
|
@ -1092,9 +1092,9 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
|||
case MouseObject:
|
||||
switch (item_type) {
|
||||
case RegionItem:
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Shift)) {
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier)) {
|
||||
raise_region ();
|
||||
} else if (Keyboard::modifier_state_equals (event->button.state, Keyboard::ModifierMask (Keyboard::Shift|Keyboard::Alt))) {
|
||||
} else if (Keyboard::modifier_state_equals (event->button.state, Keyboard::ModifierMask (Keyboard::TertiaryModifier|Keyboard::SecondaryModifier))) {
|
||||
lower_region ();
|
||||
} else {
|
||||
// Button2 click is unused
|
||||
|
|
@ -1700,7 +1700,7 @@ Editor::start_grab (GdkEvent* event, Gdk::Cursor *cursor)
|
|||
// if dragging with button2, the motion is x constrained, with Alt-button2 it is y constrained
|
||||
|
||||
if (event->button.button == 2) {
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Alt)) {
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::SecondaryModifier)) {
|
||||
drag_info.y_constrained = true;
|
||||
drag_info.x_constrained = false;
|
||||
} else {
|
||||
|
|
@ -2228,7 +2228,7 @@ Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
f_delta = copy_location->end() - copy_location->start();
|
||||
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
|
||||
move_both = true;
|
||||
}
|
||||
|
||||
|
|
@ -2655,7 +2655,7 @@ Editor::control_point_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent*
|
|||
double dx = drag_info.current_pointer_x - drag_info.last_pointer_x;
|
||||
double dy = drag_info.current_pointer_y - drag_info.last_pointer_y;
|
||||
|
||||
if (event->button.state & Keyboard::Alt) {
|
||||
if (event->button.state & Keyboard::SecondaryModifier) {
|
||||
dx *= 0.1;
|
||||
dy *= 0.1;
|
||||
}
|
||||
|
|
@ -2702,7 +2702,7 @@ Editor::control_point_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent*
|
|||
|
||||
bool push;
|
||||
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::PrimaryModifier)) {
|
||||
push = true;
|
||||
} else {
|
||||
push = false;
|
||||
|
|
@ -2724,7 +2724,7 @@ Editor::control_point_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent
|
|||
|
||||
/* just a click */
|
||||
|
||||
if ((event->type == GDK_BUTTON_RELEASE) && (event->button.button == 1) && Keyboard::modifier_state_equals (event->button.state, Keyboard::Shift)) {
|
||||
if ((event->type == GDK_BUTTON_RELEASE) && (event->button.button == 1) && Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier)) {
|
||||
reset_point_selection ();
|
||||
}
|
||||
|
||||
|
|
@ -2805,7 +2805,7 @@ Editor::line_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
double dy = drag_info.current_pointer_y - drag_info.last_pointer_y;
|
||||
|
||||
if (event->button.state & Keyboard::Alt) {
|
||||
if (event->button.state & Keyboard::SecondaryModifier) {
|
||||
dy *= 0.1;
|
||||
}
|
||||
|
||||
|
|
@ -2836,7 +2836,7 @@ Editor::line_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
bool push;
|
||||
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::PrimaryModifier)) {
|
||||
push = false;
|
||||
} else {
|
||||
push = true;
|
||||
|
|
@ -3725,7 +3725,7 @@ Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
|
|||
this is an alignment click (control used)
|
||||
*/
|
||||
|
||||
if (Keyboard::modifier_state_contains (event->state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_contains (event->state, Keyboard::PrimaryModifier)) {
|
||||
TimeAxisView* tv = &rv.get_time_axis_view();
|
||||
AudioTimeAxisView* atv = dynamic_cast<AudioTimeAxisView*>(tv);
|
||||
double speed = 1.0;
|
||||
|
|
@ -3737,11 +3737,11 @@ Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
|
|||
|
||||
if (where >= 0) {
|
||||
|
||||
if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Alt))) {
|
||||
if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::SecondaryModifier))) {
|
||||
|
||||
align_region (rv.region(), SyncPoint, (nframes_t) (where * speed));
|
||||
|
||||
} else if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Shift))) {
|
||||
} else if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||
|
||||
align_region (rv.region(), End, (nframes_t) (where * speed));
|
||||
|
||||
|
|
@ -3984,7 +3984,7 @@ Editor::start_selection_op (ArdourCanvas::Item* item, GdkEvent* event, Selection
|
|||
|
||||
switch (op) {
|
||||
case CreateSelection:
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Shift)) {
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier)) {
|
||||
drag_info.copy = true;
|
||||
} else {
|
||||
drag_info.copy = false;
|
||||
|
|
@ -4199,7 +4199,7 @@ Editor::start_trim (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
start_grab (event, trimmer_cursor);
|
||||
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
|
||||
trim_op = ContentsTrim;
|
||||
} else {
|
||||
/* These will get overridden for a point trim.*/
|
||||
|
|
@ -4326,7 +4326,7 @@ Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
{
|
||||
bool swap_direction = false;
|
||||
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
|
||||
swap_direction = true;
|
||||
}
|
||||
|
||||
|
|
@ -4629,7 +4629,7 @@ Editor::start_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event, Ran
|
|||
case CreateTransportMarker:
|
||||
case CreateCDMarker:
|
||||
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::Shift)) {
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier)) {
|
||||
drag_info.copy = true;
|
||||
} else {
|
||||
drag_info.copy = false;
|
||||
|
|
|
|||
|
|
@ -2646,7 +2646,7 @@ void
|
|||
Editor::set_region_sync_from_edit_point ()
|
||||
{
|
||||
nframes64_t where = get_preferred_edit_position ();
|
||||
ensure_entered_region_selected ();
|
||||
ensure_entered_region_selected (true);
|
||||
set_sync_point (where, selection->regions);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ Editor::region_list_display_button_press (GdkEventButton *ev)
|
|||
|
||||
case 2:
|
||||
// audition on middle click (stop audition too)
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
consider_auditioning (region);
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -497,9 +497,9 @@ GainMeter::peak_button_release (GdkEventButton* ev)
|
|||
{
|
||||
/* reset peak label */
|
||||
|
||||
if (ev->button == 1 && Keyboard::modifier_state_equals (ev->state, Keyboard::Control|Keyboard::Shift)) {
|
||||
if (ev->button == 1 && Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier|Keyboard::TertiaryModifier)) {
|
||||
ResetAllPeakDisplays ();
|
||||
} else if (ev->button == 1 && Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
} else if (ev->button == 1 && Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
Route* r;
|
||||
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||
ResetGroupPeakDisplays (r->mix_group());
|
||||
|
|
@ -712,7 +712,7 @@ GainMeter::meter_press(GdkEventButton* ev)
|
|||
// ctrl-button2 click is the midi binding click
|
||||
// button2-click is "momentary"
|
||||
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control))) {
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier))) {
|
||||
wait_for_release = true;
|
||||
old_meter_point = _route->meter_point ();
|
||||
}
|
||||
|
|
@ -720,7 +720,7 @@ GainMeter::meter_press(GdkEventButton* ev)
|
|||
|
||||
if (ev->button == 1 || ev->button == 2) {
|
||||
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Shift))) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||
|
||||
/* ctrl-shift-click applies change to all routes */
|
||||
|
||||
|
|
@ -732,7 +732,7 @@ GainMeter::meter_press(GdkEventButton* ev)
|
|||
_session.commit_reversible_command ();
|
||||
|
||||
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
|
||||
/* ctrl-click: solo mix group.
|
||||
ctrl-button2 is MIDI learn.
|
||||
|
|
|
|||
|
|
@ -43,10 +43,19 @@ guint Keyboard::delete_but = 3;
|
|||
guint Keyboard::delete_mod = GDK_SHIFT_MASK;
|
||||
guint Keyboard::snap_mod = GDK_MOD3_MASK;
|
||||
|
||||
uint32_t Keyboard::Control = GDK_CONTROL_MASK;
|
||||
uint32_t Keyboard::Shift = GDK_SHIFT_MASK;
|
||||
uint32_t Keyboard::Alt = GDK_MOD1_MASK;
|
||||
uint32_t Keyboard::Meta;
|
||||
#ifdef NATIVE_OSX_KEYS
|
||||
guint Keyboard::PrimaryModifier = GDK_MOD1_MASK; // Command
|
||||
guint Keyboard::SecondaryModifier = GDK_MOD5_MASK; // Alt/Option
|
||||
guint Keyboard::TertiaryModifier = GDK_SHIFT_MASK; // Shift
|
||||
guint Keyboard::CopyModifier = GDK_MOD5_MASK; // Alt/Option
|
||||
guint Keyboard::RangeSelectModifier = GDK_SHIFT_MASK;
|
||||
#else
|
||||
guint Keyboard::PrimaryModifier = GDK_CONTROL_MASK; // Control
|
||||
guint Keyboard::SecondaryModifier = GDK_MOD1_MASK; // Alt/Option
|
||||
guint Keyboard::TertiaryModifier = GDK_SHIFT_MASK; // Shift
|
||||
guint Keyboard::CopyModifier = GDK_CONTROL_MASK;
|
||||
guint Keyboard::RangeSelectModifier = GDK_SHIFT_MASK;
|
||||
#endif
|
||||
|
||||
Keyboard* Keyboard::_the_keyboard = 0;
|
||||
Gtk::Window* Keyboard::current_window = 0;
|
||||
|
|
@ -56,7 +65,6 @@ bool Keyboard::_some_magic_widget_has_focus = false;
|
|||
|
||||
GdkModifierType Keyboard::RelevantModifierKeyMask;
|
||||
|
||||
|
||||
void
|
||||
Keyboard::magic_widget_grab_focus ()
|
||||
{
|
||||
|
|
@ -83,17 +91,11 @@ Keyboard::Keyboard ()
|
|||
|
||||
RelevantModifierKeyMask = (GdkModifierType) gtk_accelerator_get_default_mod_mask ();
|
||||
|
||||
/* figure out Meta */
|
||||
|
||||
uint32_t possible_meta[] = { GDK_MOD2_MASK, GDK_MOD3_MASK, GDK_MOD4_MASK, GDK_MOD5_MASK, 0};
|
||||
int i;
|
||||
|
||||
for (i = 0; possible_meta[i]; ++i) {
|
||||
if (!(RelevantModifierKeyMask & possible_meta[i])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
Meta = possible_meta[i];
|
||||
RelevantModifierKeyMask = GdkModifierType (RelevantModifierKeyMask | PrimaryModifier);
|
||||
RelevantModifierKeyMask = GdkModifierType (RelevantModifierKeyMask | SecondaryModifier);
|
||||
RelevantModifierKeyMask = GdkModifierType (RelevantModifierKeyMask | TertiaryModifier);
|
||||
RelevantModifierKeyMask = GdkModifierType (RelevantModifierKeyMask | CopyModifier);
|
||||
RelevantModifierKeyMask = GdkModifierType (RelevantModifierKeyMask | RangeSelectModifier);
|
||||
|
||||
snooper_id = gtk_key_snooper_install (_snooper, (gpointer) this);
|
||||
|
||||
|
|
@ -206,7 +208,7 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
|
|||
|
||||
}
|
||||
|
||||
if (event->type == GDK_KEY_RELEASE && event->keyval == GDK_w && modifier_state_equals (event->state, Control)) {
|
||||
if (event->type == GDK_KEY_RELEASE && event->keyval == GDK_w && modifier_state_equals (event->state, PrimaryModifier)) {
|
||||
if (current_window) {
|
||||
current_window->hide ();
|
||||
current_window = 0;
|
||||
|
|
@ -286,15 +288,11 @@ Keyboard::set_delete_modifier (guint mod)
|
|||
}
|
||||
|
||||
void
|
||||
Keyboard::set_meta_modifier (guint mod)
|
||||
Keyboard::set_modifier (uint32_t newval, uint32_t& var)
|
||||
{
|
||||
/* we don't include Meta in the RelevantModifierKeyMask because its not used
|
||||
in the same way as snap_mod, delete_mod etc. the only reason we allow it to be
|
||||
set at all is that X Window has no convention for the keyboard modifier
|
||||
that Meta should use. Some Linux distributions bind NumLock to Mod2, which
|
||||
is our default Meta modifier, and this causes severe problems.
|
||||
*/
|
||||
Meta = mod;
|
||||
RelevantModifierKeyMask = GdkModifierType (RelevantModifierKeyMask & ~var);
|
||||
var = newval;
|
||||
RelevantModifierKeyMask = GdkModifierType (RelevantModifierKeyMask | var);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -353,9 +351,9 @@ Keyboard::selection_type (guint state)
|
|||
{
|
||||
/* note that there is no modifier for "Add" */
|
||||
|
||||
if (modifier_state_equals (state, Shift)) {
|
||||
if (modifier_state_equals (state, RangeSelectModifier)) {
|
||||
return Selection::Extend;
|
||||
} else if (modifier_state_equals (state, Control)) {
|
||||
} else if (modifier_state_equals (state, PrimaryModifier)) {
|
||||
return Selection::Toggle;
|
||||
} else {
|
||||
return Selection::Set;
|
||||
|
|
|
|||
|
|
@ -47,10 +47,27 @@ class Keyboard : public sigc::trackable, Stateful
|
|||
typedef vector<uint32_t> State;
|
||||
typedef uint32_t ModifierMask;
|
||||
|
||||
static uint32_t Control;
|
||||
static uint32_t Shift;
|
||||
static uint32_t Alt;
|
||||
static uint32_t Meta;
|
||||
static uint32_t PrimaryModifier;
|
||||
static uint32_t SecondaryModifier;
|
||||
static uint32_t TertiaryModifier;
|
||||
static uint32_t CopyModifier;
|
||||
static uint32_t RangeSelectModifier;
|
||||
|
||||
static void set_primary_modifier (uint32_t newval) {
|
||||
set_modifier (newval, PrimaryModifier);
|
||||
}
|
||||
static void set_secondary_modifier (uint32_t newval) {
|
||||
set_modifier (newval, SecondaryModifier);
|
||||
}
|
||||
static void set_tertiary_modifier (uint32_t newval) {
|
||||
set_modifier (newval, TertiaryModifier);
|
||||
}
|
||||
static void set_copy_modifier (uint32_t newval) {
|
||||
set_modifier (newval, CopyModifier);
|
||||
}
|
||||
static void set_range_select_modifier (uint32_t newval) {
|
||||
set_modifier (newval, RangeSelectModifier);
|
||||
}
|
||||
|
||||
bool key_is_down (uint32_t keyval);
|
||||
|
||||
|
|
@ -70,8 +87,6 @@ class Keyboard : public sigc::trackable, Stateful
|
|||
|
||||
static bool no_modifiers_active (guint state);
|
||||
|
||||
static void set_meta_modifier (guint);
|
||||
|
||||
static void set_snap_modifier (guint);
|
||||
static ModifierMask snap_modifier () { return ModifierMask (snap_mod); }
|
||||
|
||||
|
|
@ -111,6 +126,8 @@ class Keyboard : public sigc::trackable, Stateful
|
|||
static gint _snooper (GtkWidget*, GdkEventKey*, gpointer);
|
||||
gint snooper (GtkWidget*, GdkEventKey*);
|
||||
|
||||
static void set_modifier (uint32_t newval, uint32_t& variable);
|
||||
|
||||
static bool _some_magic_widget_has_focus;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include <map>
|
||||
|
||||
#include <ardour/profile.h>
|
||||
|
||||
#include <gtkmm/stock.h>
|
||||
#include <gtkmm/accelkey.h>
|
||||
#include <gtkmm/accelmap.h>
|
||||
|
|
@ -35,7 +37,7 @@ KeyEditor::KeyEditor ()
|
|||
view.set_enable_search (false);
|
||||
view.set_rules_hint (true);
|
||||
view.set_name (X_("KeyEditorTree"));
|
||||
|
||||
|
||||
view.get_selection()->signal_changed().connect (mem_fun (*this, &KeyEditor::action_selected));
|
||||
|
||||
scroller.add (view);
|
||||
|
|
@ -78,7 +80,7 @@ KeyEditor::on_key_press_event (GdkEventKey* ev)
|
|||
bool
|
||||
KeyEditor::on_key_release_event (GdkEventKey* ev)
|
||||
{
|
||||
if (!can_bind || ev->state != last_state) {
|
||||
if (ARDOUR::Profile->get_sae() || !can_bind || ev->state != last_state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ Mixer_UI::strip_button_release_event (GdkEventButton *ev, MixerStrip *strip)
|
|||
if (_selection.selected (strip->route())) {
|
||||
_selection.remove (strip->route());
|
||||
} else {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
|
||||
_selection.add (strip->route());
|
||||
} else {
|
||||
_selection.set (strip->route());
|
||||
|
|
|
|||
|
|
@ -534,7 +534,7 @@ Panner2d::on_button_release_event (GdkEventButton *ev)
|
|||
y = (int) floor (ev->y);
|
||||
state = (GdkModifierType) ev->state;
|
||||
|
||||
if (drag_is_puck && (Keyboard::modifier_state_contains (state, Keyboard::Shift))) {
|
||||
if (drag_is_puck && (Keyboard::modifier_state_contains (state, Keyboard::TertiaryModifier))) {
|
||||
|
||||
for (Targets::iterator i = pucks.begin(); i != pucks.end(); ++i) {
|
||||
Target* puck = i->second;
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ RouteTimeAxisView::playlist_modified ()
|
|||
gint
|
||||
RouteTimeAxisView::edit_click (GdkEventButton *ev)
|
||||
{
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
_route->set_edit_group (0, this);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1002,7 +1002,7 @@ RouteTimeAxisView::update_diskstream_display ()
|
|||
void
|
||||
RouteTimeAxisView::selection_click (GdkEventButton* ev)
|
||||
{
|
||||
if (Keyboard::modifier_state_equals (ev->state, (Keyboard::Shift|Keyboard::Control))) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, (Keyboard::TertiaryModifier|Keyboard::PrimaryModifier))) {
|
||||
|
||||
/* special case: select/deselect all tracks */
|
||||
if (editor.get_selection().selected (this)) {
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ RouteUI::mute_press(GdkEventButton* ev)
|
|||
// ctrl-button2 click is the midi binding click
|
||||
// button2-click is "momentary"
|
||||
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control))) {
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier))) {
|
||||
wait_for_release = true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
@ -149,7 +149,7 @@ RouteUI::mute_press(GdkEventButton* ev)
|
|||
|
||||
if (ev->button == 1 || ev->button == 2) {
|
||||
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Shift))) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||
|
||||
/* ctrl-shift-click applies change to all routes */
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ RouteUI::mute_press(GdkEventButton* ev)
|
|||
_session.add_command(cmd);
|
||||
_session.commit_reversible_command ();
|
||||
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
|
||||
/* ctrl-click applies change to the mix group.
|
||||
ctrl-button2 is MIDI learn.
|
||||
|
|
@ -218,7 +218,7 @@ RouteUI::solo_press(GdkEventButton* ev)
|
|||
// ctrl-button2 click is the midi binding click
|
||||
// button2-click is "momentary"
|
||||
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control))) {
|
||||
if (!Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier))) {
|
||||
wait_for_release = true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
@ -227,7 +227,7 @@ RouteUI::solo_press(GdkEventButton* ev)
|
|||
|
||||
if (ev->button == 1 || ev->button == 2) {
|
||||
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Shift))) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||
|
||||
/* ctrl-shift-click applies change to all routes */
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ RouteUI::solo_press(GdkEventButton* ev)
|
|||
_session.add_command (cmd);
|
||||
_session.commit_reversible_command ();
|
||||
|
||||
} else if (Keyboard::modifier_state_contains (ev->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Alt))) {
|
||||
} else if (Keyboard::modifier_state_contains (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::SecondaryModifier))) {
|
||||
|
||||
// ctrl-alt-click: exclusively solo this track, not a toggle */
|
||||
|
||||
|
|
@ -250,14 +250,14 @@ RouteUI::solo_press(GdkEventButton* ev)
|
|||
_session.add_command(cmd);
|
||||
_session.commit_reversible_command ();
|
||||
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
|
||||
|
||||
// shift-click: set this route to solo safe
|
||||
|
||||
_route->set_solo_safe (!_route->solo_safe(), this);
|
||||
wait_for_release = false;
|
||||
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
|
||||
/* ctrl-click: solo mix group.
|
||||
ctrl-button2 is MIDI learn.
|
||||
|
|
@ -307,11 +307,11 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
|
|||
|
||||
if (!ignore_toggle && is_track() && rec_enable_button) {
|
||||
|
||||
if (ev->button == 2 && Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
if (ev->button == 2 && Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
|
||||
// do nothing on midi bind event
|
||||
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Shift))) {
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||
|
||||
_session.begin_reversible_command (_("rec-enable change"));
|
||||
Session::GlobalRecordEnableStateCommand *cmd = new Session::GlobalRecordEnableStateCommand(_session, this);
|
||||
|
|
@ -326,7 +326,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
|
|||
_session.add_command(cmd);
|
||||
_session.commit_reversible_command ();
|
||||
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
|
||||
set_mix_group_rec_enable (_route, !_route->record_enabled());
|
||||
|
||||
|
|
|
|||
|
|
@ -248,14 +248,14 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
|
|||
{
|
||||
switch (ev->direction) {
|
||||
case GDK_SCROLL_UP:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
|
||||
step_height (true);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case GDK_SCROLL_DOWN:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
|
||||
step_height (false);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ class PluginManager {
|
|||
int ladspa_discover (std::string path);
|
||||
|
||||
std::string get_ladspa_category (uint32_t id);
|
||||
std::vector<uint32_t> ladspa_plugin_whitelist;
|
||||
|
||||
static PluginManager* _manager; // singleton
|
||||
};
|
||||
|
|
|
|||
|
|
@ -81,10 +81,23 @@ PluginManager::PluginManager ()
|
|||
vst_path = s;
|
||||
}
|
||||
|
||||
refresh ();
|
||||
if (_manager == 0) {
|
||||
_manager = this;
|
||||
}
|
||||
|
||||
/* the plugin manager is constructed too early to use Profile */
|
||||
|
||||
if (getenv ("ARDOUR_SAE")) {
|
||||
ladspa_plugin_whitelist.push_back (1203); // single band parametric
|
||||
ladspa_plugin_whitelist.push_back (1772); // caps compressor
|
||||
ladspa_plugin_whitelist.push_back (1913); // fast lookahead limiter
|
||||
ladspa_plugin_whitelist.push_back (1075); // simple RMS expander
|
||||
ladspa_plugin_whitelist.push_back (1061); // feedback delay line (max 5s)
|
||||
ladspa_plugin_whitelist.push_back (1216); // gverb
|
||||
ladspa_plugin_whitelist.push_back (2150); // tap pitch shifter
|
||||
}
|
||||
|
||||
refresh ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -245,6 +258,12 @@ PluginManager::ladspa_discover (string path)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!ladspa_plugin_whitelist.empty()) {
|
||||
if (find (ladspa_plugin_whitelist.begin(), ladspa_plugin_whitelist.end(), descriptor->UniqueID) == ladspa_plugin_whitelist.end()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
PluginInfoPtr info(new LadspaPluginInfo);
|
||||
info->name = descriptor->Name;
|
||||
info->category = get_ladspa_category(descriptor->UniqueID);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue