Revision: 5974
http://skim-app.svn.sourceforge.net/skim-app/?rev=5974&view=rev
Author: hofman
Date: 2009-10-31 15:49:54 +0000 (Sat, 31 Oct 2009)
Log Message:
-----------
scroll in table on (shift) space
Modified Paths:
--------------
trunk/SKOutlineView.m
trunk/SKTableView.m
Modified: trunk/SKOutlineView.m
===================================================================
--- trunk/SKOutlineView.m 2009-10-31 15:40:29 UTC (rev 5973)
+++ trunk/SKOutlineView.m 2009-10-31 15:49:54 UTC (rev 5974)
@@ -43,6 +43,8 @@
#import "NSUserDefaultsController_SKExtensions.h"
#import "SKStringConstants.h"
+#define SPACE_CHARACTER 0x20
+
static char SKOutlineViewDefaultsObservationContext;
@@ -130,6 +132,10 @@
if ((eventChar == NSNewlineCharacter || eventChar == NSEnterCharacter ||
eventChar == NSCarriageReturnCharacter) && modifierFlags == 0) {
if ([self doubleAction] == NULL || [self sendAction:[self
doubleAction] to:[self target]] == NO)
NSBeep();
+ } else if ((eventChar == SPACE_CHARACTER) && modifierFlags == 0) {
+ [[self enclosingScrollView] pageDown:nil];
+ } else if ((eventChar == SPACE_CHARACTER) && modifierFlags ==
NSShiftKeyMask) {
+ [[self enclosingScrollView] pageUp:nil];
} else if (eventChar == NSHomeFunctionKey && (modifierFlags &
~NSFunctionKeyMask) == 0) {
[self scrollToBeginningOfDocument:nil];
} else if (eventChar == NSEndFunctionKey && (modifierFlags &
~NSFunctionKeyMask) == 0) {
Modified: trunk/SKTableView.m
===================================================================
--- trunk/SKTableView.m 2009-10-31 15:40:29 UTC (rev 5973)
+++ trunk/SKTableView.m 2009-10-31 15:49:54 UTC (rev 5974)
@@ -43,6 +43,8 @@
#import "NSUserDefaultsController_SKExtensions.h"
#import "SKStringConstants.h"
+#define SPACE_CHARACTER 0x20
+
static char SKTableViewDefaultsObservationContext;
@@ -117,6 +119,10 @@
NSBeep();
} else if ((eventChar == NSDeleteCharacter || eventChar ==
NSDeleteFunctionKey) && modifierFlags == 0 && [self canDelete]) {
[self delete:self];
+ } else if ((eventChar == SPACE_CHARACTER) && modifierFlags == 0) {
+ [[self enclosingScrollView] pageDown:nil];
+ } else if ((eventChar == SPACE_CHARACTER) && modifierFlags ==
NSShiftKeyMask) {
+ [[self enclosingScrollView] pageUp:nil];
} else if (eventChar == NSHomeFunctionKey && (modifierFlags &
~NSFunctionKeyMask) == 0) {
[self scrollToBeginningOfDocument:nil];
} else if (eventChar == NSEndFunctionKey && (modifierFlags &
~NSFunctionKeyMask) == 0) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit