File tree Expand file tree Collapse file tree 3 files changed +5
-20
lines changed Expand file tree Collapse file tree 3 files changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -168,12 +168,6 @@ - (void)loadView {
168
168
// listen for updates
169
169
[[NSNotificationCenter defaultCenter ] addObserver: self selector: @selector (_repositoryUpdatedNotification: ) name: PBGitRepositoryEventNotification object: repository];
170
170
171
- __weak typeof (self) weakSelf = self;
172
- commitList.findPanelActionBlock = ^(id sender) {
173
- __strong typeof (weakSelf) strongSelf = weakSelf;
174
- [weakSelf.view.window makeFirstResponder: strongSelf->searchField];
175
- };
176
-
177
171
[super awakeFromNib ];
178
172
}
179
173
@@ -427,6 +421,11 @@ - (void)setHistorySearch:(NSString *)searchString mode:(PBHistorySearchMode)mode
427
421
[searchController setHistorySearch: searchString mode: mode];
428
422
}
429
423
424
+ - (IBAction )performFindPanelAction : (id )sender
425
+ {
426
+ [self .windowController.window makeFirstResponder: self ->searchField];
427
+ }
428
+
430
429
// NSSearchField (actually textfields in general) prevent the normal Find operations from working. Setup custom actions for the
431
430
// next and previous menuitems (in MainMenu.nib) so they will work when the search field is active. When searching for text in
432
431
// a file make sure to call the Find panel's action method instead.
Original file line number Diff line number Diff line change 14
14
@class PBWebHistoryController;
15
15
@class PBHistorySearchController;
16
16
17
- typedef void (^PBFindPanelActionBlock)(id sender);
18
-
19
17
@interface PBCommitList : NSTableView {
20
18
__weak IBOutlet WebView * webView;
21
19
__weak IBOutlet PBWebHistoryController *webController;
@@ -29,6 +27,5 @@ typedef void(^PBFindPanelActionBlock)(id sender);
29
27
30
28
@property (readonly ) NSPoint mouseDownPoint;
31
29
@property (assign ) BOOL useAdjustScroll;
32
- @property (copy ) PBFindPanelActionBlock findPanelActionBlock;
33
30
34
31
@end
Original file line number Diff line number Diff line change @@ -154,15 +154,4 @@ - (NSMenu *)menuForEvent:(NSEvent *)event
154
154
return menu;
155
155
}
156
156
157
-
158
- #pragma mark Row highlighting
159
-
160
- - (IBAction )performFindPanelAction : (id )sender
161
- {
162
- PBFindPanelActionBlock block = self.findPanelActionBlock ;
163
- if (block) {
164
- block (sender);
165
- }
166
- }
167
-
168
157
@end
You can’t perform that action at this time.
0 commit comments