Skip to content

Commit

Permalink
More ARC fixes and deprecated APIs removal
Browse files Browse the repository at this point in the history
  • Loading branch information
fpillet committed Jan 9, 2019
1 parent 1f1315e commit ebe0149
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions Desktop/Classes/LoggerWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1755,12 +1755,13 @@ - (void)addMarkWithTitleBeforeMessage:(LoggerMessage *)aMessage
dateStyle:NSDateFormatterShortStyle
timeStyle:NSDateFormatterMediumStyle]];
[_markTitleField setStringValue:s];

[NSApp beginSheet:_markTitleWindow
modalForWindow:[self window]
modalDelegate:self
didEndSelector:@selector(addMarkSheetDidEnd:returnCode:contextInfo:)
contextInfo:(__bridge_retained void *)aMessage];

[self.window beginSheet:_markTitleWindow
completionHandler:^(NSModalResponse returnCode) {
if (returnCode)
[self addMarkWithTitleString:[self.markTitleField stringValue] beforeMessage:aMessage];
[self.markTitleWindow orderOut:self];
}];
}

- (IBAction)addMark:(id)sender
Expand Down Expand Up @@ -1815,14 +1816,6 @@ - (IBAction)validateAddMark:(id)sender
[NSApp endSheet:_markTitleWindow returnCode:1];
}

- (void)addMarkSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
{
LoggerMessage *message = (__bridge_transfer LoggerMessage *)contextInfo;
if (returnCode)
[self addMarkWithTitleString:[_markTitleField stringValue] beforeMessage:message];
[_markTitleWindow orderOut:self];
}

// -----------------------------------------------------------------------------
#pragma mark -
#pragma mark User Interface Items Validation
Expand Down

0 comments on commit ebe0149

Please sign in to comment.