Improve new NS scrolling variable names

* src/nsterm.m (ns-use-system-mwheel-acceleration): Replace with
'ns-use-mwheel-acceleration'.
(ns-touchpad-scroll-line-height): Replace with
'ns-mwheel-line-height'.
(ns-touchpad-use-momentum): Replace with 'ns-use-mwheel-momentum'.
* etc/NEWS: Change variable names.
This commit is contained in:
Alan Third 2017-09-24 22:35:21 +01:00
parent d93301242f
commit 638f64c40a
2 changed files with 17 additions and 17 deletions

View file

@ -1890,9 +1890,9 @@ of frame decorations on macOS 10.9+.
---
** Mousewheel and trackpad scrolling on macOS 10.7+ now behaves more
like the macOS default. The new variables
'ns-use-system-mwheel-acceleration', 'ns-touchpad-scroll-line-height'
and 'ns-touchpad-use-momentum' can be used to customize the behavior.
like the macOS default. The new variables 'ns-mwheel-line-height',
'ns-use-mwheel-acceleration' and 'ns-use-mwheel-momentum' can be used
to customize the behavior.
----------------------------------------------------------------------

View file

@ -6520,7 +6520,7 @@ - (void)mouseDown: (NSEvent *)theEvent
/* FIXME: At the top or bottom of the buffer we should
* ignore momentum-phase events. */
if (! ns_touchpad_use_momentum
if (! ns_use_mwheel_momentum
&& [theEvent momentumPhase] != NSEventPhaseNone)
return;
@ -6529,8 +6529,8 @@ - (void)mouseDown: (NSEvent *)theEvent
static int totalDeltaX, totalDeltaY;
int lineHeight;
if (NUMBERP (ns_touchpad_scroll_line_height))
lineHeight = XINT (ns_touchpad_scroll_line_height);
if (NUMBERP (ns_mwheel_line_height))
lineHeight = XINT (ns_mwheel_line_height);
else
{
/* FIXME: Use actual line height instead of the default. */
@ -6571,7 +6571,7 @@ - (void)mouseDown: (NSEvent *)theEvent
totalDeltaX = 0;
}
if (lines > 1 && ! ns_use_system_mwheel_acceleration)
if (lines > 1 && ! ns_use_mwheel_acceleration)
lines = 1;
}
else
@ -6589,7 +6589,7 @@ - (void)mouseDown: (NSEvent *)theEvent
delta = [theEvent scrollingDeltaY];
}
lines = (ns_use_system_mwheel_acceleration)
lines = (ns_use_mwheel_acceleration)
? ceil (fabs (delta)) : 1;
scrollUp = delta > 0;
@ -9284,22 +9284,22 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
This variable is ignored on Mac OS X < 10.7 and GNUstep. */);
ns_use_srgb_colorspace = YES;
DEFVAR_BOOL ("ns-use-system-mwheel-acceleration",
ns_use_system_mwheel_acceleration,
DEFVAR_BOOL ("ns-use-mwheel-acceleration",
ns_use_mwheel_acceleration,
doc: /*Non-nil means use macOS's standard mouse wheel acceleration.
This variable is ignored on macOS < 10.7 and GNUstep. Default is t. */);
ns_use_system_mwheel_acceleration = YES;
ns_use_mwheel_acceleration = YES;
DEFVAR_LISP ("ns-touchpad-scroll-line-height", ns_touchpad_scroll_line_height,
doc: /*The number of pixels touchpad scrolling considers a line.
DEFVAR_LISP ("ns-mwheel-line-height", ns_mwheel_line_height,
doc: /*The number of pixels touchpad scrolling considers one line.
Nil or a non-number means use the default frame line height.
This variable is ignored on macOS < 10.7 and GNUstep. Default is nil. */);
ns_touchpad_scroll_line_height = Qnil;
ns_mwheel_line_height = Qnil;
DEFVAR_BOOL ("ns-touchpad-use-momentum", ns_touchpad_use_momentum,
doc: /*Non-nil means touchpad scrolling uses momentum.
DEFVAR_BOOL ("ns-use-mwheel-momentum", ns_use_mwheel_momentum,
doc: /*Non-nil means mouse wheel scrolling uses momentum.
This variable is ignored on macOS < 10.7 and GNUstep. Default is t. */);
ns_touchpad_use_momentum = YES;
ns_use_mwheel_momentum = YES;
/* TODO: move to common code */
DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars,