File tree 3 files changed +21
-0
lines changed
3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,15 @@ - (void)awakeFromNib
100
100
// listen for updates
101
101
[[NSNotificationCenter defaultCenter ] addObserver: self selector: @selector (_repositoryUpdatedNotification: ) name: PBGitRepositoryEventNotification object: repository];
102
102
103
+ __weak PBGitHistoryController *weakSelf = self;
104
+ commitList.findPanelActionBlock = ^(id sender){
105
+ PBGitHistoryController *controller = weakSelf;
106
+ if (!controller) {
107
+ return ;
108
+ }
109
+ [controller.view.window makeFirstResponder: controller->searchField];
110
+ };
111
+
103
112
[super awakeFromNib ];
104
113
}
105
114
Original file line number Diff line number Diff line change 12
12
13
13
@class PBWebHistoryController;
14
14
15
+ typedef void (^PBFindPanelActionBlock)(id sender);
16
+
15
17
@interface PBCommitList : NSTableView {
16
18
IBOutlet WebView * webView;
17
19
IBOutlet PBWebHistoryController *webController;
24
26
25
27
@property (readonly ) NSPoint mouseDownPoint;
26
28
@property (assign ) BOOL useAdjustScroll;
29
+ @property (copy ) PBFindPanelActionBlock findPanelActionBlock;
27
30
@end
Original file line number Diff line number Diff line change @@ -185,4 +185,13 @@ - (void)highlightSelectionInClipRect:(NSRect)tableViewClipRect
185
185
[super highlightSelectionInClipRect: tableViewClipRect];
186
186
}
187
187
188
+
189
+ - (IBAction )performFindPanelAction : (id )sender
190
+ {
191
+ PBFindPanelActionBlock block = self.findPanelActionBlock ;
192
+ if (block) {
193
+ block (sender);
194
+ }
195
+ }
196
+
188
197
@end
You can’t perform that action at this time.
0 commit comments