Merge branch 'master' into feature/duplicate_group

This commit is contained in:
Michael Starke
2019-08-19 14:22:30 +02:00
4 changed files with 27 additions and 25 deletions

View File

@@ -809,6 +809,7 @@
4CC6DB7917D23719002C6091 /* KPKNode+IconImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KPKNode+IconImage.m"; sourceTree = "<group>"; };
4CCA7EEC1797866F00B0B55E /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/GeneralPreferences.strings; sourceTree = "<group>"; };
4CCA8E9A18D91ED9001A6754 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; };
4CCCE532230ACB73009B3D4D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/AutotypeDoctorReportViewController.strings; sourceTree = "<group>"; };
4CCCE7FF1D75CA48006AA951 /* MPArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPArrayController.h; sourceTree = "<group>"; };
4CCCE8001D75CA48006AA951 /* MPArrayController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPArrayController.m; sourceTree = "<group>"; };
4CCEDE28179F203B008402BE /* MPOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineView.h; sourceTree = "<group>"; };
@@ -976,7 +977,6 @@
78E1F8AF22E3A3DF00E738AE /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/IntegrationPreferences.strings; sourceTree = "<group>"; };
78E1F8B122E3A5D600E738AE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/AutotypeDoctorReportViewController.xib; sourceTree = "<group>"; };
78E1F8B422E3A5DB00E738AE /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/AutotypeDoctorReportViewController.strings; sourceTree = "<group>"; };
78E1F8B622E3A5E900E738AE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/AutotypeDoctorReportViewController.strings; sourceTree = "<group>"; };
78E1F8B822E3B06700E738AE /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/PickcharsView.strings; sourceTree = "<group>"; };
78E1F8BA22E3B0B700E738AE /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/PickfieldView.strings; sourceTree = "<group>"; };
78E1F8BC22E3B12300E738AE /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/OpenPanelAccessoryView.strings; sourceTree = "<group>"; };
@@ -2679,7 +2679,7 @@
children = (
78E1F8B122E3A5D600E738AE /* Base */,
78E1F8B422E3A5DB00E738AE /* ru */,
78E1F8B622E3A5E900E738AE /* en */,
4CCCE532230ACB73009B3D4D /* en */,
);
name = AutotypeDoctorReportViewController.xib;
sourceTree = "<group>";

View File

@@ -72,14 +72,14 @@
<rect key="frame" x="42" y="81" width="340" height="98"/>
<textFieldCell key="cell" controlSize="small" selectable="YES" id="7of-1z-Nfk">
<font key="font" metaFont="smallSystem"/>
<string key="title">MacPass will read every window title when Global Autotype is executed to find a match. Since macOS 10.15 Catalina it is not possible to read any window title, if the user has not granted permissions to record the screen. If you are running macOS 10.15 or higher, MacPass will try to capture the left top most pixel on your screen to initate a request to record the screen. This pixel will not be stored and processed in any way.</string>
<string key="title">MacPass will read every window title when Global Autotype is executed to find a match. Since macOS 10.15 Catalina it is not possible to read any window title, if the user has not granted permissions to record the screen. If you are running macOS 10.15 or higher, MacPass will check if it can read every window title of currently visible windows. This test will not read the actual title. The titles aren't stored or processed in any way.</string>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dek-ho-dPm">
<rect key="frame" x="38" y="33" width="256" height="32"/>
<buttonCell key="cell" type="push" title="Open Screen Sharing Preferences…" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="lgB-Ys-L9R">
<rect key="frame" x="38" y="33" width="271" height="32"/>
<buttonCell key="cell" type="push" title="Open Screen Recording Preferences…" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="lgB-Ys-L9R">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>

View File

@@ -62,27 +62,29 @@
}
- (BOOL)hasScreenRecordingPermissions:(NSError *__autoreleasing*)error {
BOOL canRecordScreen = YES;
/* macos 10.14 and lower do not require screen recording permission to get window titles */
if(@available(macos 10.15, *)) {
/*
To minimize the intrusion just make a 1px image of the upper left corner
This way there is no real possibilty to access any private data
*/
CGImageRef screenshot = CGWindowListCreateImage(
CGRectMake(0, 0, 1, 1),
kCGWindowListOptionOnScreenOnly,
kCGNullWindowID,
kCGWindowImageDefault);
BOOL canRecordScreen = !screenshot;
if(!canRecordScreen) {
CFRelease(screenshot);
if (@available(macOS 10.15, *)) {
CFArrayRef windowList = CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly, kCGNullWindowID);
NSUInteger numberOfWindows = CFArrayGetCount(windowList);
NSUInteger numberOfWindowsWithName = 0;
for(int idx = 0; idx < numberOfWindows; idx++) {
NSDictionary *windowInfo = (NSDictionary *)CFArrayGetValueAtIndex(windowList, idx);
NSString *windowName = windowInfo[(id)kCGWindowName];
if(windowName) {
numberOfWindowsWithName++;
}
else {
break; //breaking early, numberOfWindowsWithName not increased
}
}
CFRelease(windowList);
BOOL canRecordScreen = (numberOfWindows == numberOfWindowsWithName);
if(!canRecordScreen && error) {
*error = [NSError errorInDomain:MPAutotypeErrorDomain withCode:MPErrorAutotypeIsMissingScreenRecordingPermissions description:NSLocalizedString(@"ERROR_NO_PERMISSION_TO_RECORD_SCREEN", "Error description for missing screen recording permissions")];
}
return canRecordScreen;
}
return canRecordScreen;
return YES;
}
- (BOOL)hasAccessibiltyPermissions:(NSError *__autoreleasing*)error {
@@ -122,7 +124,7 @@
}
MPAutotypeDoctorReportViewController *vc = [[MPAutotypeDoctorReportViewController alloc] init];
self.reportWindow.contentViewController = vc;
[self.reportWindow center];
[self.reportWindow makeKeyAndOrderFront:vc];
}

View File

@@ -2,8 +2,8 @@
/* Class = "NSTextFieldCell"; title = "MacPass will send key press events to the system when Autotype or Global Autotype is executed. Since macOS 10.14 Mojave this is only possible, if Accessibility permissions are granted to the application."; ObjectID = "6GI-KJ-Xue"; */
"6GI-KJ-Xue.title" = "MacPass will send key press events to the system when Autotype or Global Autotype is executed. Since macOS 10.14 Mojave this is only possible, if Accessibility permissions are granted to the application.";
/* Class = "NSTextFieldCell"; title = "MacPass will read every window title when Global Autotype is executed to find a match. Since macOS 10.15 Catalina it is not possible to read any window title, if the user has not granted permissions to record the screen. If you are running macOS 10.15 or higher, MacPass will try to capture the left top most pixel on your screen to initate a request to record the screen. This pixel will not be stored and processed in any way."; ObjectID = "7of-1z-Nfk"; */
"7of-1z-Nfk.title" = "MacPass will read every window title when Global Autotype is executed to find a match. Since macOS 10.15 Catalina it is not possible to read any window title, if the user has not granted permissions to record the screen. If you are running macOS 10.15 or higher, MacPass will try to capture the left top most pixel on your screen to initate a request to record the screen. This pixel will not be stored and processed in any way.";
/* Class = "NSTextFieldCell"; title = "MacPass will read every window title when Global Autotype is executed to find a match. Since macOS 10.15 Catalina it is not possible to read any window title, if the user has not granted permissions to record the screen. If you are running macOS 10.15 or higher, MacPass will check if it can read every window title of currently visible windows. This test will not read the actual title. The titles aren't stored or processed in any way."; ObjectID = "7of-1z-Nfk"; */
"7of-1z-Nfk.title" = "MacPass will read every window title when Global Autotype is executed to find a match. Since macOS 10.15 Catalina it is not possible to read any window title, if the user has not granted permissions to record the screen. If you are running macOS 10.15 or higher, MacPass will check if it can read every window title of currently visible windows. This test will not read the actual title. The titles aren't stored or processed in any way.";
/* Class = "NSButtonCell"; title = "Open Accessibilty Preferences…"; ObjectID = "8m1-vs-pd5"; */
"8m1-vs-pd5.title" = "Open Accessibilty Preferences…";
@@ -14,5 +14,5 @@
/* Class = "NSTextFieldCell"; title = "Accessibility"; ObjectID = "aIL-8W-63g"; */
"aIL-8W-63g.title" = "Accessibility";
/* Class = "NSButtonCell"; title = "Open Screen Sharing Preferences…"; ObjectID = "lgB-Ys-L9R"; */
"lgB-Ys-L9R.title" = "Open Screen Sharing Preferences…";
/* Class = "NSButtonCell"; title = "Open Screen Recording Preferences…"; ObjectID = "lgB-Ys-L9R"; */
"lgB-Ys-L9R.title" = "Open Screen Recording Preferences…";