Browse files

Add three-finger swipe up/down for navigating commit list.

  • Loading branch information...
1 parent 0c52d3b commit 9fd956a898201437c89c52ace422ccf83c42bb18 @jpr5 committed Apr 16, 2011
Showing with 12 additions and 0 deletions.
  1. +2 −0 PBGitHistoryController.h
  2. +10 −0 PBGitHistoryController.m
View
2 PBGitHistoryController.h
@@ -110,4 +110,6 @@
- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset;
- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset;
+- (void)swipeWithEvent:(NSEvent *)event;
+
@end
View
10 PBGitHistoryController.m
@@ -844,4 +844,14 @@ - (IBAction) updateSearch:(NSSearchField *) sender {
[treeController setContent:gitTree.filteredChildren];
}
+- (void)swipeWithEvent:(NSEvent *)event {
+ if ([event deltaY] > 0) {
+ [[self commitController] selectPrevious:self];
+ } else if ([event deltaY] < 0) {
+ [[self commitController] selectNext:self];
+ } else {
+ [super swipeWithEvent:event];
+ }
+}
+
@end

0 comments on commit 9fd956a

Please sign in to comment.