Skip to content

Commit 86a7fe4

Browse files
committed
warning--
1 parent dda2024 commit 86a7fe4

19 files changed

+57
-56
lines changed

Classes/Controllers/ApplicationController.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
bool started;
2121
}
2222

23-
- (IBAction)openPreferencesWindow:(id)sender;
2423
- (IBAction)showAboutPanel:(id)sender;
2524

26-
- (IBAction)installCliTool:(id)sender;
27-
2825
- (IBAction)showHelp:(id)sender;
2926
- (IBAction)showChangeLog:(id)sender;
3027
- (IBAction)reportAProblem:(id)sender;

Classes/Controllers/ApplicationController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ - (IBAction)openDocument:(id)sender {
131131
[panel setCanChooseDirectories:true];
132132

133133
[panel beginWithCompletionHandler:^(NSInteger result) {
134-
if (result == NSFileHandlingPanelOKButton) {
134+
if (result == NSModalResponseOK) {
135135
PBRepositoryDocumentController* controller = [PBRepositoryDocumentController sharedDocumentController];
136136
[controller openDocumentWithContentsOfURL:panel.URL display:true completionHandler:^(NSDocument * _Nullable document, BOOL documentWasAlreadyOpen, NSError * _Nullable error) {
137137
if (!document) {

Classes/Controllers/PBGitHistoryController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ - (IBAction) setBranchFilter:(id)sender
365365

366366
- (void)keyDown:(NSEvent*)event
367367
{
368-
if ([[event charactersIgnoringModifiers] isEqualToString: @"f"] && [event modifierFlags] & NSAlternateKeyMask && [event modifierFlags] & NSCommandKeyMask)
368+
if ([[event charactersIgnoringModifiers] isEqualToString: @"f"] && [event modifierFlags] & NSEventModifierFlagOption && [event modifierFlags] & NSCommandKeyMask)
369369
[superController.window makeFirstResponder: searchField];
370370
else
371371
[super keyDown: event];
@@ -651,7 +651,7 @@ - (NSInteger)numberOfPreviewItemsInPreviewPanel:(id)panel
651651
- (BOOL)previewPanel:(id)panel handleEvent:(NSEvent *)event
652652
{
653653
// redirect all key down events to the table view
654-
if ([event type] == NSKeyDown) {
654+
if ([event type] == NSEventTypeKeyDown) {
655655
[fileBrowser keyDown:event];
656656
return YES;
657657
}

Classes/Controllers/PBGitWindowController.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#import <Cocoa/Cocoa.h>
1010
#import "PBHistorySearchMode.h"
1111

12+
#undef GITX_DEPRECATED
13+
#define GITX_DEPRECATED
14+
1215
@class PBViewController, PBGitSidebarController, PBGitCommitController, PBGitRepository;
1316
@class RJModalRepoSheet;
1417
@class PBGitRef;

Classes/Controllers/PBGitWindowController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ - (void)showCommitHookFailedSheet:(NSString *)messageText infoText:(NSString *)i
172172
completionHandler:^(id _Nonnull sheet, NSModalResponse returnCode) {
173173
if (returnCode != NSModalResponseOK) return;
174174

175-
[sidebarController.commitViewController forceCommit:self];
175+
[self->sidebarController.commitViewController forceCommit:self];
176176
}];
177177
}
178178

@@ -372,8 +372,8 @@ - (void)performPushForBranch:(PBGitRef *)branchRef toRemote:(PBGitRef *)remoteRe
372372
NSAlert *alert = [[NSAlert alloc] init];
373373
alert.messageText = description;
374374
alert.informativeText = [NSString stringWithFormat:@"Are you sure you want to %@?", sdesc];
375-
[alert addButtonWithTitle:@"Push"];
376-
[alert addButtonWithTitle:@"Cancel"];
375+
[alert addButtonWithTitle:NSLocalizedString(@"Push", @"")];
376+
[alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"")];
377377
[alert setShowsSuppressionButton:YES];
378378

379379
[alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {

Classes/Controllers/PBHistorySearchController.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ - (void)startBackgroundSearch
435435
NSError *error = [NSError pb_errorWithDescription:desc
436436
failureReason:reason
437437
underlyingError:taskError];
438-
[historyController.windowController showErrorSheet:error];
438+
[self->historyController.windowController showErrorSheet:error];
439439
return;
440440
}
441441
[self parseBackgroundSearchResults:readData];
@@ -496,15 +496,14 @@ - (NSPanel *)rewindPanel
496496
panelRect.origin.y = windowFrame.origin.y + historyFrame.origin.y + ((historyFrame.size.height - kRewindPanelSize) / 2.0f);
497497

498498
NSPanel *panel = [[NSPanel alloc] initWithContentRect:panelRect
499-
styleMask:NSBorderlessWindowMask
499+
styleMask:NSWindowStyleMaskBorderless
500500
backing:NSBackingStoreBuffered
501501
defer:YES];
502502
[panel setIgnoresMouseEvents:YES];
503503
[panel setOneShot:YES];
504504
[panel setOpaque:NO];
505505
[panel setBackgroundColor:[NSColor clearColor]];
506506
[panel setHasShadow:NO];
507-
[panel useOptimizedDrawing:YES];
508507
[panel setAlphaValue:0.0f];
509508

510509
NSBox *box = [[NSBox alloc] initWithFrame:[[panel contentView] frame]];
@@ -551,7 +550,7 @@ - (void)showSearchRewindPanelReverse:(BOOL)isReversed
551550
NSImage *reversedRewindImage = [NSImage imageWithSize:rewindImage.size
552551
flipped:isReversed
553552
drawingHandler:^BOOL(NSRect destRect) {
554-
[rewindImage drawInRect:destRect fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];
553+
[rewindImage drawInRect:destRect fromRect:NSZeroRect operation:NSCompositingOperationCopy fraction:1.0];
555554
return YES;
556555
}];
557556
NSImageView *rewindImageView = [rewindPanel.contentView viewWithTag:kRewindPanelImageViewTag];

Classes/Controllers/PBWebHistoryController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ - (void) changeContentToMultipleSelectionMessage {
9090
}
9191
}
9292

93-
static NSDictionary *loadCommitSummary(GTRepository *repo, GTCommit *commit, BOOL (^isCanceled)());
93+
static NSDictionary *loadCommitSummary(GTRepository *repo, GTCommit *commit, BOOL (^isCanceled)(void));
9494

9595
// A GTDiffDelta's GTDiffFile does not always set the file size. See `git_diff_get_delta`.
9696
static NSUInteger reallyGetFileSize(GTRepository *repo, GTDiffFile *file) {
@@ -140,7 +140,7 @@ - (void) changeContentToCommit:(PBGitCommit *)commit
140140

141141
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
142142
NSDictionary *summary = loadCommitSummary(repo, queueCommit, ^BOOL {
143-
return gen != atomic_load(&_commitSummaryGeneration);
143+
return gen != atomic_load(&self->_commitSummaryGeneration);
144144
});
145145
if (!summary) return;
146146
NSError *err = nil;
@@ -159,7 +159,7 @@ - (void) changeContentToCommit:(PBGitCommit *)commit
159159
});
160160
}
161161

162-
static NSDictionary *loadCommitSummary(GTRepository *repo, GTCommit *commit, BOOL (^isCanceled)()) {
162+
static NSDictionary *loadCommitSummary(GTRepository *repo, GTCommit *commit, BOOL (^isCanceled)(void)) {
163163
if (isCanceled()) return nil;
164164
GTDiffFindOptionsFlags flags = GTDiffFindOptionsFlagsFindRenames;
165165
if (![PBGitDefaults showWhitespaceDifferences]) {

Classes/PBCommitList.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
#import "PBWebHistoryController.h"
1212
#import "PBHistorySearchController.h"
1313

14+
@interface PBCommitList () <NSDraggingSource>
15+
@end
16+
1417
@implementation PBCommitList
1518

1619
@synthesize mouseDownPoint;
1720
@synthesize useAdjustScroll;
1821

19-
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL) local
20-
{
22+
- (NSDragOperation)draggingSession:(NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context {
2123
return NSDragOperationCopy;
2224
}
2325

Classes/PBGraphCellInfo.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ - (NSString *)description { return [self debugDescription]; }
3535

3636
- (NSString *)debugDescription
3737
{
38-
NSMutableString *desc = [NSMutableString stringWithFormat:@"<%@: %p position: %d numColumns: %d nLines: %d sign: '%c'>",
38+
NSMutableString *desc = [NSMutableString stringWithFormat:@"<%@: %p position: %ld numColumns: %ld nLines: %ld sign: '%c'>",
3939
NSStringFromClass([self class]), self, position, numColumns, nLines, sign];
4040
for (int lineIndex = 0; lineIndex < nLines; lineIndex++) {
4141
struct PBGitGraphLine line = lines[lineIndex];

Classes/Util/ObjectiveGit+PBCategories.m

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,3 @@ @implementation GTCommit (PBCategories)
3232
@interface GTEnumerator (Private)
3333
@property (nonatomic, assign, readonly) git_revwalk *walk;
3434
@end
35-
36-
@implementation GTEnumerator (PBCategories)
37-
- (BOOL)pushReferenceName:(NSString *)refName error:(NSError **)error {
38-
int gitError = git_revwalk_push_ref(self.walk, refName.UTF8String);
39-
if (gitError != 0) {
40-
if (error) *error = [NSError git_errorFor:gitError description:@"Failed to push reference %@", refName];
41-
return NO;
42-
}
43-
return YES;
44-
}
45-
@end

0 commit comments

Comments
 (0)