diff options
| author | Alan Third | 2017-09-24 22:35:21 +0100 |
|---|---|---|
| committer | Alan Third | 2017-09-24 22:47:50 +0100 |
| commit | 638f64c40a678c26d78a7d7279e6356e6e92f3fd (patch) | |
| tree | 52c87c0021a948f09e62241316022f7200eb10e5 /src | |
| parent | d93301242f38d3d9aaa55899c07496f0bdecf391 (diff) | |
| download | emacs-638f64c40a678c26d78a7d7279e6356e6e92f3fd.tar.gz emacs-638f64c40a678c26d78a7d7279e6356e6e92f3fd.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index fb3ebc963e7..f0b6a70dae3 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -6520,7 +6520,7 @@ not_in_argv (NSString *arg) | |||
| 6520 | 6520 | ||
| 6521 | /* FIXME: At the top or bottom of the buffer we should | 6521 | /* FIXME: At the top or bottom of the buffer we should |
| 6522 | * ignore momentum-phase events. */ | 6522 | * ignore momentum-phase events. */ |
| 6523 | if (! ns_touchpad_use_momentum | 6523 | if (! ns_use_mwheel_momentum |
| 6524 | && [theEvent momentumPhase] != NSEventPhaseNone) | 6524 | && [theEvent momentumPhase] != NSEventPhaseNone) |
| 6525 | return; | 6525 | return; |
| 6526 | 6526 | ||
| @@ -6529,8 +6529,8 @@ not_in_argv (NSString *arg) | |||
| 6529 | static int totalDeltaX, totalDeltaY; | 6529 | static int totalDeltaX, totalDeltaY; |
| 6530 | int lineHeight; | 6530 | int lineHeight; |
| 6531 | 6531 | ||
| 6532 | if (NUMBERP (ns_touchpad_scroll_line_height)) | 6532 | if (NUMBERP (ns_mwheel_line_height)) |
| 6533 | lineHeight = XINT (ns_touchpad_scroll_line_height); | 6533 | lineHeight = XINT (ns_mwheel_line_height); |
| 6534 | else | 6534 | else |
| 6535 | { | 6535 | { |
| 6536 | /* FIXME: Use actual line height instead of the default. */ | 6536 | /* FIXME: Use actual line height instead of the default. */ |
| @@ -6571,7 +6571,7 @@ not_in_argv (NSString *arg) | |||
| 6571 | totalDeltaX = 0; | 6571 | totalDeltaX = 0; |
| 6572 | } | 6572 | } |
| 6573 | 6573 | ||
| 6574 | if (lines > 1 && ! ns_use_system_mwheel_acceleration) | 6574 | if (lines > 1 && ! ns_use_mwheel_acceleration) |
| 6575 | lines = 1; | 6575 | lines = 1; |
| 6576 | } | 6576 | } |
| 6577 | else | 6577 | else |
| @@ -6589,7 +6589,7 @@ not_in_argv (NSString *arg) | |||
| 6589 | delta = [theEvent scrollingDeltaY]; | 6589 | delta = [theEvent scrollingDeltaY]; |
| 6590 | } | 6590 | } |
| 6591 | 6591 | ||
| 6592 | lines = (ns_use_system_mwheel_acceleration) | 6592 | lines = (ns_use_mwheel_acceleration) |
| 6593 | ? ceil (fabs (delta)) : 1; | 6593 | ? ceil (fabs (delta)) : 1; |
| 6594 | 6594 | ||
| 6595 | scrollUp = delta > 0; | 6595 | scrollUp = delta > 0; |
| @@ -9284,22 +9284,22 @@ Note that this does not apply to images. | |||
| 9284 | This variable is ignored on Mac OS X < 10.7 and GNUstep. */); | 9284 | This variable is ignored on Mac OS X < 10.7 and GNUstep. */); |
| 9285 | ns_use_srgb_colorspace = YES; | 9285 | ns_use_srgb_colorspace = YES; |
| 9286 | 9286 | ||
| 9287 | DEFVAR_BOOL ("ns-use-system-mwheel-acceleration", | 9287 | DEFVAR_BOOL ("ns-use-mwheel-acceleration", |
| 9288 | ns_use_system_mwheel_acceleration, | 9288 | ns_use_mwheel_acceleration, |
| 9289 | doc: /*Non-nil means use macOS's standard mouse wheel acceleration. | 9289 | doc: /*Non-nil means use macOS's standard mouse wheel acceleration. |
| 9290 | This variable is ignored on macOS < 10.7 and GNUstep. Default is t. */); | 9290 | This variable is ignored on macOS < 10.7 and GNUstep. Default is t. */); |
| 9291 | ns_use_system_mwheel_acceleration = YES; | 9291 | ns_use_mwheel_acceleration = YES; |
| 9292 | 9292 | ||
| 9293 | DEFVAR_LISP ("ns-touchpad-scroll-line-height", ns_touchpad_scroll_line_height, | 9293 | DEFVAR_LISP ("ns-mwheel-line-height", ns_mwheel_line_height, |
| 9294 | doc: /*The number of pixels touchpad scrolling considers a line. | 9294 | doc: /*The number of pixels touchpad scrolling considers one line. |
| 9295 | Nil or a non-number means use the default frame line height. | 9295 | Nil or a non-number means use the default frame line height. |
| 9296 | This variable is ignored on macOS < 10.7 and GNUstep. Default is nil. */); | 9296 | This variable is ignored on macOS < 10.7 and GNUstep. Default is nil. */); |
| 9297 | ns_touchpad_scroll_line_height = Qnil; | 9297 | ns_mwheel_line_height = Qnil; |
| 9298 | 9298 | ||
| 9299 | DEFVAR_BOOL ("ns-touchpad-use-momentum", ns_touchpad_use_momentum, | 9299 | DEFVAR_BOOL ("ns-use-mwheel-momentum", ns_use_mwheel_momentum, |
| 9300 | doc: /*Non-nil means touchpad scrolling uses momentum. | 9300 | doc: /*Non-nil means mouse wheel scrolling uses momentum. |
| 9301 | This variable is ignored on macOS < 10.7 and GNUstep. Default is t. */); | 9301 | This variable is ignored on macOS < 10.7 and GNUstep. Default is t. */); |
| 9302 | ns_touchpad_use_momentum = YES; | 9302 | ns_use_mwheel_momentum = YES; |
| 9303 | 9303 | ||
| 9304 | /* TODO: move to common code */ | 9304 | /* TODO: move to common code */ |
| 9305 | DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, | 9305 | DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, |