Introduced Autotype doctor in preparation for macOS 10.15.

This change removes the test for autotype on startup and will only check for permissoins when the pereferences are shown or when (gloabal)autotype is performed.
This commit is contained in:
Michael Starke
2019-07-09 15:39:23 +02:00
parent b1cb776e14
commit 32899cb707
23 changed files with 429 additions and 138 deletions

View File

@@ -27,7 +27,7 @@
NSString *const MPUserNotificationTypeKey = @"MPUserNotificationTypeKey";
NSString *const MPUserNotificationTypeAutotypeFeedback = @"MPUserNotificationTypeAutotypeFeedback";
NSString *const MPUserNotificationTypeAutotypeOpenDocumentRequest = @"MPUserNotificationTypeAutotypeOpenDocumentRequest";
NSString *const MPUserNotificationTypeShowAccessibiltyPreferences = @"MPUserNotificationTypeShowAccessibiltyPreferences";
NSString *const MPUserNotificationTypeRunAutotypeDoctor = @"MPUserNotificationTypeRunAutotypeDoctor";
@implementation MPUserNotificationCenterDelegate
@@ -45,8 +45,8 @@ NSString *const MPUserNotificationTypeShowAccessibiltyPreferences = @"MPUserNoti
if([notificationType isEqualToString:MPUserNotificationTypeAutotypeOpenDocumentRequest]) {
[((MPDocumentController*)NSDocumentController.sharedDocumentController) reopenLastDocument];
}
else if([notificationType isEqualToString:MPUserNotificationTypeShowAccessibiltyPreferences]) {
[MPAutotypeDoctor.defaultDoctor showPermissionCheckReport];
else if([notificationType isEqualToString:MPUserNotificationTypeRunAutotypeDoctor]) {
[MPAutotypeDoctor.defaultDoctor runChecksAndPresentResults];
}
}
@@ -55,7 +55,7 @@ NSString *const MPUserNotificationTypeShowAccessibiltyPreferences = @"MPUserNoti
if([notificationType isEqualToString:MPUserNotificationTypeAutotypeFeedback]) {
return YES;
}
if([notificationType isEqualToString:MPUserNotificationTypeShowAccessibiltyPreferences]) {
if([notificationType isEqualToString:MPUserNotificationTypeRunAutotypeDoctor]) {
return YES;
}
return NO;