mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 07:27:44 +01:00
make SCROLL_{RIGHT,LEFT} work, and Alt-SCROLL_{UP,DOWN} do something sensible
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2778 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d89d589476
commit
24593ea730
2 changed files with 39 additions and 10 deletions
|
|
@ -270,17 +270,18 @@ if env['VST']:
|
|||
gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
|
||||
|
||||
if gtkardour['GTKOSX']:
|
||||
extra_sources += gtkosx_files
|
||||
gtkardour.Append (CCFLAGS="-DTOP_MENUBAR -DGTKOSX")
|
||||
gtkardour.Append (LINKFLAGS=" -framework AppKit -framework CoreAudioKit")
|
||||
|
||||
extra_sources += gtkosx_files
|
||||
gtkardour.Append (CCFLAGS="-DTOP_MENUBAR -DGTKOSX")
|
||||
gtkardour.Append (LINKFLAGS=" -framework AppKit -framework CoreAudioKit")
|
||||
|
||||
if gtkardour['AUDIOUNITS']:
|
||||
extra_sources += audiounit_files
|
||||
gtkardour.Append(CCFLAGS='-DHAVE_AUDIOUNITS')
|
||||
gtkardour.Merge([libraries['appleutility']])
|
||||
|
||||
else:
|
||||
extra_sources += x11_files
|
||||
|
||||
if gtkardour['AUDIOUNITS']:
|
||||
extra_sources += audiounit_files
|
||||
gtkardour.Append(CCFLAGS='-DHAVE_AUDIOUNITS')
|
||||
gtkardour.Merge([libraries['appleutility']])
|
||||
|
||||
if env['FFT_ANALYSIS']:
|
||||
extra_sources += fft_analysis_files
|
||||
|
|
|
|||
|
|
@ -52,8 +52,11 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
|
|||
{
|
||||
int x, y;
|
||||
double wx, wy;
|
||||
nframes_t xdelta;
|
||||
int direction = ev->direction;
|
||||
|
||||
switch (ev->direction) {
|
||||
retry:
|
||||
switch (direction) {
|
||||
case GDK_SCROLL_UP:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
//if (ev->state == GDK_CONTROL_MASK) {
|
||||
|
|
@ -75,6 +78,9 @@ 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::SecondaryModifier)) {
|
||||
direction = GDK_SCROLL_LEFT;
|
||||
goto retry;
|
||||
} 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);
|
||||
|
|
@ -90,6 +96,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
|
|||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case GDK_SCROLL_DOWN:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
//if (ev->state == GDK_CONTROL_MASK) {
|
||||
|
|
@ -106,6 +113,9 @@ 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::SecondaryModifier)) {
|
||||
direction = GDK_SCROLL_RIGHT;
|
||||
goto retry;
|
||||
} 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);
|
||||
|
|
@ -122,8 +132,26 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
|
|||
}
|
||||
break;
|
||||
|
||||
case GDK_SCROLL_LEFT:
|
||||
xdelta = (current_page_frames() / 2);
|
||||
if (leftmost_frame > xdelta) {
|
||||
reset_x_origin (leftmost_frame - xdelta);
|
||||
} else {
|
||||
reset_x_origin (0);
|
||||
}
|
||||
break;
|
||||
|
||||
case GDK_SCROLL_RIGHT:
|
||||
xdelta = (current_page_frames() / 2);
|
||||
if (max_frames - xdelta > leftmost_frame) {
|
||||
reset_x_origin (leftmost_frame + xdelta);
|
||||
} else {
|
||||
reset_x_origin (max_frames - current_page_frames());
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
/* no left/right handling yet */
|
||||
/* what? */
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue