Revision: 15712
http://sourceforge.net/p/skim-app/code/15712
Author: hofman
Date: 2025-10-26 15:38:54 +0000 (Sun, 26 Oct 2025)
Log Message:
-----------
there should be no reason to implement scrollToBeginningOfDocument: and
scrollToEEndOfDocument:, they are implemented by NSTableView. No need to call
standard actions from keyDown: ourselves.
Modified Paths:
--------------
trunk/SKOutlineView.h
trunk/SKOutlineView.m
trunk/SKTableView.h
trunk/SKTableView.m
Modified: trunk/SKOutlineView.h
===================================================================
--- trunk/SKOutlineView.h 2025-10-25 17:31:29 UTC (rev 15711)
+++ trunk/SKOutlineView.h 2025-10-26 15:38:54 UTC (rev 15712)
@@ -80,9 +80,6 @@
- (void)copy:(nullable id)sender;
- (void)paste:(nullable id)sender;
-- (void)scrollToBeginningOfDocument:(nullable id)sender;
-- (void)scrollToEndOfDocument:(nullable id)sender;
-
- (void)reloadTypeSelectStrings;
- (void)noteHeightOfRowsChangedAnimating:(BOOL)animate;
Modified: trunk/SKOutlineView.m
===================================================================
--- trunk/SKOutlineView.m 2025-10-25 17:31:29 UTC (rev 15711)
+++ trunk/SKOutlineView.m 2025-10-26 15:38:54 UTC (rev 15712)
@@ -121,10 +121,6 @@
} else if ((eventChar == SKSpaceCharacter) && modifierFlags ==
NSEventModifierFlagShift) {
if (supportsQuickLook == NO)
[[self enclosingScrollView] pageUp:nil];
- } else if (eventChar == NSHomeFunctionKey && (modifierFlags &
~NSEventModifierFlagFunction) == 0) {
- [self scrollToBeginningOfDocument:nil];
- } else if (eventChar == NSEndFunctionKey && (modifierFlags &
~NSEventModifierFlagFunction) == 0) {
- [self scrollToEndOfDocument:nil];
} else if ((eventChar == NSDeleteCharacter || eventChar ==
NSDeleteFunctionKey) && modifierFlags == 0 && [self canDelete]) {
[self delete:self];
} else if (eventChar == NSLeftArrowFunctionKey && (modifierFlags &
~(NSEventModifierFlagFunction | NSEventModifierFlagNumericPad)) ==
(NSEventModifierFlagCommand | NSEventModifierFlagOption)) {
@@ -142,16 +138,6 @@
[super mouseDown:theEvent];
}
-- (void)scrollToBeginningOfDocument:(id)sender {
- if ([self numberOfRows])
- [self scrollRowToVisible:0];
-}
-
-- (void)scrollToEndOfDocument:(id)sender {
- if ([self numberOfRows])
- [self scrollRowToVisible:[self numberOfRows] - 1];
-}
-
- (BOOL)canDelete {
NSArray *items = [self selectedItems];
if ([items count] && [[self delegate]
respondsToSelector:@selector(outlineView:deleteItems:)]) {
Modified: trunk/SKTableView.h
===================================================================
--- trunk/SKTableView.h 2025-10-25 17:31:29 UTC (rev 15711)
+++ trunk/SKTableView.h 2025-10-26 15:38:54 UTC (rev 15712)
@@ -91,9 +91,6 @@
- (void)copy:(nullable id)sender;
- (void)paste:(nullable id)sender;
-- (void)scrollToBeginningOfDocument:(nullable id)sender;
-- (void)scrollToEndOfDocument:(nullable id)sender;
-
- (void)moveLeft:(nullable id)sender;
- (void)moveRight:(nullable id)sender;
Modified: trunk/SKTableView.m
===================================================================
--- trunk/SKTableView.m 2025-10-25 17:31:29 UTC (rev 15711)
+++ trunk/SKTableView.m 2025-10-26 15:38:54 UTC (rev 15712)
@@ -103,14 +103,6 @@
} else if ((eventChar == SKSpaceCharacter) && modifierFlags ==
NSEventModifierFlagShift) {
if (supportsQuickLook == NO)
[[self enclosingScrollView] pageUp:nil];
- } else if (eventChar == NSHomeFunctionKey && (modifierFlags &
~NSEventModifierFlagFunction) == 0) {
- [self scrollToBeginningOfDocument:nil];
- } else if (eventChar == NSEndFunctionKey && (modifierFlags &
~NSEventModifierFlagFunction) == 0) {
- [self scrollToEndOfDocument:nil];
- } else if (eventChar == NSLeftArrowFunctionKey && modifierFlags == 0) {
- [self moveLeft:nil];
- } else if (eventChar == NSRightArrowFunctionKey && modifierFlags == 0) {
- [self moveRight:nil];
} else if ([typeSelectHelper handleEvent:theEvent] == NO) {
[super keyDown:theEvent];
}
@@ -127,16 +119,6 @@
[super mouseDown:theEvent];
}
-- (void)scrollToBeginningOfDocument:(id)sender {
- if ([self numberOfRows])
- [self scrollRowToVisible:0];
-}
-
-- (void)scrollToEndOfDocument:(id)sender {
- if ([self numberOfRows])
- [self scrollRowToVisible:[self numberOfRows] - 1];
-}
-
- (void)moveLeft:(id)sender {
if ([[self delegate] respondsToSelector:@selector(tableViewMoveLeft:)])
[[self delegate] tableViewMoveLeft:self];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit