Skip to content

Commit

Permalink
Add three-finger swipe up/down for navigating commit list.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpr5 committed Apr 16, 2011
1 parent 0c52d3b commit 9fd956a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PBGitHistoryController.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -110,4 +110,6 @@
- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset; - (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset;
- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset; - (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset;


- (void)swipeWithEvent:(NSEvent *)event;

@end @end
10 changes: 10 additions & 0 deletions PBGitHistoryController.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -844,4 +844,14 @@ - (IBAction) updateSearch:(NSSearchField *) sender {
[treeController setContent:gitTree.filteredChildren]; [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 @end

0 comments on commit 9fd956a

Please sign in to comment.