mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 16:22:21 +00:00
Refactored unlocking to be done via notifications not direct calls to enable background unlocking by keepasshttp
This commit is contained in:
@@ -84,14 +84,14 @@
|
|||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<scrollView autohidesScrollers="YES" horizontalLineScroll="38" horizontalPageScroll="10" verticalLineScroll="38" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="125" customClass="HNHScrollView">
|
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="125" customClass="HNHScrollView">
|
||||||
<rect key="frame" x="20" y="26" width="253" height="432"/>
|
<rect key="frame" x="20" y="26" width="253" height="432"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="F3N-QI-Di5">
|
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="F3N-QI-Di5">
|
||||||
<rect key="frame" x="1" y="1" width="251" height="430"/>
|
<rect key="frame" x="1" y="1" width="251" height="430"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowHeight="36" rowSizeStyle="automatic" viewBased="YES" id="137">
|
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="137">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="251" height="430"/>
|
<rect key="frame" x="0.0" y="0.0" width="251" height="430"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<size key="intercellSpacing" width="3" height="2"/>
|
<size key="intercellSpacing" width="3" height="2"/>
|
||||||
@@ -266,14 +266,14 @@
|
|||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<scrollView borderType="line" autohidesScrollers="YES" horizontalLineScroll="56" horizontalPageScroll="10" verticalLineScroll="56" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="180" customClass="HNHScrollView">
|
<scrollView borderType="line" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="180" customClass="HNHScrollView">
|
||||||
<rect key="frame" x="16" y="26" width="261" height="433"/>
|
<rect key="frame" x="16" y="26" width="261" height="433"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="k8G-zp-BXZ">
|
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="k8G-zp-BXZ">
|
||||||
<rect key="frame" x="1" y="1" width="259" height="431"/>
|
<rect key="frame" x="1" y="1" width="259" height="431"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" selectionHighlightStyle="none" columnSelection="YES" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="54" rowSizeStyle="automatic" viewBased="YES" id="193">
|
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" selectionHighlightStyle="none" columnSelection="YES" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="193">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="259" height="431"/>
|
<rect key="frame" x="0.0" y="0.0" width="259" height="431"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<size key="intercellSpacing" width="3" height="2"/>
|
<size key="intercellSpacing" width="3" height="2"/>
|
||||||
|
|||||||
@@ -12,6 +12,9 @@
|
|||||||
APPKIT_EXTERN NSString *const MPDocumentDidAddGroupNotification;
|
APPKIT_EXTERN NSString *const MPDocumentDidAddGroupNotification;
|
||||||
APPKIT_EXTERN NSString *const MPDocumentDidRevertNotifiation;
|
APPKIT_EXTERN NSString *const MPDocumentDidRevertNotifiation;
|
||||||
|
|
||||||
|
APPKIT_EXTERN NSString *const MPDocumentDidLockDatabaseNotification;
|
||||||
|
APPKIT_EXTERN NSString *const MPDocumentDidUnlockDatabaseNotification;
|
||||||
|
|
||||||
APPKIT_EXTERN NSString *const MPDocumentEntryKey;
|
APPKIT_EXTERN NSString *const MPDocumentEntryKey;
|
||||||
APPKIT_EXTERN NSString *const MPDocumentGroupKey;
|
APPKIT_EXTERN NSString *const MPDocumentGroupKey;
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
NSString *const MPDocumentDidAddGroupNotification = @"com.hicknhack.macpass.MPDocumentDidAddGroupNotification";
|
NSString *const MPDocumentDidAddGroupNotification = @"com.hicknhack.macpass.MPDocumentDidAddGroupNotification";
|
||||||
NSString *const MPDocumentDidRevertNotifiation = @"com.hicknhack.macpass.MPDocumentDidRevertNotifiation";
|
NSString *const MPDocumentDidRevertNotifiation = @"com.hicknhack.macpass.MPDocumentDidRevertNotifiation";
|
||||||
|
|
||||||
|
NSString *const MPDocumentDidLockDatabaseNotification = @"com.hicknhack.macpass.MPDocumentDidLockDatabaseNotification";
|
||||||
|
NSString *const MPDocumentDidUnlockDatabaseNotification = @"com.hicknhack.macpass.MPDocumentDidUnlockDatabaseNotification";
|
||||||
|
|
||||||
NSString *const MPDocumentEntryKey = @"MPDocumentEntryKey";
|
NSString *const MPDocumentEntryKey = @"MPDocumentEntryKey";
|
||||||
NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
||||||
|
|
||||||
@@ -220,7 +223,11 @@ typedef NS_ENUM(NSUInteger, MPAlertType) {
|
|||||||
|
|
||||||
self.tree = [[KPKTree alloc] initWithData:_encryptedData password:passwordData error:error];
|
self.tree = [[KPKTree alloc] initWithData:_encryptedData password:passwordData error:error];
|
||||||
|
|
||||||
return (self.tree != nil);
|
BOOL isUnlocked = (nil != self.tree);
|
||||||
|
if(isUnlocked) {
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidUnlockDatabaseNotification object:self];
|
||||||
|
}
|
||||||
|
return isUnlocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)lockDatabase:(id)sender {
|
- (void)lockDatabase:(id)sender {
|
||||||
|
|||||||
@@ -9,12 +9,15 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
@class KPKEntry;
|
@class KPKEntry;
|
||||||
|
@class MPDocument;
|
||||||
/**
|
/**
|
||||||
* Service to querey for entries
|
* Service to querey for entries
|
||||||
*/
|
*/
|
||||||
@interface MPDocumentQueryService : NSObject
|
@interface MPDocumentQueryService : NSObject
|
||||||
|
|
||||||
|
@property (readonly, weak) MPDocument *queryDocument;
|
||||||
|
@property (readonly, weak) KPKEntry *configEntry;
|
||||||
|
|
||||||
+ (MPDocumentQueryService *)sharedService;
|
+ (MPDocumentQueryService *)sharedService;
|
||||||
|
|
||||||
- (KPKEntry *)configurationEntry;
|
- (KPKEntry *)configurationEntry;
|
||||||
|
|||||||
@@ -7,14 +7,18 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "MPDocumentQueryService.h"
|
#import "MPDocumentQueryService.h"
|
||||||
|
#import "MPDocumentWindowController.h"
|
||||||
#import "MPDocument.h"
|
#import "MPDocument.h"
|
||||||
|
#import "KPKEntry.h"
|
||||||
|
|
||||||
#import "NSUUID+KeePassKit.h"
|
#import "NSUUID+KeePassKit.h"
|
||||||
|
|
||||||
@interface MPDocumentQueryService () {
|
static NSUUID *_rootUuid = nil;
|
||||||
@private
|
|
||||||
NSUUID *rootUuid;
|
@interface MPDocumentQueryService ()
|
||||||
}
|
|
||||||
|
@property (weak) MPDocument *queryDocument;
|
||||||
|
@property (weak) KPKEntry *configEntry;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@@ -36,21 +40,28 @@
|
|||||||
0x34, 0x69, 0x7a, 0x40, 0x8a, 0x5b, 0x41, 0xc0,
|
0x34, 0x69, 0x7a, 0x40, 0x8a, 0x5b, 0x41, 0xc0,
|
||||||
0x9f, 0x36, 0x89, 0x7d, 0x62, 0x3e, 0xcb, 0x31
|
0x9f, 0x36, 0x89, 0x7d, 0x62, 0x3e, 0xcb, 0x31
|
||||||
};
|
};
|
||||||
rootUuid = [[NSUUID alloc] initWithUUIDBytes:uuidBytes];
|
_rootUuid = [[NSUUID alloc] initWithUUIDBytes:uuidBytes];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (KPKEntry *)configurationEntry {
|
- (KPKEntry *)configurationEntry {
|
||||||
/*
|
if(nil != _configEntry) {
|
||||||
We are looking in all documents,
|
return _configEntry;
|
||||||
but only store the key in one.
|
}
|
||||||
*/
|
/* no config entry there, start looking for it */
|
||||||
NSArray *documents = [[NSDocumentController sharedDocumentController] documents];
|
NSArray *documents = [[NSDocumentController sharedDocumentController] documents];
|
||||||
for(MPDocument *document in documents) {
|
for(MPDocument *document in documents) {
|
||||||
KPKEntry *entry = [document findEntry:rootUuid];
|
if(document.encrypted) {
|
||||||
if(entry) {
|
NSLog(@"Skipping locked Database: %@", [document displayName]);
|
||||||
return entry;
|
/* TODO: Show input window and open db with window */
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
KPKEntry *configEntry = [document findEntry:_rootUuid];
|
||||||
|
if(nil != configEntry) {
|
||||||
|
_configEntry = configEntry;
|
||||||
|
_queryDocument = document;
|
||||||
|
return _configEntry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ typedef NS_ENUM(NSUInteger, MPAlertContext) {
|
|||||||
|
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didRevertDocument:) name:MPDocumentDidRevertNotifiation object:[self document]];
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didRevertDocument:) name:MPDocumentDidRevertNotifiation object:[self document]];
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showEntries) name:MPDocumentDidUnlockDatabaseNotification object:[self document]];
|
||||||
|
|
||||||
[_entryViewController setupNotifications:self];
|
[_entryViewController setupNotifications:self];
|
||||||
[_inspectorViewController setupNotifications:self];
|
[_inspectorViewController setupNotifications:self];
|
||||||
|
|||||||
@@ -67,9 +67,6 @@
|
|||||||
error:&error]) {
|
error:&error]) {
|
||||||
[self _showError:error];
|
[self _showError:error];
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
[windowController showEntries];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,312 +1,37 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4510" systemVersion="12F45" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<data>
|
<dependencies>
|
||||||
<int key="IBDocument.SystemTarget">1080</int>
|
<deployment defaultVersion="1080" identifier="macosx"/>
|
||||||
<string key="IBDocument.SystemVersion">12E55</string>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4510"/>
|
||||||
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
|
</dependencies>
|
||||||
<string key="IBDocument.AppKitVersion">1187.39</string>
|
<objects>
|
||||||
<string key="IBDocument.HIToolboxVersion">626.00</string>
|
<customObject id="-2" userLabel="File's Owner" customClass="MPServerSettingsController">
|
||||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
<connections>
|
||||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<outlet property="enableServerCheckbutton" destination="2" id="17"/>
|
||||||
<string key="NS.object.0">3084</string>
|
<outlet property="view" destination="1" id="18"/>
|
||||||
</object>
|
</connections>
|
||||||
<array key="IBDocument.IntegratedClassDependencies">
|
</customObject>
|
||||||
<string>IBNSLayoutConstraint</string>
|
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||||
<string>NSButton</string>
|
<customObject id="-3" userLabel="Application"/>
|
||||||
<string>NSButtonCell</string>
|
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1">
|
||||||
<string>NSCustomObject</string>
|
<rect key="frame" x="0.0" y="0.0" width="400" height="54"/>
|
||||||
<string>NSCustomView</string>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
</array>
|
<subviews>
|
||||||
<array key="IBDocument.PluginDependencies">
|
<button translatesAutoresizingMaskIntoConstraints="NO" id="2">
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<rect key="frame" x="18" y="18" width="189" height="18"/>
|
||||||
</array>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
<buttonCell key="cell" type="check" title="Enable KeePassHttp server" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="3">
|
||||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||||
<integer value="1" key="NS.object.0"/>
|
<font key="font" metaFont="system"/>
|
||||||
</object>
|
</buttonCell>
|
||||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
</button>
|
||||||
<object class="NSCustomObject" id="1001">
|
</subviews>
|
||||||
<string key="NSClassName">MPServerSettingsController</string>
|
<constraints>
|
||||||
</object>
|
<constraint firstItem="2" firstAttribute="top" secondItem="1" secondAttribute="top" constant="20" symbolic="YES" id="4"/>
|
||||||
<object class="NSCustomObject" id="1003">
|
<constraint firstItem="2" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="5"/>
|
||||||
<string key="NSClassName">FirstResponder</string>
|
<constraint firstAttribute="width" constant="400" id="19"/>
|
||||||
</object>
|
<constraint firstAttribute="height" constant="54" id="20"/>
|
||||||
<object class="NSCustomObject" id="1004">
|
</constraints>
|
||||||
<string key="NSClassName">NSApplication</string>
|
</customView>
|
||||||
</object>
|
</objects>
|
||||||
<object class="NSCustomView" id="1005">
|
</document>
|
||||||
<reference key="NSNextResponder"/>
|
|
||||||
<int key="NSvFlags">268</int>
|
|
||||||
<array class="NSMutableArray" key="NSSubviews">
|
|
||||||
<object class="NSButton" id="95771987">
|
|
||||||
<reference key="NSNextResponder" ref="1005"/>
|
|
||||||
<int key="NSvFlags">268</int>
|
|
||||||
<string key="NSFrame">{{18, 18}, {189, 18}}</string>
|
|
||||||
<reference key="NSSuperview" ref="1005"/>
|
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
|
||||||
<bool key="NSEnabled">YES</bool>
|
|
||||||
<object class="NSButtonCell" key="NSCell" id="538739429">
|
|
||||||
<int key="NSCellFlags">-2080374784</int>
|
|
||||||
<int key="NSCellFlags2">268435456</int>
|
|
||||||
<string key="NSContents">Enable KeePassHttp server</string>
|
|
||||||
<object class="NSFont" key="NSSupport">
|
|
||||||
<string key="NSName">LucidaGrande</string>
|
|
||||||
<double key="NSSize">13</double>
|
|
||||||
<int key="NSfFlags">1044</int>
|
|
||||||
</object>
|
|
||||||
<string key="NSCellIdentifier">_NS:9</string>
|
|
||||||
<reference key="NSControlView" ref="95771987"/>
|
|
||||||
<int key="NSButtonFlags">1211912448</int>
|
|
||||||
<int key="NSButtonFlags2">2</int>
|
|
||||||
<object class="NSCustomResource" key="NSNormalImage">
|
|
||||||
<string key="NSClassName">NSImage</string>
|
|
||||||
<string key="NSResourceName">NSSwitch</string>
|
|
||||||
</object>
|
|
||||||
<object class="NSButtonImageSource" key="NSAlternateImage">
|
|
||||||
<string key="NSImageName">NSSwitch</string>
|
|
||||||
</object>
|
|
||||||
<string key="NSAlternateContents"/>
|
|
||||||
<string key="NSKeyEquivalent"/>
|
|
||||||
<int key="NSPeriodicDelay">200</int>
|
|
||||||
<int key="NSPeriodicInterval">25</int>
|
|
||||||
</object>
|
|
||||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
|
||||||
</object>
|
|
||||||
</array>
|
|
||||||
<string key="NSFrameSize">{400, 54}</string>
|
|
||||||
<reference key="NSSuperview"/>
|
|
||||||
<reference key="NSWindow"/>
|
|
||||||
<reference key="NSNextKeyView" ref="95771987"/>
|
|
||||||
<string key="NSClassName">NSView</string>
|
|
||||||
</object>
|
|
||||||
</array>
|
|
||||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
|
||||||
<array class="NSMutableArray" key="connectionRecords">
|
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBOutletConnection" key="connection">
|
|
||||||
<string key="label">enableServerCheckbutton</string>
|
|
||||||
<reference key="source" ref="1001"/>
|
|
||||||
<reference key="destination" ref="95771987"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">17</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBOutletConnection" key="connection">
|
|
||||||
<string key="label">view</string>
|
|
||||||
<reference key="source" ref="1001"/>
|
|
||||||
<reference key="destination" ref="1005"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">18</int>
|
|
||||||
</object>
|
|
||||||
</array>
|
|
||||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
|
||||||
<array key="orderedObjects">
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">0</int>
|
|
||||||
<array key="object" id="0"/>
|
|
||||||
<reference key="children" ref="1000"/>
|
|
||||||
<nil key="parent"/>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">-2</int>
|
|
||||||
<reference key="object" ref="1001"/>
|
|
||||||
<reference key="parent" ref="0"/>
|
|
||||||
<string key="objectName">File's Owner</string>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">-1</int>
|
|
||||||
<reference key="object" ref="1003"/>
|
|
||||||
<reference key="parent" ref="0"/>
|
|
||||||
<string key="objectName">First Responder</string>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">-3</int>
|
|
||||||
<reference key="object" ref="1004"/>
|
|
||||||
<reference key="parent" ref="0"/>
|
|
||||||
<string key="objectName">Application</string>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">1</int>
|
|
||||||
<reference key="object" ref="1005"/>
|
|
||||||
<array class="NSMutableArray" key="children">
|
|
||||||
<reference ref="95771987"/>
|
|
||||||
<object class="IBNSLayoutConstraint" id="575589126">
|
|
||||||
<reference key="firstItem" ref="95771987"/>
|
|
||||||
<int key="firstAttribute">5</int>
|
|
||||||
<int key="relation">0</int>
|
|
||||||
<reference key="secondItem" ref="1005"/>
|
|
||||||
<int key="secondAttribute">5</int>
|
|
||||||
<float key="multiplier">1</float>
|
|
||||||
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
|
||||||
<double key="value">20</double>
|
|
||||||
</object>
|
|
||||||
<float key="priority">1000</float>
|
|
||||||
<reference key="containingView" ref="1005"/>
|
|
||||||
<int key="scoringType">8</int>
|
|
||||||
<float key="scoringTypeFloat">29</float>
|
|
||||||
<int key="contentType">3</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBNSLayoutConstraint" id="867686541">
|
|
||||||
<reference key="firstItem" ref="95771987"/>
|
|
||||||
<int key="firstAttribute">3</int>
|
|
||||||
<int key="relation">0</int>
|
|
||||||
<reference key="secondItem" ref="1005"/>
|
|
||||||
<int key="secondAttribute">3</int>
|
|
||||||
<float key="multiplier">1</float>
|
|
||||||
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
|
||||||
<double key="value">20</double>
|
|
||||||
</object>
|
|
||||||
<float key="priority">1000</float>
|
|
||||||
<reference key="containingView" ref="1005"/>
|
|
||||||
<int key="scoringType">8</int>
|
|
||||||
<float key="scoringTypeFloat">29</float>
|
|
||||||
<int key="contentType">3</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBNSLayoutConstraint" id="515116036">
|
|
||||||
<reference key="firstItem" ref="1005"/>
|
|
||||||
<int key="firstAttribute">8</int>
|
|
||||||
<int key="relation">0</int>
|
|
||||||
<nil key="secondItem"/>
|
|
||||||
<int key="secondAttribute">0</int>
|
|
||||||
<float key="multiplier">1</float>
|
|
||||||
<object class="IBLayoutConstant" key="constant">
|
|
||||||
<double key="value">54</double>
|
|
||||||
</object>
|
|
||||||
<float key="priority">1000</float>
|
|
||||||
<reference key="containingView" ref="1005"/>
|
|
||||||
<int key="scoringType">9</int>
|
|
||||||
<float key="scoringTypeFloat">40</float>
|
|
||||||
<int key="contentType">1</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBNSLayoutConstraint" id="120297329">
|
|
||||||
<reference key="firstItem" ref="1005"/>
|
|
||||||
<int key="firstAttribute">7</int>
|
|
||||||
<int key="relation">0</int>
|
|
||||||
<nil key="secondItem"/>
|
|
||||||
<int key="secondAttribute">0</int>
|
|
||||||
<float key="multiplier">1</float>
|
|
||||||
<object class="IBLayoutConstant" key="constant">
|
|
||||||
<double key="value">400</double>
|
|
||||||
</object>
|
|
||||||
<float key="priority">1000</float>
|
|
||||||
<reference key="containingView" ref="1005"/>
|
|
||||||
<int key="scoringType">9</int>
|
|
||||||
<float key="scoringTypeFloat">40</float>
|
|
||||||
<int key="contentType">1</int>
|
|
||||||
</object>
|
|
||||||
</array>
|
|
||||||
<reference key="parent" ref="0"/>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">2</int>
|
|
||||||
<reference key="object" ref="95771987"/>
|
|
||||||
<array class="NSMutableArray" key="children">
|
|
||||||
<reference ref="538739429"/>
|
|
||||||
</array>
|
|
||||||
<reference key="parent" ref="1005"/>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">3</int>
|
|
||||||
<reference key="object" ref="538739429"/>
|
|
||||||
<reference key="parent" ref="95771987"/>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">4</int>
|
|
||||||
<reference key="object" ref="867686541"/>
|
|
||||||
<reference key="parent" ref="1005"/>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">5</int>
|
|
||||||
<reference key="object" ref="575589126"/>
|
|
||||||
<reference key="parent" ref="1005"/>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">19</int>
|
|
||||||
<reference key="object" ref="120297329"/>
|
|
||||||
<reference key="parent" ref="1005"/>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">20</int>
|
|
||||||
<reference key="object" ref="515116036"/>
|
|
||||||
<reference key="parent" ref="1005"/>
|
|
||||||
</object>
|
|
||||||
</array>
|
|
||||||
</object>
|
|
||||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
|
||||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<array key="1.IBNSViewMetadataConstraints">
|
|
||||||
<reference ref="120297329"/>
|
|
||||||
<reference ref="515116036"/>
|
|
||||||
<reference ref="867686541"/>
|
|
||||||
<reference ref="575589126"/>
|
|
||||||
</array>
|
|
||||||
<boolean value="NO" key="1.IBNSViewMetadataLastInspectedTranslatesAutoresizingMaskIntoConstraints"/>
|
|
||||||
<boolean value="NO" key="1.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
|
||||||
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<boolean value="NO" key="2.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
|
||||||
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<string key="20.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
|
||||||
<nil key="activeLocalization"/>
|
|
||||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
|
||||||
<nil key="sourceID"/>
|
|
||||||
<int key="maxID">20</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
|
||||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
|
||||||
<object class="IBPartialClassDescription">
|
|
||||||
<string key="className">MPServerSettingsController</string>
|
|
||||||
<string key="superclassName">MPViewController</string>
|
|
||||||
<object class="NSMutableDictionary" key="outlets">
|
|
||||||
<string key="NS.key.0">enableServerCheckbutton</string>
|
|
||||||
<string key="NS.object.0">NSButton</string>
|
|
||||||
</object>
|
|
||||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
|
||||||
<string key="NS.key.0">enableServerCheckbutton</string>
|
|
||||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
|
||||||
<string key="name">enableServerCheckbutton</string>
|
|
||||||
<string key="candidateClassName">NSButton</string>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
||||||
<string key="majorKey">IBProjectSource</string>
|
|
||||||
<string key="minorKey">./Classes/MPServerSettingsController.h</string>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="IBPartialClassDescription">
|
|
||||||
<string key="className">MPViewController</string>
|
|
||||||
<string key="superclassName">NSViewController</string>
|
|
||||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
||||||
<string key="majorKey">IBProjectSource</string>
|
|
||||||
<string key="minorKey">./Classes/MPViewController.h</string>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="IBPartialClassDescription">
|
|
||||||
<string key="className">NSLayoutConstraint</string>
|
|
||||||
<string key="superclassName">NSObject</string>
|
|
||||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
||||||
<string key="majorKey">IBProjectSource</string>
|
|
||||||
<string key="minorKey">./Classes/NSLayoutConstraint.h</string>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</array>
|
|
||||||
</object>
|
|
||||||
<int key="IBDocument.localizationMode">0</int>
|
|
||||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
|
||||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
|
||||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
|
||||||
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
|
||||||
<string key="NS.key.0">NSSwitch</string>
|
|
||||||
<string key="NS.object.0">{15, 15}</string>
|
|
||||||
</object>
|
|
||||||
<bool key="IBDocument.UseAutolayout">YES</bool>
|
|
||||||
</data>
|
|
||||||
</archive>
|
|
||||||
@@ -1,145 +1,25 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4510" systemVersion="12F45" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<data>
|
<dependencies>
|
||||||
<int key="IBDocument.SystemTarget">1080</int>
|
<deployment defaultVersion="1080" identifier="macosx"/>
|
||||||
<string key="IBDocument.SystemVersion">12E55</string>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4510"/>
|
||||||
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
|
</dependencies>
|
||||||
<string key="IBDocument.AppKitVersion">1187.39</string>
|
<objects>
|
||||||
<string key="IBDocument.HIToolboxVersion">626.00</string>
|
<customObject id="-2" userLabel="File's Owner" customClass="MPSettingsWindowController">
|
||||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
<connections>
|
||||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<outlet property="window" destination="1" id="3"/>
|
||||||
<string key="NS.object.0">3084</string>
|
</connections>
|
||||||
</object>
|
</customObject>
|
||||||
<array key="IBDocument.IntegratedClassDependencies">
|
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||||
<string>NSCustomObject</string>
|
<customObject id="-3" userLabel="Application"/>
|
||||||
<string>NSView</string>
|
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" showsToolbarButton="NO" wantsToBeColor="NO" visibleAtLaunch="NO" animationBehavior="default" id="1">
|
||||||
<string>NSWindowTemplate</string>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
||||||
</array>
|
<rect key="contentRect" x="196" y="240" width="400" height="300"/>
|
||||||
<array key="IBDocument.PluginDependencies">
|
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<view key="contentView" id="2">
|
||||||
</array>
|
<rect key="frame" x="0.0" y="0.0" width="400" height="300"/>
|
||||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
</view>
|
||||||
<integer value="1" key="NS.object.0"/>
|
</window>
|
||||||
</object>
|
</objects>
|
||||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
</document>
|
||||||
<object class="NSCustomObject" id="1001">
|
|
||||||
<string key="NSClassName">MPSettingsWindowController</string>
|
|
||||||
</object>
|
|
||||||
<object class="NSCustomObject" id="1003">
|
|
||||||
<string key="NSClassName">FirstResponder</string>
|
|
||||||
</object>
|
|
||||||
<object class="NSCustomObject" id="1004">
|
|
||||||
<string key="NSClassName">NSApplication</string>
|
|
||||||
</object>
|
|
||||||
<object class="NSWindowTemplate" id="1005">
|
|
||||||
<int key="NSWindowStyleMask">7</int>
|
|
||||||
<int key="NSWindowBacking">2</int>
|
|
||||||
<string key="NSWindowRect">{{196, 240}, {400, 300}}</string>
|
|
||||||
<int key="NSWTFlags">544736256</int>
|
|
||||||
<string key="NSWindowTitle">Window</string>
|
|
||||||
<string key="NSWindowClass">NSWindow</string>
|
|
||||||
<nil key="NSViewClass"/>
|
|
||||||
<nil key="NSUserInterfaceItemIdentifier"/>
|
|
||||||
<object class="NSView" key="NSWindowView" id="1006">
|
|
||||||
<reference key="NSNextResponder"/>
|
|
||||||
<int key="NSvFlags">256</int>
|
|
||||||
<array class="NSMutableArray" key="NSSubviews"/>
|
|
||||||
<string key="NSFrameSize">{400, 300}</string>
|
|
||||||
<reference key="NSSuperview"/>
|
|
||||||
<reference key="NSWindow"/>
|
|
||||||
</object>
|
|
||||||
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
|
|
||||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
|
||||||
<bool key="NSWindowIsRestorable">YES</bool>
|
|
||||||
</object>
|
|
||||||
</array>
|
|
||||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
|
||||||
<array class="NSMutableArray" key="connectionRecords">
|
|
||||||
<object class="IBConnectionRecord">
|
|
||||||
<object class="IBOutletConnection" key="connection">
|
|
||||||
<string key="label">window</string>
|
|
||||||
<reference key="source" ref="1001"/>
|
|
||||||
<reference key="destination" ref="1005"/>
|
|
||||||
</object>
|
|
||||||
<int key="connectionID">3</int>
|
|
||||||
</object>
|
|
||||||
</array>
|
|
||||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
|
||||||
<array key="orderedObjects">
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">0</int>
|
|
||||||
<array key="object" id="0"/>
|
|
||||||
<reference key="children" ref="1000"/>
|
|
||||||
<nil key="parent"/>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">-2</int>
|
|
||||||
<reference key="object" ref="1001"/>
|
|
||||||
<reference key="parent" ref="0"/>
|
|
||||||
<string key="objectName">File's Owner</string>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">-1</int>
|
|
||||||
<reference key="object" ref="1003"/>
|
|
||||||
<reference key="parent" ref="0"/>
|
|
||||||
<string key="objectName">First Responder</string>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">-3</int>
|
|
||||||
<reference key="object" ref="1004"/>
|
|
||||||
<reference key="parent" ref="0"/>
|
|
||||||
<string key="objectName">Application</string>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">1</int>
|
|
||||||
<reference key="object" ref="1005"/>
|
|
||||||
<array class="NSMutableArray" key="children">
|
|
||||||
<reference ref="1006"/>
|
|
||||||
</array>
|
|
||||||
<reference key="parent" ref="0"/>
|
|
||||||
</object>
|
|
||||||
<object class="IBObjectRecord">
|
|
||||||
<int key="objectID">2</int>
|
|
||||||
<reference key="object" ref="1006"/>
|
|
||||||
<array class="NSMutableArray" key="children"/>
|
|
||||||
<reference key="parent" ref="1005"/>
|
|
||||||
</object>
|
|
||||||
</array>
|
|
||||||
</object>
|
|
||||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
|
||||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<boolean value="YES" key="1.IBNSWindowAutoPositionCentersHorizontal"/>
|
|
||||||
<boolean value="YES" key="1.IBNSWindowAutoPositionCentersVertical"/>
|
|
||||||
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
<string key="1.IBWindowTemplateEditedContentRect">{{357, 418}, {480, 270}}</string>
|
|
||||||
<boolean value="NO" key="1.NSWindowTemplate.visibleAtLaunch"/>
|
|
||||||
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
|
||||||
<nil key="activeLocalization"/>
|
|
||||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
|
||||||
<nil key="sourceID"/>
|
|
||||||
<int key="maxID">89</int>
|
|
||||||
</object>
|
|
||||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
|
||||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
|
||||||
<object class="IBPartialClassDescription">
|
|
||||||
<string key="className">MPSettingsWindowController</string>
|
|
||||||
<string key="superclassName">NSWindowController</string>
|
|
||||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
||||||
<string key="majorKey">IBProjectSource</string>
|
|
||||||
<string key="minorKey">./Classes/MPSettingsWindowController.h</string>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</array>
|
|
||||||
</object>
|
|
||||||
<int key="IBDocument.localizationMode">0</int>
|
|
||||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
|
||||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
|
||||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
|
||||||
<bool key="IBDocument.UseAutolayout">YES</bool>
|
|
||||||
</data>
|
|
||||||
</archive>
|
|
||||||
Reference in New Issue
Block a user