Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request nompute#9 from jasoncodes/fix-warnings
Browse files Browse the repository at this point in the history
Fix build errors and warnings
  • Loading branch information
wwwjfy authored Jun 2, 2023
2 parents d17a6b0 + 93381c5 commit d5388af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 8 additions & 2 deletions GMailinator/GMailinator.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ + (void)logAllSelectorsFromClass:(Class)cls {
* they common keyDown:.
*/
+ (void)setupClass:(Class)cls swappingKeyDownWith:(SEL)overrideSelector {
if (DEBUG) {
#ifdef DEBUG
[self logAllSelectorsFromClass:cls];
}
#endif

if (cls == nil)
return;
Expand Down Expand Up @@ -101,6 +101,8 @@ - (BOOL)performSelectorOnMessageViewer:(id)messageViewer
unichar key = [[event characters] characterAtIndex:0];
BOOL performed = YES;

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
switch (key) {
case '#': {
[messageViewer performSelector:@selector(deleteMessages:)
Expand Down Expand Up @@ -160,6 +162,7 @@ - (BOOL)performSelectorOnMessageViewer:(id)messageViewer
default:
performed = NO;
}
#pragma clang diagnostic pop
return performed;
}

Expand Down Expand Up @@ -259,11 +262,14 @@ - (void)overrideMailKeyDown:(NSEvent *)event {

// NOTE: backwards compatibility. In 10.11 and earlier,
// tableViewManager.delegate.delegate was already the message viewer.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
id messageViewer =
[messageListViewController respondsToSelector:@selector(messageViewer)]
? [messageListViewController
performSelector:@selector(messageViewer)]
: messageListViewController;
#pragma clang diagnostic pop

if (![self performSelectorOnMessageViewer:messageViewer
basedOnEvent:event]) {
Expand Down
3 changes: 3 additions & 0 deletions GMailinator/SearchPopup.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ - (void)showWithSender:sender andTitle:(NSString *)title {
// update menu items
[[submenu delegate] menuNeedsUpdate:submenu];

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
// set message handling to copy / move
if ([submenu respondsToSelector:@selector
(_sendMenuOpeningNotification:)]) { // Yosemite 10.10.2
Expand All @@ -65,6 +67,7 @@ - (void)showWithSender:sender andTitle:(NSString *)title {
(_sendMenuOpeningNotification)]) {
[submenu performSelector:@selector(_sendMenuOpeningNotification)];
}
#pragma clang diagnostic pop

// if ([p lastFolder] != nil)
// {
Expand Down

0 comments on commit d5388af

Please sign in to comment.