Fixed deprecation warnings

This commit is contained in:
Michael Starke
2020-02-03 17:51:59 +01:00
parent e3352efe49
commit 0e5caab72a
8 changed files with 20 additions and 20 deletions

View File

@@ -203,7 +203,7 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
savePanel.allowedFileTypes = @[(id)kUTTypeXML];
savePanel.canSelectHiddenExtension = YES;
[savePanel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) {
if(result == NSFileHandlingPanelOKButton) {
if(result == NSModalResponseOK) {
[document writeXMLToURL:savePanel.URL];
}
}];
@@ -219,7 +219,7 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
openPanel.prompt = NSLocalizedString(@"OPEN_BUTTON_IMPORT_XML_OPEN_PANEL", "Open button in the open panel to import an XML file");
openPanel.message = NSLocalizedString(@"MESSAGE_XML_OPEN_PANEL", "Message in the open panel to import an XML file");
[openPanel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) {
if(result == NSFileHandlingPanelOKButton) {
if(result == NSModalResponseOK) {
[document readXMLfromURL:openPanel.URL];
[self.splitViewController showOutline];
}
@@ -284,7 +284,7 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
openPanel.message = NSLocalizedString(@"SELECT_FILE_TO_MERGE", @"Message for the dialog to open a file for merge");
//openPanel.allowedFileTypes = @[(id)kUTTypeXML];
[openPanel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) {
if(result == NSFileHandlingPanelOKButton) {
if(result == NSModalResponseOK) {
[document mergeWithContentsFromURL:openPanel.URL key:document.compositeKey];
}
}];
@@ -504,7 +504,7 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
if(document.shouldEnforcePasswordChange) {
NSAlert *alert = [[NSAlert alloc] init];
alert.alertStyle = NSCriticalAlertStyle;
alert.alertStyle = NSAlertStyleCritical;
alert.messageText = NSLocalizedString(@"ENFORCE_PASSWORD_CHANGE_ALERT_TITLE", "Message text for the enforce password change alert");
alert.informativeText = NSLocalizedString(@"ENFORCE_PASSWORD_CHANGE_ALERT_DESCRIPTION", "Informative text for the enforce password change alert");
@@ -535,7 +535,7 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
else if(document.shouldRecommendPasswordChange) {
NSAlert *alert = [[NSAlert alloc] init];
alert.alertStyle = NSInformationalAlertStyle;
alert.alertStyle = NSAlertStyleInformational;
alert.messageText = NSLocalizedString(@"RECOMMEND_PASSWORD_CHANGE_ALERT_TITLE", "Message text for the recommend password change alert");
alert.informativeText = NSLocalizedString(@"RECOMMEND_PASSWORD_CHANGE_ALERT_DESCRIPTION", "Informative text for the recommend password change alert");