Added preferences to allow for universal clipboard support. Item menu actions now should work in more scenarios

This commit is contained in:
Michael Starke
2019-02-15 11:48:54 +01:00
parent 8769f07079
commit c62e96f44a
14 changed files with 72 additions and 26 deletions

View File

@@ -372,6 +372,7 @@
4C10412A178CDD44001B5239 /* NSDate+Humanized.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+Humanized.h"; sourceTree = "<group>"; }; 4C10412A178CDD44001B5239 /* NSDate+Humanized.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+Humanized.h"; sourceTree = "<group>"; };
4C10412B178CDD44001B5239 /* NSDate+Humanized.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+Humanized.m"; sourceTree = "<group>"; }; 4C10412B178CDD44001B5239 /* NSDate+Humanized.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+Humanized.m"; sourceTree = "<group>"; };
4C15B74518BCA3B1003F8008 /* MPDocument+Search.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPDocument+Search.m"; sourceTree = "<group>"; }; 4C15B74518BCA3B1003F8008 /* MPDocument+Search.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPDocument+Search.m"; sourceTree = "<group>"; };
4C168CB02216CEC300BB1EB0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/GeneralSettings.strings; sourceTree = "<group>"; };
4C17D8E317A1C780006C8C1E /* MPDocumentWindowDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDocumentWindowDelegate.h; sourceTree = "<group>"; }; 4C17D8E317A1C780006C8C1E /* MPDocumentWindowDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDocumentWindowDelegate.h; sourceTree = "<group>"; };
4C17D8E417A1C780006C8C1E /* MPDocumentWindowDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDocumentWindowDelegate.m; sourceTree = "<group>"; }; 4C17D8E417A1C780006C8C1E /* MPDocumentWindowDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDocumentWindowDelegate.m; sourceTree = "<group>"; };
4C17F104184E630200E85625 /* 14_BatteryTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 14_BatteryTemplate.pdf; sourceTree = "<group>"; }; 4C17F104184E630200E85625 /* 14_BatteryTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 14_BatteryTemplate.pdf; sourceTree = "<group>"; };
@@ -779,7 +780,6 @@
4CC6DB7817D23719002C6091 /* KPKNode+IconImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KPKNode+IconImage.h"; sourceTree = "<group>"; }; 4CC6DB7817D23719002C6091 /* KPKNode+IconImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KPKNode+IconImage.h"; sourceTree = "<group>"; };
4CC6DB7917D23719002C6091 /* KPKNode+IconImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KPKNode+IconImage.m"; sourceTree = "<group>"; }; 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/GeneralSettings.strings; sourceTree = "<group>"; }; 4CCA7EEC1797866F00B0B55E /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/GeneralSettings.strings; sourceTree = "<group>"; };
4CCA7EEE1797867200B0B55E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/GeneralSettings.strings; sourceTree = "<group>"; };
4CCA8E9A18D91ED9001A6754 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; }; 4CCA8E9A18D91ED9001A6754 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; };
4CCCE7FF1D75CA48006AA951 /* MPArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPArrayController.h; 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>"; }; 4CCCE8001D75CA48006AA951 /* MPArrayController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPArrayController.m; sourceTree = "<group>"; };
@@ -2233,7 +2233,6 @@
children = ( children = (
4C76155F1764C0590015A1A6 /* Base */, 4C76155F1764C0590015A1A6 /* Base */,
4CCA7EEC1797866F00B0B55E /* de */, 4CCA7EEC1797866F00B0B55E /* de */,
4CCA7EEE1797867200B0B55E /* en */,
4C5CD34517D158F5000B7F38 /* fr */, 4C5CD34517D158F5000B7F38 /* fr */,
601F811118E016340028F3DE /* zh-Hans */, 601F811118E016340028F3DE /* zh-Hans */,
BD6C365819484CF40089EB37 /* nl */, BD6C365819484CF40089EB37 /* nl */,
@@ -2242,6 +2241,7 @@
4C840C471D773E5D0081F605 /* pl */, 4C840C471D773E5D0081F605 /* pl */,
4C4161041F50333B003BC0AF /* es */, 4C4161041F50333B003BC0AF /* es */,
6A74B0652076F4B40049BC29 /* sv-SE */, 6A74B0652076F4B40049BC29 /* sv-SE */,
4C168CB02216CEC300BB1EB0 /* en */,
); );
name = GeneralSettings.xib; name = GeneralSettings.xib;
sourceTree = "<group>"; sourceTree = "<group>";

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies> <dependencies>
<deployment identifier="macosx"/> <deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14313.18"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
@@ -14,6 +14,7 @@
<outlet property="idleTimeOutPopup" destination="584" id="809"/> <outlet property="idleTimeOutPopup" destination="584" id="809"/>
<outlet property="lockOnLogoutCheckButton" destination="5SP-Vi-1sn" id="yaI-LH-R5A"/> <outlet property="lockOnLogoutCheckButton" destination="5SP-Vi-1sn" id="yaI-LH-R5A"/>
<outlet property="lockOnSleepCheckButton" destination="630" id="810"/> <outlet property="lockOnSleepCheckButton" destination="630" id="810"/>
<outlet property="preventUniversalClipboardSupportCheckButton" destination="nqZ-rB-mFS" id="sbx-rl-reT"/>
<outlet property="rememberKeyFileCheckButton" destination="bSt-Wf-FNZ" id="aQm-EA-yAN"/> <outlet property="rememberKeyFileCheckButton" destination="bSt-Wf-FNZ" id="aQm-EA-yAN"/>
<outlet property="reopenLastDatabase" destination="530" id="878"/> <outlet property="reopenLastDatabase" destination="530" id="878"/>
<outlet property="view" destination="1" id="82"/> <outlet property="view" destination="1" id="82"/>
@@ -22,16 +23,16 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/> <customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1"> <customView translatesAutoresizingMaskIntoConstraints="NO" id="1">
<rect key="frame" x="0.0" y="0.0" width="400" height="391"/> <rect key="frame" x="0.0" y="0.0" width="400" height="482"/>
<subviews> <subviews>
<box autoresizesSubviews="NO" verticalHuggingPriority="500" borderType="line" title="Security" translatesAutoresizingMaskIntoConstraints="NO" id="465"> <box autoresizesSubviews="NO" verticalHuggingPriority="500" borderType="line" title="Security" translatesAutoresizingMaskIntoConstraints="NO" id="465">
<rect key="frame" x="17" y="16" width="366" height="266"/> <rect key="frame" x="17" y="16" width="366" height="357"/>
<view key="contentView" id="mNh-3L-Z6E"> <view key="contentView" id="mNh-3L-Z6E">
<rect key="frame" x="3" y="3" width="360" height="248"/> <rect key="frame" x="3" y="3" width="360" height="339"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="431"> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="431">
<rect key="frame" x="14" y="220" width="120" height="17"/> <rect key="frame" x="14" y="311" width="120" height="17"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="17" id="803"/> <constraint firstAttribute="height" constant="17" id="803"/>
</constraints> </constraints>
@@ -42,7 +43,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="419"> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="419">
<rect key="frame" x="177" y="217" width="170" height="21"/> <rect key="frame" x="177" y="308" width="170" height="21"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="165" id="877"/> <constraint firstAttribute="width" constant="165" id="877"/>
</constraints> </constraints>
@@ -63,7 +64,7 @@
</popUpButtonCell> </popUpButtonCell>
</popUpButton> </popUpButton>
<button verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="447"> <button verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="447">
<rect key="frame" x="29" y="196" width="164" height="18"/> <rect key="frame" x="29" y="287" width="164" height="18"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="14" id="773"/> <constraint firstAttribute="height" constant="14" id="773"/>
</constraints> </constraints>
@@ -112,7 +113,7 @@
</buttonCell> </buttonCell>
</button> </button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5cV-xX-SUU"> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5cV-xX-SUU">
<rect key="frame" x="14" y="41" width="332" height="56"/> <rect key="frame" x="18" y="41" width="324" height="56"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="ACh-7H-42N"> <textFieldCell key="cell" sendsActionOnEndEditing="YES" id="ACh-7H-42N">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
<string key="title">Enabling this compromises security. If enabled, your preferences will contain mappings from database to keyfile. Key locations for databases without a password will not be saved.</string> <string key="title">Enabling this compromises security. If enabled, your preferences will contain mappings from database to keyfile. Key locations for databases without a password will not be saved.</string>
@@ -137,17 +138,40 @@
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
</buttonCell> </buttonCell>
</button> </button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nqZ-rB-mFS">
<rect key="frame" x="14" y="262" width="242" height="18"/>
<buttonCell key="cell" type="check" title="Prevent Universal Clipboard support" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="fNy-mS-phi">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hy4-RL-dAa">
<rect key="frame" x="18" y="200" width="324" height="56"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="JGX-Tp-KJk">
<font key="font" metaFont="smallSystem"/>
<string key="title">Disabling this compromises security. If enabled, anything copied to the Clipboard in MacPass will be available on your connected iOS devices. You should clear the clipboard on those devices manually.</string>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="5cV-xX-SUU" firstAttribute="leading" secondItem="mNh-3L-Z6E" secondAttribute="leading" constant="20" symbolic="YES" id="1jw-nb-bAB"/>
<constraint firstItem="584" firstAttribute="top" secondItem="hy4-RL-dAa" secondAttribute="bottom" constant="8" symbolic="YES" id="SV7-PD-nId"/>
<constraint firstItem="bSt-Wf-FNZ" firstAttribute="top" secondItem="5SP-Vi-1sn" secondAttribute="bottom" constant="11" id="WUG-Uf-FCO"/> <constraint firstItem="bSt-Wf-FNZ" firstAttribute="top" secondItem="5SP-Vi-1sn" secondAttribute="bottom" constant="11" id="WUG-Uf-FCO"/>
<constraint firstItem="5SP-Vi-1sn" firstAttribute="leading" secondItem="447" secondAttribute="leading" id="Ylr-aA-jaD"/> <constraint firstItem="5SP-Vi-1sn" firstAttribute="leading" secondItem="447" secondAttribute="leading" id="Ylr-aA-jaD"/>
<constraint firstItem="hy4-RL-dAa" firstAttribute="top" secondItem="nqZ-rB-mFS" secondAttribute="bottom" constant="8" symbolic="YES" id="a3i-tc-gUU"/>
<constraint firstItem="5SP-Vi-1sn" firstAttribute="top" secondItem="630" secondAttribute="bottom" constant="6" symbolic="YES" id="acg-vp-LeB"/> <constraint firstItem="5SP-Vi-1sn" firstAttribute="top" secondItem="630" secondAttribute="bottom" constant="6" symbolic="YES" id="acg-vp-LeB"/>
<constraint firstItem="nqZ-rB-mFS" firstAttribute="top" secondItem="447" secondAttribute="bottom" constant="11" id="qLm-ih-A04"/>
<constraint firstAttribute="trailing" secondItem="5cV-xX-SUU" secondAttribute="trailing" constant="20" symbolic="YES" id="qY0-io-RZ0"/>
<constraint firstAttribute="trailing" secondItem="hy4-RL-dAa" secondAttribute="trailing" constant="20" symbolic="YES" id="r5c-KT-eh0"/>
<constraint firstItem="hy4-RL-dAa" firstAttribute="leading" secondItem="mNh-3L-Z6E" secondAttribute="leading" constant="20" symbolic="YES" id="s4M-8w-cOl"/>
<constraint firstItem="nqZ-rB-mFS" firstAttribute="leading" secondItem="431" secondAttribute="leading" id="ufQ-bW-0gn"/>
</constraints> </constraints>
</view> </view>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="419" secondAttribute="trailing" constant="16" id="1de-jU-TAq"/> <constraint firstAttribute="trailing" secondItem="419" secondAttribute="trailing" constant="16" id="1de-jU-TAq"/>
<constraint firstAttribute="trailing" secondItem="584" secondAttribute="trailing" constant="16" id="GAz-Mn-Z2y"/> <constraint firstAttribute="trailing" secondItem="584" secondAttribute="trailing" constant="16" id="GAz-Mn-Z2y"/>
<constraint firstItem="5cV-xX-SUU" firstAttribute="trailing" secondItem="oQr-FC-HkN" secondAttribute="trailing" id="IK6-0d-s7J"/>
<constraint firstAttribute="bottom" secondItem="oQr-FC-HkN" secondAttribute="bottom" constant="11" id="M71-WV-WFc"/> <constraint firstAttribute="bottom" secondItem="oQr-FC-HkN" secondAttribute="bottom" constant="11" id="M71-WV-WFc"/>
<constraint firstItem="5cV-xX-SUU" firstAttribute="top" secondItem="bSt-Wf-FNZ" secondAttribute="bottom" constant="9" id="NYW-dJ-CHg"/> <constraint firstItem="5cV-xX-SUU" firstAttribute="top" secondItem="bSt-Wf-FNZ" secondAttribute="bottom" constant="9" id="NYW-dJ-CHg"/>
<constraint firstItem="805" firstAttribute="centerY" secondItem="584" secondAttribute="centerY" id="OOq-TD-dmj"/> <constraint firstItem="805" firstAttribute="centerY" secondItem="584" secondAttribute="centerY" id="OOq-TD-dmj"/>
@@ -161,17 +185,15 @@
<constraint firstItem="805" firstAttribute="leading" secondItem="465" secondAttribute="leading" constant="16" id="g88-lI-fu4"/> <constraint firstItem="805" firstAttribute="leading" secondItem="465" secondAttribute="leading" constant="16" id="g88-lI-fu4"/>
<constraint firstItem="447" firstAttribute="leading" secondItem="465" secondAttribute="leading" constant="31" id="gpR-Rg-VAw"/> <constraint firstItem="447" firstAttribute="leading" secondItem="465" secondAttribute="leading" constant="31" id="gpR-Rg-VAw"/>
<constraint firstItem="oQr-FC-HkN" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="465" secondAttribute="leading" constant="16" id="kZ7-HL-y2Q"/> <constraint firstItem="oQr-FC-HkN" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="465" secondAttribute="leading" constant="16" id="kZ7-HL-y2Q"/>
<constraint firstItem="5cV-xX-SUU" firstAttribute="leading" secondItem="bSt-Wf-FNZ" secondAttribute="leading" id="qhV-iB-z4e"/>
<constraint firstItem="oQr-FC-HkN" firstAttribute="top" secondItem="5cV-xX-SUU" secondAttribute="bottom" constant="8" id="qsT-Cs-vVj"/> <constraint firstItem="oQr-FC-HkN" firstAttribute="top" secondItem="5cV-xX-SUU" secondAttribute="bottom" constant="8" id="qsT-Cs-vVj"/>
<constraint firstItem="447" firstAttribute="top" secondItem="419" secondAttribute="bottom" constant="8" symbolic="YES" id="u35-aE-Ui9"/> <constraint firstItem="447" firstAttribute="top" secondItem="419" secondAttribute="bottom" constant="8" symbolic="YES" id="u35-aE-Ui9"/>
<constraint firstItem="419" firstAttribute="leading" secondItem="584" secondAttribute="leading" id="xws-PK-qQU"/> <constraint firstItem="419" firstAttribute="leading" secondItem="584" secondAttribute="leading" id="xws-PK-qQU"/>
<constraint firstItem="630" firstAttribute="leading" secondItem="447" secondAttribute="leading" id="ybt-cQ-JwG"/> <constraint firstItem="630" firstAttribute="leading" secondItem="447" secondAttribute="leading" id="ybt-cQ-JwG"/>
<constraint firstItem="805" firstAttribute="top" secondItem="447" secondAttribute="bottom" constant="8" symbolic="YES" id="ywh-V0-xuC"/>
<constraint firstItem="447" firstAttribute="top" secondItem="431" secondAttribute="bottom" constant="8" symbolic="YES" id="zkd-Hf-09b"/> <constraint firstItem="447" firstAttribute="top" secondItem="431" secondAttribute="bottom" constant="8" symbolic="YES" id="zkd-Hf-09b"/>
</constraints> </constraints>
</box> </box>
<box autoresizesSubviews="NO" verticalHuggingPriority="500" borderType="line" title="File Handling" translatesAutoresizingMaskIntoConstraints="NO" id="888"> <box autoresizesSubviews="NO" verticalHuggingPriority="500" borderType="line" title="File Handling" translatesAutoresizingMaskIntoConstraints="NO" id="888">
<rect key="frame" x="17" y="284" width="366" height="87"/> <rect key="frame" x="17" y="375" width="366" height="87"/>
<view key="contentView" id="cpg-tt-SHE"> <view key="contentView" id="cpg-tt-SHE">
<rect key="frame" x="3" y="3" width="360" height="69"/> <rect key="frame" x="3" y="3" width="360" height="69"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -225,7 +247,7 @@
<constraint firstAttribute="bottom" secondItem="465" secondAttribute="bottom" constant="20" symbolic="YES" id="uwq-az-XwJ"/> <constraint firstAttribute="bottom" secondItem="465" secondAttribute="bottom" constant="20" symbolic="YES" id="uwq-az-XwJ"/>
<constraint firstItem="465" firstAttribute="top" secondItem="cpg-tt-SHE" secondAttribute="bottom" constant="5" id="wyH-HB-i2U"/> <constraint firstItem="465" firstAttribute="top" secondItem="cpg-tt-SHE" secondAttribute="bottom" constant="5" id="wyH-HB-i2U"/>
</constraints> </constraints>
<point key="canvasLocation" x="-143" y="40"/> <point key="canvasLocation" x="-363" y="-54"/>
</customView> </customView>
</objects> </objects>
</document> </document>

View File

@@ -293,7 +293,7 @@
<constraint firstItem="178" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="pAc-di-F68"/> <constraint firstItem="178" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="pAc-di-F68"/>
<constraint firstItem="500" firstAttribute="leading" secondItem="4yb-SC-vau" secondAttribute="leading" id="xv1-5v-Ljh"/> <constraint firstItem="500" firstAttribute="leading" secondItem="4yb-SC-vau" secondAttribute="leading" id="xv1-5v-Ljh"/>
</constraints> </constraints>
<point key="canvasLocation" x="-429" y="-374"/> <point key="canvasLocation" x="-237" y="-362"/>
</customView> </customView>
</objects> </objects>
<resources> <resources>

View File

@@ -32,6 +32,8 @@ typedef NS_ENUM(NSUInteger, MPActionType) {
MPActionDelete, // Delete entry or group MPActionDelete, // Delete entry or group
MPActionCopyUsername, // copy username to pasteboard MPActionCopyUsername, // copy username to pasteboard
MPActionCopyPassword, // copy password to pasteboard MPActionCopyPassword, // copy password to pasteboard
MPActionCopyCustomAttribute, // copy a custom attribute to the pasteboard
MPActionCopyAsReference, // copy a reference to the attribute {REF:…} to the pasteboard
MPActionCopyURL, // copy url to pasteboard MPActionCopyURL, // copy url to pasteboard
MPActionOpenURL, // open url in default browser MPActionOpenURL, // open url in default browser
MPActionToggleInspector, MPActionToggleInspector,

View File

@@ -42,6 +42,8 @@
@(MPActionCopyPassword): NSStringFromSelector(@selector(copyPassword:)), @(MPActionCopyPassword): NSStringFromSelector(@selector(copyPassword:)),
@(MPActionCopyURL): NSStringFromSelector(@selector(copyURL:)), @(MPActionCopyURL): NSStringFromSelector(@selector(copyURL:)),
@(MPActionCopyUsername): NSStringFromSelector(@selector(copyUsername:)), @(MPActionCopyUsername): NSStringFromSelector(@selector(copyUsername:)),
@(MPActionCopyCustomAttribute): NSStringFromSelector(@selector(copyCustomAttribute:)),
@(MPActionCopyAsReference): NSStringFromSelector(@selector(copyAsReference:)),
@(MPActionDelete): NSStringFromSelector(@selector(delete:)), @(MPActionDelete): NSStringFromSelector(@selector(delete:)),
@(MPActionEditPassword): NSStringFromSelector(@selector(editPassword:)), @(MPActionEditPassword): NSStringFromSelector(@selector(editPassword:)),
@(MPActionOpenURL): NSStringFromSelector(@selector(openURL:)), @(MPActionOpenURL): NSStringFromSelector(@selector(openURL:)),

View File

@@ -911,6 +911,8 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
valid &= (nil != targetEntry ) && (targetEntry.url.length > 0); valid &= (nil != targetEntry ) && (targetEntry.url.length > 0);
break; break;
case MPActionPerformAutotypeForSelectedEntry: case MPActionPerformAutotypeForSelectedEntry:
case MPActionCopyCustomAttribute:
case MPActionCopyAsReference:
valid &= (nil != targetEntry); valid &= (nil != targetEntry);
break; break;
default: default:

View File

@@ -72,9 +72,11 @@
- (IBAction)performAutotypeForEntry:(id)sender; - (IBAction)performAutotypeForEntry:(id)sender;
/* actions relayed to MPEntryViewController */
- (IBAction)copyUsername:(id)sender; - (IBAction)copyUsername:(id)sender;
- (IBAction)copyPassword:(id)sender; - (IBAction)copyPassword:(id)sender;
- (IBAction)copyCustomAttribute:(id)sender; - (IBAction)copyCustomAttribute:(id)sender;
- (IBAction)copyAsReference:(id)sender;
- (IBAction)copyURL:(id)sender; - (IBAction)copyURL:(id)sender;
- (IBAction)openURL:(id)sender; - (IBAction)openURL:(id)sender;

View File

@@ -543,6 +543,8 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
[contentView layoutSubtreeIfNeeded]; [contentView layoutSubtreeIfNeeded];
} }
#pragma mark -
#pragma mark Actions forwarded to MPEntryViewController
- (void)copyUsername:(id)sender { - (void)copyUsername:(id)sender {
[self.entryViewController copyUsername:sender]; [self.entryViewController copyUsername:sender];
} }
@@ -555,6 +557,10 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
[self.entryViewController copyCustomAttribute:sender]; [self.entryViewController copyCustomAttribute:sender];
} }
- (void)copyAsReference:(id)sender {
[self.entryViewController copyAsReference:sender];
}
- (void)copyURL:(id)sender { - (void)copyURL:(id)sender {
[self.entryViewController copyURL:sender]; [self.entryViewController copyURL:sender];
} }
@@ -563,8 +569,6 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
[self.entryViewController openURL:sender]; [self.entryViewController openURL:sender];
} }
#pragma mark Validation #pragma mark Validation
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem { - (BOOL)validateMenuItem:(NSMenuItem *)menuItem {
return ([self.document validateMenuItem:menuItem]); return ([self.document validateMenuItem:menuItem]);

View File

@@ -28,6 +28,7 @@
@property (weak) IBOutlet NSButton *clearPasteboardOnQuitCheckButton; @property (weak) IBOutlet NSButton *clearPasteboardOnQuitCheckButton;
@property (weak) IBOutlet NSPopUpButton *clearPasteboardTimeoutPopup; @property (weak) IBOutlet NSPopUpButton *clearPasteboardTimeoutPopup;
@property (strong) IBOutlet NSButton *preventUniversalClipboardSupportCheckButton;
@property (weak) IBOutlet NSPopUpButton *idleTimeOutPopup; @property (weak) IBOutlet NSPopUpButton *idleTimeOutPopup;
@property (weak) IBOutlet NSButton *lockOnSleepCheckButton; @property (weak) IBOutlet NSButton *lockOnSleepCheckButton;
@property (weak) IBOutlet NSButton *lockOnLogoutCheckButton; @property (weak) IBOutlet NSButton *lockOnLogoutCheckButton;

View File

@@ -49,6 +49,7 @@ NSString *const MPGeneralSetingsIdentifier = @"GeneralSettingsTab";
[self.clearPasteboardOnQuitCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyClearPasteboardOnQuit] options:nil]; [self.clearPasteboardOnQuitCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyClearPasteboardOnQuit] options:nil];
[self.clearPasteboardTimeoutPopup bind:NSSelectedTagBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyPasteboardClearTimeout] options:nil]; [self.clearPasteboardTimeoutPopup bind:NSSelectedTagBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyPasteboardClearTimeout] options:nil];
[self.preventUniversalClipboardSupportCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyPreventUniversalClipboard] options:nil];
[self.lockOnSleepCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyLockOnSleep] options:nil]; [self.lockOnSleepCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyLockOnSleep] options:nil];
[self.lockOnLogoutCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingskeyLockOnLogout] options:nil]; [self.lockOnLogoutCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingskeyLockOnLogout] options:nil];
[self.idleTimeOutPopup bind:NSSelectedTagBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyIdleLockTimeOut] options:nil]; [self.idleTimeOutPopup bind:NSSelectedTagBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyIdleLockTimeOut] options:nil];

View File

@@ -106,7 +106,8 @@ NSString *const MPPasteBoardControllerDidClearClipboard = @"com.hicknhack.macpas
- (void)copyObjectsWithoutTimeout:(NSArray<id<NSPasteboardWriting>> *)objects { - (void)copyObjectsWithoutTimeout:(NSArray<id<NSPasteboardWriting>> *)objects {
if(@available(macOS 10.12, *)) { if(@available(macOS 10.12, *)) {
[NSPasteboard.generalPasteboard prepareForNewContentsWithOptions:NSPasteboardContentsCurrentHostOnly]; NSPasteboardContentsOptions options = [NSUserDefaults.standardUserDefaults boolForKey:kMPSettingsKeyPreventUniversalClipboard] ? NSPasteboardContentsCurrentHostOnly : 0;
[NSPasteboard.generalPasteboard prepareForNewContentsWithOptions:options];
} }
else { else {
[NSPasteboard.generalPasteboard clearContents]; [NSPasteboard.generalPasteboard clearContents];

View File

@@ -25,6 +25,7 @@
/* Clipboard */ /* Clipboard */
APPKIT_EXTERN NSString *const kMPSettingsKeyPasteboardClearTimeout; APPKIT_EXTERN NSString *const kMPSettingsKeyPasteboardClearTimeout;
APPKIT_EXTERN NSString *const kMPSettingsKeyClearPasteboardOnQuit; APPKIT_EXTERN NSString *const kMPSettingsKeyClearPasteboardOnQuit;
APPKIT_EXTERN NSString *const kMPSettingsKeyPreventUniversalClipboard;
/* Behaviour */ /* Behaviour */
APPKIT_EXTERN NSString *const kMPSettingsKeyPasswordEncoding; APPKIT_EXTERN NSString *const kMPSettingsKeyPasswordEncoding;

View File

@@ -28,6 +28,7 @@
NSString *const kMPSettingsKeyPasteboardClearTimeout = @"ClipboardClearTimeout"; NSString *const kMPSettingsKeyPasteboardClearTimeout = @"ClipboardClearTimeout";
NSString *const kMPSettingsKeyClearPasteboardOnQuit = @"ClearClipboardOnQuit"; NSString *const kMPSettingsKeyClearPasteboardOnQuit = @"ClearClipboardOnQuit";
NSString *const kMPSettingsKeyPreventUniversalClipboard = @"PreventUniversalClipboard";
NSString *const kMPSettingsKeyBrowserBundleId = @"BrowserBundleId"; NSString *const kMPSettingsKeyBrowserBundleId = @"BrowserBundleId";
NSString *const kMPSettingsKeyOpenEmptyDatabaseOnLaunch = @"OpenEmptyDatabaseOnLaunch"; NSString *const kMPSettingsKeyOpenEmptyDatabaseOnLaunch = @"OpenEmptyDatabaseOnLaunch";
NSString *const kMPSettingsKeyReopenLastDatabaseOnLaunch = @"ReopenLastDatabaseOnLaunch"; NSString *const kMPSettingsKeyReopenLastDatabaseOnLaunch = @"ReopenLastDatabaseOnLaunch";
@@ -122,6 +123,7 @@ NSString *const kMPDepricatedSettingsKeyLoadUnsecurePlugins = @"MP
kMPSettingsKeyShowInspector: @YES, // Show the Inspector by default kMPSettingsKeyShowInspector: @YES, // Show the Inspector by default
kMPSettingsKeyPasteboardClearTimeout: @30, // 30 seconds kMPSettingsKeyPasteboardClearTimeout: @30, // 30 seconds
kMPSettingsKeyClearPasteboardOnQuit: @YES, kMPSettingsKeyClearPasteboardOnQuit: @YES,
kMPSettingsKeyPreventUniversalClipboard: @YES, // Disable Universal Clipboard by default
kMPSettingsKeyOpenEmptyDatabaseOnLaunch: @NO, kMPSettingsKeyOpenEmptyDatabaseOnLaunch: @NO,
kMPSettingsKeyReopenLastDatabaseOnLaunch: @YES, kMPSettingsKeyReopenLastDatabaseOnLaunch: @YES,
kMPSettingsKeyFileChangeStrategy: @(MPFileChangeStrategyAsk), // Ask what to do on a file change! kMPSettingsKeyFileChangeStrategy: @(MPFileChangeStrategyAsk), // Ask what to do on a file change!

View File

@@ -1,8 +1,3 @@
/* Class = "NSMenuItem"; title = "after 5 Minutes"; ObjectID = "5gh-b6-cmG"; */
"5gh-b6-cmG.title" = "after 5 Minutes";
/* Class = "NSButtonCell"; title = "Clear all stored locations"; ObjectID = "8Ri-2s-c39"; */
"8Ri-2s-c39.title" = "Clear all stored locations";
/* Class = "NSMenu"; title = "ClipboardClearInterval"; ObjectID = "421"; */ /* Class = "NSMenu"; title = "ClipboardClearInterval"; ObjectID = "421"; */
"421.title" = "ClipboardClearInterval"; "421.title" = "ClipboardClearInterval";
@@ -55,15 +50,26 @@
/* Class = "NSBox"; title = "File Handling"; ObjectID = "888"; */ /* Class = "NSBox"; title = "File Handling"; ObjectID = "888"; */
"888.title" = "File Handling"; "888.title" = "File Handling";
/* Class = "NSMenuItem"; title = "after 5 Minutes"; ObjectID = "5gh-b6-cmG"; */
"5gh-b6-cmG.title" = "after 5 Minutes";
/* Class = "NSButtonCell"; title = "Clear all stored locations"; ObjectID = "8Ri-2s-c39"; */
"8Ri-2s-c39.title" = "Clear all stored locations";
/* Class = "NSTextFieldCell"; title = "Enabling this compromises security. If enabled, your preferences will contain mappings from database to keyfile. Key locations for databases without a password will not be saved."; ObjectID = "ACh-7H-42N"; */ /* Class = "NSTextFieldCell"; title = "Enabling this compromises security. If enabled, your preferences will contain mappings from database to keyfile. Key locations for databases without a password will not be saved."; ObjectID = "ACh-7H-42N"; */
"ACh-7H-42N.title" = "Enabling this compromises security. If enabled, your preferences will contain mappings from database to keyfile. Key locations for databases without a password will not be saved."; "ACh-7H-42N.title" = "Enabling this compromises security. If enabled, your preferences will contain mappings from database to keyfile. Key locations for databases without a password will not be saved.";
/* Class = "NSButtonCell"; title = "Lock after log out"; ObjectID = "Dzn-9R-JjE"; */ /* Class = "NSButtonCell"; title = "Lock after log out"; ObjectID = "Dzn-9R-JjE"; */
"Dzn-9R-JjE.title" = "Lock after log out"; "Dzn-9R-JjE.title" = "Lock after log out";
/* Class = "NSTextFieldCell"; title = "Disabling this compromises security. If disabled, anything copied to the Clipboard in MacPass will be available on your connected iOS devices. You should clear the clipboard on those devices manually."; ObjectID = "JGX-Tp-KJk"; */
"JGX-Tp-KJk.title" = "Disabling this compromises security. If disabled, anything copied to the Clipboard in MacPass will be available on your connected iOS devices. You should clear the clipboard on those devices manually.";
/* Class = "NSTextFieldCell"; title = "If file changes:"; ObjectID = "QrK-hM-Xt1"; */ /* Class = "NSTextFieldCell"; title = "If file changes:"; ObjectID = "QrK-hM-Xt1"; */
"QrK-hM-Xt1.title" = "If file changes:"; "QrK-hM-Xt1.title" = "If file changes:";
/* Class = "NSButtonCell"; title = "Prevent Universal Clipboard support"; ObjectID = "fNy-mS-phi"; */
"fNy-mS-phi.title" = "Prevent Universal Clipboard support";
/* Class = "NSButtonCell"; title = "Remember Keyfile for Databases"; ObjectID = "r6q-He-nYU"; */ /* Class = "NSButtonCell"; title = "Remember Keyfile for Databases"; ObjectID = "r6q-He-nYU"; */
"r6q-He-nYU.title" = "Remember Keyfile for Databases"; "r6q-He-nYU.title" = "Remember Keyfile for Databases";