mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 05:52:58 +00:00
Implemented workflow double click settings
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment defaultVersion="1080" identifier="macosx"/>
|
<deployment defaultVersion="1080" identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
<customObject id="-2" userLabel="File's Owner" customClass="MPGeneralSettingsController">
|
<customObject id="-2" userLabel="File's Owner" customClass="MPGeneralSettingsController">
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
<outlet property="clearPasteboardOnQuitCheckButton" destination="447" id="520"/>
|
<outlet property="clearPasteboardOnQuitCheckButton" destination="447" id="520"/>
|
||||||
<outlet property="clearPasteboardTimeoutPopup" destination="419" id="521"/>
|
<outlet property="clearPasteboardTimeoutPopup" destination="419" id="521"/>
|
||||||
<outlet property="createUntitledOnActivation" destination="879" id="920"/>
|
<outlet property="createUntitledOnActivation" destination="879" id="920"/>
|
||||||
<outlet property="doubleClickURLToLaunchCheckButton" destination="929" id="958"/>
|
|
||||||
<outlet property="idleTimeOutPopup" destination="584" id="809"/>
|
<outlet property="idleTimeOutPopup" destination="584" id="809"/>
|
||||||
<outlet property="lockOnSleepCheckButton" destination="630" id="810"/>
|
<outlet property="lockOnSleepCheckButton" destination="630" id="810"/>
|
||||||
<outlet property="remeberKeyFile" destination="bSt-Wf-FNZ" id="836-2L-bX1"/>
|
<outlet property="remeberKeyFile" destination="bSt-Wf-FNZ" id="836-2L-bX1"/>
|
||||||
@@ -22,33 +21,9 @@
|
|||||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||||
<customObject id="-3" userLabel="Application"/>
|
<customObject id="-3" userLabel="Application"/>
|
||||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1">
|
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="400" height="418"/>
|
<rect key="frame" x="0.0" y="0.0" width="400" height="360"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<box autoresizesSubviews="NO" verticalHuggingPriority="500" title="General" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="928">
|
|
||||||
<rect key="frame" x="17" y="266" width="366" height="54"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
|
||||||
<view key="contentView">
|
|
||||||
<rect key="frame" x="1" y="1" width="364" height="38"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<subviews>
|
|
||||||
<button verticalHuggingPriority="252" translatesAutoresizingMaskIntoConstraints="NO" id="929">
|
|
||||||
<rect key="frame" x="16" y="12" width="234" height="18"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
|
||||||
<buttonCell key="cell" type="check" title="Double-click entry URL to Launch" bezelStyle="regularSquare" imagePosition="left" inset="2" id="937">
|
|
||||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
</buttonCell>
|
|
||||||
</button>
|
|
||||||
</subviews>
|
|
||||||
</view>
|
|
||||||
<constraints>
|
|
||||||
<constraint firstItem="929" firstAttribute="leading" secondItem="928" secondAttribute="leading" constant="16" id="933"/>
|
|
||||||
<constraint firstAttribute="bottom" secondItem="929" secondAttribute="bottom" constant="11" id="935"/>
|
|
||||||
</constraints>
|
|
||||||
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
|
|
||||||
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
|
||||||
</box>
|
|
||||||
<box autoresizesSubviews="NO" verticalHuggingPriority="500" title="Security" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="465">
|
<box autoresizesSubviews="NO" verticalHuggingPriority="500" title="Security" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="465">
|
||||||
<rect key="frame" x="17" y="16" width="366" height="246"/>
|
<rect key="frame" x="17" y="16" width="366" height="246"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
@@ -196,7 +171,7 @@
|
|||||||
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||||
</box>
|
</box>
|
||||||
<box autoresizesSubviews="NO" verticalHuggingPriority="500" title="Startup" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="888">
|
<box autoresizesSubviews="NO" verticalHuggingPriority="500" title="Startup" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="888">
|
||||||
<rect key="frame" x="17" y="324" width="366" height="74"/>
|
<rect key="frame" x="17" y="266" width="366" height="74"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<view key="contentView">
|
<view key="contentView">
|
||||||
<rect key="frame" x="1" y="1" width="364" height="58"/>
|
<rect key="frame" x="1" y="1" width="364" height="58"/>
|
||||||
@@ -238,13 +213,9 @@
|
|||||||
<constraint firstAttribute="trailing" secondItem="888" secondAttribute="trailing" constant="20" symbolic="YES" id="893"/>
|
<constraint firstAttribute="trailing" secondItem="888" secondAttribute="trailing" constant="20" symbolic="YES" id="893"/>
|
||||||
<constraint firstItem="888" firstAttribute="top" secondItem="1" secondAttribute="top" constant="20" symbolic="YES" id="903"/>
|
<constraint firstItem="888" firstAttribute="top" secondItem="1" secondAttribute="top" constant="20" symbolic="YES" id="903"/>
|
||||||
<constraint firstAttribute="width" constant="400" id="918"/>
|
<constraint firstAttribute="width" constant="400" id="918"/>
|
||||||
<constraint firstItem="928" firstAttribute="top" secondItem="888" secondAttribute="bottom" constant="8" symbolic="YES" id="944"/>
|
<constraint firstItem="465" firstAttribute="top" secondItem="1" secondAttribute="top" constant="98" id="950"/>
|
||||||
<constraint firstItem="928" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="945"/>
|
|
||||||
<constraint firstAttribute="trailing" secondItem="928" secondAttribute="trailing" constant="20" symbolic="YES" id="947"/>
|
|
||||||
<constraint firstItem="465" firstAttribute="top" secondItem="928" secondAttribute="bottom" constant="8" symbolic="YES" id="949"/>
|
|
||||||
<constraint firstItem="465" firstAttribute="top" secondItem="1" secondAttribute="top" constant="156" id="950"/>
|
|
||||||
<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"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</customView>
|
</customView>
|
||||||
</objects>
|
</objects>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
<customObject id="-2" userLabel="File's Owner" customClass="MPWorkflowSettingsController">
|
<customObject id="-2" userLabel="File's Owner" customClass="MPWorkflowSettingsController">
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="browserPopup" destination="ehI-gq-lsb" id="YMy-L1-pQw"/>
|
<outlet property="browserPopup" destination="ehI-gq-lsb" id="YMy-L1-pQw"/>
|
||||||
|
<outlet property="doubleClickTitlePopup" destination="40" id="aKJ-q9-xjb"/>
|
||||||
|
<outlet property="doubleClickURLPopup" destination="13" id="fGP-5I-0XK"/>
|
||||||
<outlet property="view" destination="1" id="52"/>
|
<outlet property="view" destination="1" id="52"/>
|
||||||
</connections>
|
</connections>
|
||||||
</customObject>
|
</customObject>
|
||||||
@@ -36,7 +38,7 @@
|
|||||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="13">
|
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="13">
|
||||||
<rect key="frame" x="161" y="42" width="105" height="26"/>
|
<rect key="frame" x="161" y="42" width="105" height="26"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" enabled="NO" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="14">
|
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="14">
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="menu"/>
|
<font key="font" metaFont="menu"/>
|
||||||
<menu key="menu" title="OtherViews" id="15">
|
<menu key="menu" title="OtherViews" id="15">
|
||||||
@@ -59,13 +61,13 @@
|
|||||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="40">
|
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="40">
|
||||||
<rect key="frame" x="161" y="11" width="136" height="26"/>
|
<rect key="frame" x="161" y="11" width="136" height="26"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" enabled="NO" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="41">
|
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="41">
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="menu"/>
|
<font key="font" metaFont="menu"/>
|
||||||
<menu key="menu" title="OtherViews" id="42">
|
<menu key="menu" title="OtherViews" id="42">
|
||||||
<items>
|
<items>
|
||||||
<menuItem title="Opens Inspector" id="44"/>
|
<menuItem title="Opens Inspector" id="44"/>
|
||||||
<menuItem title="is Ignored" id="43"/>
|
<menuItem title="Is Ignored" id="43"/>
|
||||||
</items>
|
</items>
|
||||||
</menu>
|
</menu>
|
||||||
</popUpButtonCell>
|
</popUpButtonCell>
|
||||||
|
|||||||
@@ -660,7 +660,17 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
|
|||||||
NSTableColumn *column = [self.entryTable tableColumns][[self.entryTable clickedColumn]];
|
NSTableColumn *column = [self.entryTable tableColumns][[self.entryTable clickedColumn]];
|
||||||
NSString *identifier = [column identifier];
|
NSString *identifier = [column identifier];
|
||||||
if([identifier isEqualToString:MPEntryTableTitleColumnIdentifier]) {
|
if([identifier isEqualToString:MPEntryTableTitleColumnIdentifier]) {
|
||||||
[[self windowController] showInspector:nil];
|
MPDoubleClickTitleAction action = [[NSUserDefaults standardUserDefaults] integerForKey:kMPSettingsKeyDoubleClickTitleAction];
|
||||||
|
if (action == MPDoubleClickTitleActionInspect) {
|
||||||
|
[[self windowController] showInspector:nil];
|
||||||
|
}
|
||||||
|
else if (action == MPDoubleClickTitleActionIgnore) {
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
NSLog(@"Unknown double click action");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if([identifier isEqualToString:MPEntryTablePasswordColumnIdentifier]) {
|
else if([identifier isEqualToString:MPEntryTablePasswordColumnIdentifier]) {
|
||||||
[self copyPassword:nil];
|
[self copyPassword:nil];
|
||||||
@@ -669,10 +679,16 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
|
|||||||
[self copyUsername:nil];
|
[self copyUsername:nil];
|
||||||
}
|
}
|
||||||
else if([identifier isEqualToString:MPEntryTableURLColumnIdentifier]) {
|
else if([identifier isEqualToString:MPEntryTableURLColumnIdentifier]) {
|
||||||
if([[NSUserDefaults standardUserDefaults] boolForKey:kMPSettingsKeyDoubleClickURLToLaunch])
|
MPDoubleClickURLAction action = [[NSUserDefaults standardUserDefaults] integerForKey:kMPSettingsKeyDoubleClickURLAction];
|
||||||
|
if(action == MPDoubleClickURLActionOpen) {
|
||||||
[self openURL:nil];
|
[self openURL:nil];
|
||||||
else
|
}
|
||||||
|
else if (action == MPDoubleClickURLActionCopy) {
|
||||||
[self copyURL:nil];
|
[self copyURL:nil];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
NSLog(@"Unknown double click URL action");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// TODO: Add more actions for new columns
|
// TODO: Add more actions for new columns
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
@interface MPGeneralSettingsController : MPViewController <MPSettingsTab>
|
@interface MPGeneralSettingsController : MPViewController <MPSettingsTab>
|
||||||
|
|
||||||
@property (weak) IBOutlet NSButton *clearPasteboardOnQuitCheckButton;
|
@property (weak) IBOutlet NSButton *clearPasteboardOnQuitCheckButton;
|
||||||
@property (weak) IBOutlet NSButton *doubleClickURLToLaunchCheckButton;
|
|
||||||
@property (weak) IBOutlet NSPopUpButton *clearPasteboardTimeoutPopup;
|
@property (weak) IBOutlet NSPopUpButton *clearPasteboardTimeoutPopup;
|
||||||
@property (weak) IBOutlet NSPopUpButton *idleTimeOutPopup;
|
@property (weak) IBOutlet NSPopUpButton *idleTimeOutPopup;
|
||||||
@property (weak) IBOutlet NSButton *lockOnSleepCheckButton;
|
@property (weak) IBOutlet NSButton *lockOnSleepCheckButton;
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ NSString *const MPGeneralSetingsIdentifier = @"GeneralSettingsTab";
|
|||||||
NSUserDefaultsController *defaultsController = [NSUserDefaultsController sharedUserDefaultsController];
|
NSUserDefaultsController *defaultsController = [NSUserDefaultsController sharedUserDefaultsController];
|
||||||
|
|
||||||
[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.doubleClickURLToLaunchCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyDoubleClickURLToLaunch] 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.lockOnSleepCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyLockOnSleep] options:nil];
|
[self.lockOnSleepCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyLockOnSleep] 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];
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ APPKIT_EXTERN NSString *const kMPSettingsKeyOpenEmptyDatabaseOnLaunch;
|
|||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyReopenLastDatabaseOnLaunch;
|
APPKIT_EXTERN NSString *const kMPSettingsKeyReopenLastDatabaseOnLaunch;
|
||||||
|
|
||||||
/* URL handling */
|
/* URL handling */
|
||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyDoubleClickURLToLaunch;
|
|
||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyBrowserBundleId;
|
APPKIT_EXTERN NSString *const kMPSettingsKeyBrowserBundleId;
|
||||||
|
|
||||||
/* Server Settings */
|
/* Server Settings */
|
||||||
@@ -50,7 +49,6 @@ APPKIT_EXTERN NSString *const kMPSettingsKeyRememberKeyFilesForDatabases; //
|
|||||||
APPKIT_EXTERN NSString *const kMPSettingsKeySendCommandForControlKey; // Should MacPass swap control for command. This is usefull in a cross plattform environment
|
APPKIT_EXTERN NSString *const kMPSettingsKeySendCommandForControlKey; // Should MacPass swap control for command. This is usefull in a cross plattform environment
|
||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyEnableGlobalAutotype; // Is Global Autotype enabled?
|
APPKIT_EXTERN NSString *const kMPSettingsKeyEnableGlobalAutotype; // Is Global Autotype enabled?
|
||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyGlobalAutotypeKeyDataKey; // The stored Data for the useder defined global autotype key
|
APPKIT_EXTERN NSString *const kMPSettingsKeyGlobalAutotypeKeyDataKey; // The stored Data for the useder defined global autotype key
|
||||||
APPKIT_EXTERN NSString *const kMPDepricatedSettingsKeyDocumentsAutotypeFixNoteWasShown; // YES if Autotype fix was shown
|
|
||||||
|
|
||||||
/* Search */
|
/* Search */
|
||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyEntrySearchFilterMode;
|
APPKIT_EXTERN NSString *const kMPSettingsKeyEntrySearchFilterMode;
|
||||||
@@ -58,6 +56,20 @@ APPKIT_EXTERN NSString *const kMPSettingsKeyEntrySearchFilterMode;
|
|||||||
/* Quicklook */
|
/* Quicklook */
|
||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyEnableQuicklookPreview;
|
APPKIT_EXTERN NSString *const kMPSettingsKeyEnableQuicklookPreview;
|
||||||
|
|
||||||
|
/* Workflow */
|
||||||
|
APPKIT_EXTERN NSString *const kMPSettingsKeyDoubleClickURLAction;
|
||||||
|
APPKIT_EXTERN NSString *const kMPSettingsKeyDoubleClickTitleAction;
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSUInteger, MPDoubleClickURLAction) {
|
||||||
|
MPDoubleClickURLActionCopy,
|
||||||
|
MPDoubleClickURLActionOpen,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSUInteger, MPDoubleClickTitleAction) {
|
||||||
|
MPDoubleClickTitleActionInspect,
|
||||||
|
MPDoubleClickTitleActionIgnore,
|
||||||
|
};
|
||||||
|
|
||||||
/* Password Generation */
|
/* Password Generation */
|
||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyCopyGeneratedPasswordToClipboard;
|
APPKIT_EXTERN NSString *const kMPSettingsKeyCopyGeneratedPasswordToClipboard;
|
||||||
APPKIT_EXTERN NSString *const kMPSettingsKeyDefaultPasswordRounds;
|
APPKIT_EXTERN NSString *const kMPSettingsKeyDefaultPasswordRounds;
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
NSString *const kMPSettingsKeyPasteboardClearTimeout = @"ClipboardClearTimeout";
|
NSString *const kMPSettingsKeyPasteboardClearTimeout = @"ClipboardClearTimeout";
|
||||||
NSString *const kMPSettingsKeyClearPasteboardOnQuit = @"ClearClipboardOnQuit";
|
NSString *const kMPSettingsKeyClearPasteboardOnQuit = @"ClearClipboardOnQuit";
|
||||||
NSString *const kMPSettingsKeyDoubleClickURLToLaunch = @"DoubleClickURLToLaunch";
|
|
||||||
NSString *const kMPSettingsKeyBrowserBundleId = @"BrowserBundleId";
|
NSString *const kMPSettingsKeyBrowserBundleId = @"BrowserBundleId";
|
||||||
NSString *const kMPSettingsKeyOpenEmptyDatabaseOnLaunch = @"OpenEmptyDatabaseOnLaunch";
|
NSString *const kMPSettingsKeyOpenEmptyDatabaseOnLaunch = @"OpenEmptyDatabaseOnLaunch";
|
||||||
NSString *const kMPSettingsKeyReopenLastDatabaseOnLaunch = @"ReopenLastDatabaseOnLaunch";
|
NSString *const kMPSettingsKeyReopenLastDatabaseOnLaunch = @"ReopenLastDatabaseOnLaunch";
|
||||||
@@ -49,10 +48,14 @@ NSString *const kMPSettingsKeyPasswordCharacterFlags = @"Passwo
|
|||||||
NSString *const kMPSettingsKeyPasswordUseCustomString = @"PasswordUseCustomString";
|
NSString *const kMPSettingsKeyPasswordUseCustomString = @"PasswordUseCustomString";
|
||||||
NSString *const kMPSettingsKeyPasswordCustomString = @"PasswordCustomString";
|
NSString *const kMPSettingsKeyPasswordCustomString = @"PasswordCustomString";
|
||||||
|
|
||||||
/* Depricated */
|
NSString *const kMPSettingsKeyDoubleClickURLAction = @"DoubleClickURLAction";
|
||||||
NSString *const kMPDepricatedSettingsKeyRememberKeyFilesForDatabases = @"kMPSettingsKeyRememberKeyFilesForDatabases";
|
NSString *const kMPSettingsKeyDoubleClickTitleAction = @"DoubleClickTitleAction";
|
||||||
NSString *const kMPDepricatedSettingsKeyLastDatabasePath = @"MPLastDatabasePath";
|
|
||||||
NSString *const kMPDepricatedSettingsKeyDocumentsAutotypeFixNoteWasShown = @"DocumentsAutotypeFixNoteWasShown";
|
/* Deprecated */
|
||||||
|
NSString *const kMPDeprecatedSettingsKeyRememberKeyFilesForDatabases = @"kMPSettingsKeyRememberKeyFilesForDatabases";
|
||||||
|
NSString *const kMPDeprecatedSettingsKeyLastDatabasePath = @"MPLastDatabasePath";
|
||||||
|
NSString *const kMPDeprecatedSettingsKeyDocumentsAutotypeFixNoteWasShown = @"DocumentsAutotypeFixNoteWasShown";
|
||||||
|
NSString *const kMPDeprecatedSettingsKeyDoubleClickURLToLaunch = @"DoubleClickURLToLaunch";
|
||||||
|
|
||||||
@implementation MPSettingsHelper
|
@implementation MPSettingsHelper
|
||||||
|
|
||||||
@@ -77,7 +80,6 @@ NSString *const kMPDepricatedSettingsKeyDocumentsAutotypeFixNoteWasShown = @"Do
|
|||||||
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,
|
||||||
kMPSettingsKeyDoubleClickURLToLaunch: @NO,
|
|
||||||
kMPSettingsKeyOpenEmptyDatabaseOnLaunch: @NO,
|
kMPSettingsKeyOpenEmptyDatabaseOnLaunch: @NO,
|
||||||
kMPSettingsKeyReopenLastDatabaseOnLaunch: @YES,
|
kMPSettingsKeyReopenLastDatabaseOnLaunch: @YES,
|
||||||
kMPSettingsKeyHttpPort: @19455,
|
kMPSettingsKeyHttpPort: @19455,
|
||||||
@@ -100,27 +102,30 @@ NSString *const kMPDepricatedSettingsKeyDocumentsAutotypeFixNoteWasShown = @"Do
|
|||||||
kMPSettingsKeyDefaultPasswordLength: @12,
|
kMPSettingsKeyDefaultPasswordLength: @12,
|
||||||
kMPSettingsKeyPasswordCharacterFlags: @(MPPasswordCharactersAll),
|
kMPSettingsKeyPasswordCharacterFlags: @(MPPasswordCharactersAll),
|
||||||
kMPSettingsKeyPasswordUseCustomString: @NO,
|
kMPSettingsKeyPasswordUseCustomString: @NO,
|
||||||
kMPSettingsKeyPasswordCustomString: @""
|
kMPSettingsKeyPasswordCustomString: @"",
|
||||||
|
kMPSettingsKeyDoubleClickURLAction: @(MPDoubleClickURLActionCopy),
|
||||||
|
kMPSettingsKeyDoubleClickTitleAction: @(MPDoubleClickTitleActionInspect)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
return standardDefaults;
|
return standardDefaults;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSArray *)_depircatedSettingsKeys {
|
+ (NSArray *)_deprecatedSettingsKeys {
|
||||||
static NSArray *depircatedSettings;
|
static NSArray *deprecatedSettings;
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
depircatedSettings = @[ kMPDepricatedSettingsKeyRememberKeyFilesForDatabases,
|
deprecatedSettings = @[ kMPDeprecatedSettingsKeyRememberKeyFilesForDatabases,
|
||||||
kMPDepricatedSettingsKeyLastDatabasePath,
|
kMPDeprecatedSettingsKeyLastDatabasePath,
|
||||||
kMPDepricatedSettingsKeyDocumentsAutotypeFixNoteWasShown ];
|
kMPDeprecatedSettingsKeyDocumentsAutotypeFixNoteWasShown,
|
||||||
|
kMPDeprecatedSettingsKeyDoubleClickURLToLaunch ];
|
||||||
});
|
});
|
||||||
return depircatedSettings;
|
return deprecatedSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
+ (void)_removeObsolteValues {
|
+ (void)_removeObsolteValues {
|
||||||
/* Clear old style values */
|
/* Clear old style values */
|
||||||
for(NSString *key in [self _depircatedSettingsKeys]) {
|
for(NSString *key in [self _deprecatedSettingsKeys]) {
|
||||||
[[NSUserDefaults standardUserDefaults] removeObjectForKey:key];
|
[[NSUserDefaults standardUserDefaults] removeObjectForKey:key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
@interface MPWorkflowSettingsController : MPViewController <MPSettingsTab>
|
@interface MPWorkflowSettingsController : MPViewController <MPSettingsTab>
|
||||||
|
|
||||||
@property (weak) IBOutlet NSPopUpButton *browserPopup;
|
@property (weak) IBOutlet NSPopUpButton *browserPopup;
|
||||||
|
@property (weak) IBOutlet NSPopUpButton *doubleClickURLPopup;
|
||||||
|
@property (weak) IBOutlet NSPopUpButton *doubleClickTitlePopup;
|
||||||
|
|
||||||
- (IBAction)_showCustomBrowserSelection:(id)sender;
|
- (IBAction)_showCustomBrowserSelection:(id)sender;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)didLoadView {
|
- (void)didLoadView {
|
||||||
|
NSUserDefaultsController *defaultsController = [NSUserDefaultsController sharedUserDefaultsController];
|
||||||
|
|
||||||
|
[self.doubleClickURLPopup bind:NSSelectedIndexBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyDoubleClickURLAction] options:nil];
|
||||||
|
[self.doubleClickTitlePopup bind:NSSelectedIndexBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyDoubleClickTitleAction] options:nil];
|
||||||
|
|
||||||
[self _updateBrowserSelection];
|
[self _updateBrowserSelection];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "42"; */
|
/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "42"; */
|
||||||
"42.title" = "OtherViews";
|
"42.title" = "OtherViews";
|
||||||
|
|
||||||
/* Class = "NSMenuItem"; title = "is Ignored"; ObjectID = "43"; */
|
/* Class = "NSMenuItem"; title = "Is Ignored"; ObjectID = "43"; */
|
||||||
"43.title" = "ignorieren";
|
"43.title" = "ignorieren";
|
||||||
|
|
||||||
/* Class = "NSMenuItem"; title = "Opens Inspector"; ObjectID = "44"; */
|
/* Class = "NSMenuItem"; title = "Opens Inspector"; ObjectID = "44"; */
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "42"; */
|
/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "42"; */
|
||||||
"42.title" = "OtherViews";
|
"42.title" = "OtherViews";
|
||||||
|
|
||||||
/* Class = "NSMenuItem"; title = "is Ignored"; ObjectID = "43"; */
|
/* Class = "NSMenuItem"; title = "Is Ignored"; ObjectID = "43"; */
|
||||||
"43.title" = "is Ignored";
|
"43.title" = "Is Ignored";
|
||||||
|
|
||||||
/* Class = "NSMenuItem"; title = "Opens Inspector"; ObjectID = "44"; */
|
/* Class = "NSMenuItem"; title = "Opens Inspector"; ObjectID = "44"; */
|
||||||
"44.title" = "Opens Inspector";
|
"44.title" = "Opens Inspector";
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "42"; */
|
/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "42"; */
|
||||||
"42.title" = "OtherViews";
|
"42.title" = "OtherViews";
|
||||||
|
|
||||||
/* Class = "NSMenuItem"; title = "is Ignored"; ObjectID = "43"; */
|
/* Class = "NSMenuItem"; title = "Is Ignored"; ObjectID = "43"; */
|
||||||
"43.title" = "is Ignored";
|
"43.title" = "Is Ignored";
|
||||||
|
|
||||||
/* Class = "NSMenuItem"; title = "Opens Inspector"; ObjectID = "44"; */
|
/* Class = "NSMenuItem"; title = "Opens Inspector"; ObjectID = "44"; */
|
||||||
"44.title" = "Opens Inspector";
|
"44.title" = "Opens Inspector";
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "42"; */
|
/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "42"; */
|
||||||
"42.title" = "Overige";
|
"42.title" = "Overige";
|
||||||
|
|
||||||
/* Class = "NSMenuItem"; title = "is Ignored"; ObjectID = "43"; */
|
/* Class = "NSMenuItem"; title = "Is Ignored"; ObjectID = "43"; */
|
||||||
"43.title" = "is Genegeerd";
|
"43.title" = "Is Genegeerd";
|
||||||
|
|
||||||
/* Class = "NSMenuItem"; title = "Opens Inspector"; ObjectID = "44"; */
|
/* Class = "NSMenuItem"; title = "Opens Inspector"; ObjectID = "44"; */
|
||||||
"44.title" = "Opent Inspector";
|
"44.title" = "Opent Inspector";
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "42"; */
|
/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "42"; */
|
||||||
"42.title" = "其他视图";
|
"42.title" = "其他视图";
|
||||||
|
|
||||||
/* Class = "NSMenuItem"; title = "is Ignored"; ObjectID = "43"; */
|
/* Class = "NSMenuItem"; title = "Is Ignored"; ObjectID = "43"; */
|
||||||
"43.title" = "被忽略了";
|
"43.title" = "被忽略了";
|
||||||
|
|
||||||
/* Class = "NSMenuItem"; title = "Opens Inspector"; ObjectID = "44"; */
|
/* Class = "NSMenuItem"; title = "Opens Inspector"; ObjectID = "44"; */
|
||||||
|
|||||||
Reference in New Issue
Block a user