aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-11-22 19:45:58 +0000
committerBibiko <bibiko@eva.mpg.de>2010-11-22 19:45:58 +0000
commit9ecfa022b7c58ec178ff089b86f110552bf74d7e (patch)
tree44ea4ca63df6cb95595e045c68cb0d1d54b05c1e /Source
parent5a26675cdc8f6f93162d6753f03508a57ff3112f (diff)
downloadsequelpro-9ecfa022b7c58ec178ff089b86f110552bf74d7e.tar.gz
sequelpro-9ecfa022b7c58ec178ff089b86f110552bf74d7e.tar.bz2
sequelpro-9ecfa022b7c58ec178ff089b86f110552bf74d7e.zip
• revert to previous rev due to by mistake removed method
Diffstat (limited to 'Source')
-rw-r--r--Source/SPWindowAdditions.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/SPWindowAdditions.m b/Source/SPWindowAdditions.m
index 4514ac48..9d99de4f 100644
--- a/Source/SPWindowAdditions.m
+++ b/Source/SPWindowAdditions.m
@@ -69,4 +69,24 @@
[self setFrame:frame display:YES animate:YES];
}
+/**
+ * Three finger multi-touch right/left swipe event to go back/forward in table history.
+ */
+- (void)swipeWithEvent:(NSEvent *)anEvent
+{
+
+ if(![[self delegate] isKindOfClass:[SPWindowController class]] || ![[[self delegate] documents] count]) return;
+
+ id frontDoc = [[self delegate] selectedTableDocument];
+
+ if( frontDoc && [frontDoc isKindOfClass:[SPDatabaseDocument class]]
+ && [frontDoc valueForKeyPath:@"spHistoryControllerInstance"]
+ && ![frontDoc isWorking])
+ if([anEvent deltaX] == -1.0f)
+ [[frontDoc valueForKeyPath:@"spHistoryControllerInstance"] valueForKey:@"goForwardInHistory"];
+ else if([anEvent deltaX] == 1.0f)
+ [[frontDoc valueForKeyPath:@"spHistoryControllerInstance"] valueForKey:@"goBackInHistory"];
+}
+
+
@end