2
0

More work on the experimental new Mac gui.

This commit is contained in:
Maarten Billemont 2014-06-24 00:55:08 -04:00
parent 10affd615c
commit 31b667c7f7
9 changed files with 429 additions and 60 deletions

View File

@ -16,7 +16,6 @@
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MPElementCollectionView.h"
#import "MPElementModel.h"
#import "MPMacAppDelegate.h"
@ -75,7 +74,7 @@
NSAlert *alert = [NSAlert alertWithMessageText:@"Update Login Name"
defaultButton:@"Update" alternateButton:@"Cancel" otherButton:nil
informativeTextWithFormat:@"Enter the login name for %@:", self.representedObject.site];
informativeTextWithFormat:@"Enter the login name for %@:", self.representedObject.siteName];
NSTextField *passwordField = [[NSTextField alloc] initWithFrame:NSMakeRect( 0, 0, 200, 22 )];
[alert setAccessoryView:passwordField];
[alert layout];
@ -88,7 +87,7 @@
NSAlert *alert = [NSAlert alertWithMessageText:@"Update Password"
defaultButton:@"Update" alternateButton:@"Cancel" otherButton:nil
informativeTextWithFormat:@"Enter the new password for %@:", self.representedObject.site];
informativeTextWithFormat:@"Enter the new password for %@:", self.representedObject.siteName];
NSSecureTextField *passwordField = [[NSSecureTextField alloc] initWithFrame:NSMakeRect( 0, 0, 200, 22 )];
[alert setAccessoryView:passwordField];
[alert layout];
@ -101,7 +100,7 @@
NSAlert *alert = [NSAlert alertWithMessageText:@"Delete Site"
defaultButton:@"Delete" alternateButton:@"Cancel" otherButton:nil
informativeTextWithFormat:@"Are you sure you want to delete the site: %@?", self.representedObject.site];
informativeTextWithFormat:@"Are you sure you want to delete the site: %@?", self.representedObject.siteName];
[alert beginSheetModalForWindow:self.view.window modalDelegate:self
didEndSelector:@selector( alertDidEnd:returnCode:contextInfo: ) contextInfo:MPAlertDeleteSite];
}

View File

@ -20,7 +20,8 @@
@class MPElementEntity;
@interface MPElementModel : NSObject
@property (nonatomic) NSString *site;
@property (nonatomic) NSString *siteName;
@property (nonatomic) MPElementType type;
@property (nonatomic) NSString *typeName;
@property (nonatomic) NSString *content;

View File

@ -47,7 +47,7 @@
_entityOID = entity.objectID;
self.algorithm = entity.algorithm;
self.site = entity.name;
self.siteName = entity.name;
self.lastUsed = entity.lastUsed;
self.loginName = entity.loginName;
self.type = entity.type;

View File

@ -200,6 +200,7 @@
#pragma mark - NSCollectionViewDelegate
#pragma mark - NSTextFieldDelegate
- (void)doCommandBySelector:(SEL)commandSelector {
if (commandSelector == @selector(insertNewline:))
@ -410,9 +411,9 @@
NSUserNotification *notification = [NSUserNotification new];
notification.title = @"Password Copied";
if (selectedElement.loginName.length)
notification.subtitle = PearlString( @"%@ at %@", selectedElement.loginName, selectedElement.site );
notification.subtitle = PearlString( @"%@ at %@", selectedElement.loginName, selectedElement.siteName );
else
notification.subtitle = selectedElement.site;
notification.subtitle = selectedElement.siteName;
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
}
else {

View File

@ -152,7 +152,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="QBZ-sO-HQn" name="value" keyPath="representedObject.site" id="4as-ow-WbD"/>
<binding destination="QBZ-sO-HQn" name="value" keyPath="representedObject.siteName" id="4as-ow-WbD"/>
</connections>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Cn5-nt-e6X">

View File

@ -17,11 +17,22 @@
//
#import <Cocoa/Cocoa.h>
#import "MPElementModel.h"
@interface MPPasswordWindowController : NSWindowController<NSTextFieldDelegate, NSCollectionViewDelegate>
@interface MPPasswordWindowController : NSWindowController<NSTextViewDelegate, NSTextFieldDelegate, NSTableViewDataSource, NSTableViewDelegate>
@property(nonatomic, strong) NSMutableArray *elements;
@property(nonatomic, weak) IBOutlet NSArrayController *elementsController;
@property(nonatomic, weak) IBOutlet NSImageView *blurView;
@property(nonatomic, weak) IBOutlet NSTextField *userLabel;
@property(nonatomic, weak) IBOutlet NSTextField *inputLabel;
@property(nonatomic, weak) IBOutlet NSSearchField *siteField;
@property(nonatomic, weak) IBOutlet NSSecureTextField *passwordField;
@property(nonatomic, weak) IBOutlet NSTableView *siteTable;
@property(nonatomic, weak) IBOutlet NSProgressIndicator *progressView;
@property(nonatomic, weak) IBOutlet NSButton *typeButton;
@property(nonatomic, weak) IBOutlet NSView *counterContainer;
@property(nonatomic, weak) IBOutlet NSStepper *counterStepper;
@property(nonatomic, weak) IBOutlet NSTextField *counterLabel;
@end

View File

@ -16,9 +16,15 @@
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>
#import "MPPasswordWindowController.h"
#import "MPMacAppDelegate.h"
#import "MPAppDelegate_Store.h"
#import "MPElementModel.h"
#import "MPAppDelegate_Key.h"
#define MPAlertIncorrectMP @"MPAlertIncorrectMP"
#define MPAlertCreateSite @"MPAlertCreateSite"
@implementation MPPasswordWindowController
@ -39,9 +45,9 @@
[[NSNotificationCenter defaultCenter] addObserverForName:NSWindowDidBecomeKeyNotification object:self.window
queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) {
[self fadeIn];
[self.siteField becomeFirstResponder];
[self updateUser];
}];
[[NSNotificationCenter defaultCenter] addObserverForName:NSWindowDidResignKeyNotification object:self.window
[[NSNotificationCenter defaultCenter] addObserverForName:NSWindowDidResignMainNotification object:self.window
queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) {
[self fadeOut];
}];
@ -55,21 +61,260 @@
}];
}
- (void)updateUser {
#pragma mark - NSResponder
[MPMacAppDelegate managedObjectContextForMainThreadPerformBlock:^(NSManagedObjectContext *mainContext) {
MPUserEntity *mainActiveUser = [[MPMacAppDelegate get] activeUserInContext:mainContext];
if (mainActiveUser)
self.userLabel.stringValue = strf( @"%@'s password for:", mainActiveUser.name );
else
self.userLabel.stringValue = @"";
- (void)doCommandBySelector:(SEL)commandSelector {
[self handleCommand:commandSelector];
}
#pragma mark - NSTextFieldDelegate
- (BOOL)control:(NSControl *)control textView:(NSTextView *)fieldEditor doCommandBySelector:(SEL)commandSelector {
if (control == self.passwordField) {
if (commandSelector == @selector( insertNewline: )) {
NSString *password = self.passwordField.stringValue;
[self.progressView startAnimation:self];
[MPMacAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *moc) {
MPUserEntity *activeUser = [[MPMacAppDelegate get] activeUserInContext:moc];
NSString *userName = activeUser.name;
BOOL success = [[MPMacAppDelegate get] signInAsUser:activeUser saveInContext:moc usingMasterPassword:password];
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
[self.progressView stopAnimation:self];
if (!success)
[[NSAlert alertWithError:[NSError errorWithDomain:MPErrorDomain code:0 userInfo:@{
NSLocalizedDescriptionKey : PearlString( @"Incorrect master password for user %@", userName )
}]] beginSheetModalForWindow:self.window modalDelegate:self
didEndSelector:@selector( alertDidEnd:returnCode:contextInfo: ) contextInfo:MPAlertIncorrectMP];
}];
}];
return YES;
}
}
if (control == self.siteField) {
if (commandSelector == @selector( moveUp: )) {
[self.elementsController selectPrevious:self];
return YES;
}
if (commandSelector == @selector( moveDown: )) {
[self.elementsController selectNext:self];
return YES;
}
}
return [self handleCommand:commandSelector];
}
- (void)controlTextDidChange:(NSNotification *)note {
if (note.object == self.siteField) {
[self updateElements];
// Update the site content as the site name changes.
// if ([[NSApp currentEvent] type] == NSKeyDown &&
// [[[NSApp currentEvent] charactersIgnoringModifiers] isEqualToString:@"\r"]) { // Return while completing.
// [self useSite];
// return;
// }
// if ([[NSApp currentEvent] type] == NSKeyDown &&
// [[[NSApp currentEvent] charactersIgnoringModifiers] characterAtIndex:0] == 0x1b) { // Escape while completing.
// [self trySiteWithAction:NO];
// return;
// }
}
}
#pragma mark - NSTextViewDelegate
- (BOOL)textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector {
return [self handleCommand:commandSelector];
}
#pragma mark - NSTableViewDataSource
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView {
return (NSInteger)[self.elements count];
}
#pragma mark - NSAlert
- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo {
if (contextInfo == MPAlertIncorrectMP) {
[self close];
return;
}
if (contextInfo == MPAlertCreateSite) {
switch (returnCode) {
case NSAlertFirstButtonReturn: {
// "Create" button.
[[MPMacAppDelegate get] addElementNamed:[self.siteField stringValue] completion:^(MPElementEntity *element) {
if (element)
PearlMainQueue( ^{ [self updateElements]; } );
}];
break;
}
case NSAlertThirdButtonReturn:
// "Cancel" button.
break;
default:
break;
}
}
}
#pragma mark - State
- (void)insertObject:(MPElementModel *)model inElementsAtIndex:(NSUInteger)index {
[self.elements insertObject:model atIndex:index];
}
- (void)removeObjectFromElementsAtIndex:(NSUInteger)index {
[self.elements removeObjectAtIndex:index];
}
- (MPElementModel *)selectedElement {
return [self.elementsController.selectedObjects firstObject];
}
#pragma mark - Private
- (BOOL)handleCommand:(SEL)commandSelector {
if (commandSelector == @selector( insertNewline: )) {
[self useSite];
return YES;
}
if (commandSelector == @selector( cancel: ) || commandSelector == @selector( cancelOperation: )) {
[self fadeOut];
return YES;
}
return NO;
}
- (void)updateUser {
[MPMacAppDelegate managedObjectContextForMainThreadPerformBlock:^(NSManagedObjectContext *mainContext) {
MPUserEntity *mainActiveUser = [[MPMacAppDelegate get] activeUserInContext:mainContext];
if (mainActiveUser) {
if ([MPMacAppDelegate get].key) {
self.inputLabel.stringValue = strf( @"%@'s password for:", mainActiveUser.name );
[self.passwordField setHidden:YES];
[self.siteField setHidden:NO];
[self.siteTable setHidden:NO];
[self.siteField becomeFirstResponder];
}
else {
self.inputLabel.stringValue = strf( @"Enter %@'s master password:", mainActiveUser.name );
[self.passwordField setHidden:NO];
[self.siteField setHidden:YES];
[self.siteTable setHidden:YES];
[self.passwordField becomeFirstResponder];
}
}
else {
self.inputLabel.stringValue = @"";
[self.passwordField setHidden:YES];
[self.siteField setHidden:YES];
[self.siteTable setHidden:YES];
}
self.passwordField.stringValue = @"";
self.siteField.stringValue = @"";
[self updateElements];
}];
}
- (void)updateElements {
if (![MPMacAppDelegate get].key) {
self.elements = nil;
return;
}
NSString *query = [self.siteField stringValue];
[MPMacAppDelegate managedObjectContextPerformBlockAndWait:^(NSManagedObjectContext *context) {
NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:NSStringFromClass( [MPElementEntity class] )];
fetchRequest.sortDescriptors = [NSArray arrayWithObject:[[NSSortDescriptor alloc] initWithKey:@"lastUsed" ascending:NO]];
fetchRequest.predicate = [NSPredicate predicateWithFormat:@"(%@ == '' OR name BEGINSWITH[cd] %@) AND user == %@",
query, query, [[MPMacAppDelegate get] activeUserInContext:context]];
NSError *error = nil;
NSArray *siteResults = [context executeFetchRequest:fetchRequest error:&error];
if (!siteResults) {
err( @"While fetching elements for completion: %@", error );
return;
}
NSMutableArray *newElements = [NSMutableArray arrayWithCapacity:[siteResults count]];
for (MPElementEntity *element in siteResults)
[newElements addObject:[[MPElementModel alloc] initWithEntity:element]];
self.elements = newElements;
}];
}
- (void)useSite {
MPElementModel *selectedElement = [self selectedElement];
if (selectedElement) {
// Performing action while content is available. Copy it.
[self copyContent:selectedElement.content];
[self close];
NSUserNotification *notification = [NSUserNotification new];
notification.title = @"Password Copied";
if (selectedElement.loginName.length)
notification.subtitle = PearlString( @"%@ at %@", selectedElement.loginName, selectedElement.siteName );
else
notification.subtitle = selectedElement.siteName;
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
}
else {
NSString *siteName = [self.siteField stringValue];
if ([siteName length])
// Performing action without content but a site name is written.
[self createNewSite:siteName];
}
}
- (void)createNewSite:(NSString *)siteName {
PearlMainQueue( ^{
NSAlert *alert = [NSAlert new];
[alert addButtonWithTitle:@"Create"];
[alert addButtonWithTitle:@"Cancel"];
[alert setMessageText:@"Create site?"];
[alert setInformativeText:PearlString( @"Do you want to create a new site named:\n\n%@", siteName )];
[alert beginSheetModalForWindow:self.window modalDelegate:self
didEndSelector:@selector( alertDidEnd:returnCode:contextInfo: ) contextInfo:MPAlertCreateSite];
} );
}
- (void)copyContent:(NSString *)content {
[[NSPasteboard generalPasteboard] declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil];
if (![[NSPasteboard generalPasteboard] setString:content forType:NSPasteboardTypeString]) {
wrn( @"Couldn't copy password to pasteboard." );
return;
}
[MPMacAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *moc) {
[[self.selectedElement entityInContext:moc] use];
[moc saveToStore];
}];
}
- (void)fadeIn {
CGWindowID windowID = (CGWindowID)[self.window windowNumber];
@ -92,11 +337,16 @@
self.blurView.image = smallImage;
[self.window setFrame:self.window.screen.frame display:YES];
[[NSAnimationContext currentContext] setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
[[self.window animator] setAlphaValue:1.0];
}
- (void)fadeOut {
[[NSAnimationContext currentContext] setCompletionHandler:^{
[self close];
}];
[[NSAnimationContext currentContext] setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
[[self.window animator] setAlphaValue:0.0];
}

View File

@ -8,7 +8,16 @@
<customObject id="-2" userLabel="File's Owner" customClass="MPPasswordWindowController">
<connections>
<outlet property="blurView" destination="Bwc-sd-6gm" id="wNV-0x-LJn"/>
<outlet property="counterContainer" destination="d3u-Ze-9uf" id="LOe-E4-MBC"/>
<outlet property="counterLabel" destination="NvO-kt-eZ2" id="rjP-S0-i3S"/>
<outlet property="counterStepper" destination="XgA-Vl-CKh" id="BYt-m6-c9i"/>
<outlet property="elementsController" destination="mcS-ik-b0n" id="cdF-BL-lfg"/>
<outlet property="inputLabel" destination="OnR-s6-d4P" id="p6G-Ut-cdu"/>
<outlet property="passwordField" destination="iGR-wo-ual" id="sJN-aE-j7G"/>
<outlet property="progressView" destination="oSh-Ec-8Nf" id="rob-p0-gr7"/>
<outlet property="siteField" destination="CnS-iI-dhr" id="nPo-Kb-YM2"/>
<outlet property="siteTable" destination="xvJ-5c-vDp" id="ClP-j8-DyI"/>
<outlet property="typeButton" destination="vES-W5-m4x" id="r9n-pD-J8T"/>
<outlet property="window" destination="QvC-M9-y7g" id="dPy-F3-9rn"/>
</connections>
</customObject>
@ -17,14 +26,14 @@
<window title="Master Password" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hasShadow="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MPPasswordWindow">
<windowCollectionBehavior key="collectionBehavior" transient="YES" ignoresCycle="YES" fullScreenAuxiliary="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="0.0" y="0.0" width="640" height="480"/>
<rect key="contentRect" x="0.0" y="0.0" width="648" height="530"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="640" height="480"/>
<rect key="frame" x="0.0" y="0.0" width="648" height="530"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Bwc-sd-6gm">
<rect key="frame" x="0.0" y="0.0" width="640" height="480"/>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Bwc-sd-6gm" userLabel="Screen Capture">
<rect key="frame" x="0.0" y="0.0" width="648" height="530"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<contentFilters>
<ciFilter name="CIGaussianBlur">
@ -44,21 +53,21 @@
</contentFilters>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="small-screen" id="ArA-2w-I56"/>
</imageView>
<scrollView focusRingType="none" borderType="none" autohidesScrollers="YES" horizontalLineScroll="37" horizontalPageScroll="10" verticalLineScroll="37" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bme-XK-MMc">
<rect key="frame" x="120" y="0.0" width="400" height="207"/>
<scrollView focusRingType="none" borderType="none" autohidesScrollers="YES" horizontalLineScroll="37" horizontalPageScroll="10" verticalLineScroll="37" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bme-XK-MMc" userLabel="Sites Table">
<rect key="frame" x="68" y="0.0" width="512" height="232"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="e11-59-xSS">
<rect key="frame" x="0.0" y="0.0" width="400" height="207"/>
<rect key="frame" x="0.0" y="0.0" width="512" height="232"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="none" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="35" rowSizeStyle="automatic" viewBased="YES" id="xvJ-5c-vDp">
<rect key="frame" x="0.0" y="0.0" width="403" height="207"/>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="none" selectionHighlightStyle="sourceList" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="35" rowSizeStyle="automatic" viewBased="YES" id="xvJ-5c-vDp">
<rect key="frame" x="0.0" y="0.0" width="515" height="232"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.0" colorSpace="calibratedRGB"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="gridColor" name="selectedControlColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn editable="NO" width="400" minWidth="40" maxWidth="1000" id="S71-gk-yF7">
<tableColumn editable="NO" width="512" minWidth="512" maxWidth="512" id="S71-gk-yF7">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -72,17 +81,25 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
<prototypeCellViews>
<tableCellView id="Rv8-uU-ieA">
<rect key="frame" x="1" y="1" width="400" height="35"/>
<rect key="frame" x="1" y="1" width="512" height="35"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="pTl-fc-MSY">
<rect key="frame" x="-2" y="0.0" width="404" height="35"/>
<rect key="frame" x="-2" y="0.0" width="516" height="35"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="center" title="Table View Cell" id="5Ug-eU-C9Y">
<font key="font" size="24" name="Baskerville"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="center" title="apple.com" id="5Ug-eU-C9Y">
<font key="font" size="24" name="Baskerville-SemiBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="Rv8-uU-ieA" name="value" keyPath="objectValue.siteName" id="XMn-nH-0Kd">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
<outlet property="delegate" destination="-2" id="Ozy-bs-KRi"/>
</connections>
</textField>
</subviews>
<constraints>
@ -98,15 +115,21 @@
</prototypeCellViews>
</tableColumn>
</tableColumns>
<connections>
<binding destination="mcS-ik-b0n" name="content" keyPath="arrangedObjects" id="v9r-gT-99p"/>
<binding destination="mcS-ik-b0n" name="selectionIndexes" keyPath="selectionIndexes" previousBinding="v9r-gT-99p" id="dj0-Qh-non"/>
<outlet property="dataSource" destination="-2" id="ILx-nI-has"/>
<outlet property="delegate" destination="-2" id="CHf-TW-RkF"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.0" colorSpace="calibratedRGB"/>
<nil key="backgroundColor"/>
</clipView>
<constraints>
<constraint firstAttribute="width" constant="400" id="qfu-pO-SvM"/>
<constraint firstAttribute="width" constant="512" id="qfu-pO-SvM"/>
</constraints>
<scroller key="horizontalScroller" verticalHuggingPriority="750" horizontal="YES" id="8wr-pu-1lc">
<rect key="frame" x="0.0" y="191" width="400" height="16"/>
<rect key="frame" x="0.0" y="216" width="512" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="mcf-ST-XXI">
@ -114,36 +137,64 @@
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vES-W5-m4x">
<rect key="frame" x="266" y="272" width="109" height="19"/>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OnR-s6-d4P" userLabel="Input Label">
<rect key="frame" x="215" y="298" width="219" height="13"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="recessed" title="Long Password" bezelStyle="recessed" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Fom-sN-EtZ">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="systemBold" size="12"/>
</buttonCell>
</button>
<searchField focusRingType="none" verticalHuggingPriority="750" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CnS-iI-dhr">
<rect key="frame" x="170" y="215" width="300" height="50"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Enter Maarten Billemont's master password:" id="1Lb-d0-fQD">
<font key="font" metaFont="label"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<searchField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="CnS-iI-dhr" userLabel="Site Field">
<rect key="frame" x="68" y="240" width="512" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<constraints>
<constraint firstAttribute="width" constant="300" id="rW7-Vq-4Xy"/>
<constraint firstAttribute="width" constant="512" id="rW7-Vq-4Xy"/>
</constraints>
<searchFieldCell key="cell" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" focusRingType="none" alignment="center" placeholderString="Site Name" drawsBackground="YES" id="ppl-2c-1E9">
<font key="font" size="36" name="Baskerville-Italic"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.0" colorSpace="calibratedRGB"/>
</searchFieldCell>
<connections>
<outlet property="delegate" destination="-2" id="2WA-uI-asx"/>
</connections>
</searchField>
<customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="d3u-Ze-9uf">
<rect key="frame" x="383" y="271" width="29" height="22"/>
<button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vES-W5-m4x" userLabel="Type Button">
<rect key="frame" x="270" y="19" width="109" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="recessed" title="Long Password" bezelStyle="recessed" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Fom-sN-EtZ">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="systemBold" size="12"/>
</buttonCell>
<connections>
<binding destination="mcS-ik-b0n" name="hidden" keyPath="selection" id="zBN-72-q5B">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
<binding destination="mcS-ik-b0n" name="title" keyPath="selection.typeName" id="ezf-Bo-UJN"/>
</connections>
</button>
<customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="d3u-Ze-9uf" userLabel="Counter Container">
<rect key="frame" x="387" y="18" width="29" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XgA-Vl-CKh">
<stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XgA-Vl-CKh" userLabel="Counter Stepper">
<rect key="frame" x="-3" y="-3" width="19" height="27"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<stepperCell key="cell" continuous="YES" alignment="left" maxValue="100" id="ikF-n4-xiI"/>
<connections>
<binding destination="mcS-ik-b0n" name="hidden" keyPath="selection" id="8KV-qr-Mqt">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
<binding destination="mcS-ik-b0n" name="value" keyPath="selection.counter" id="qmm-6z-boy"/>
</connections>
</stepper>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NvO-kt-eZ2">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NvO-kt-eZ2" userLabel="Counter Field">
<rect key="frame" x="19" y="3" width="12" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="1" id="dhQ-bJ-rn3">
@ -151,6 +202,14 @@
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="mcS-ik-b0n" name="hidden" keyPath="selection" id="fAK-4u-0SB">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
<binding destination="mcS-ik-b0n" name="value" keyPath="selection.counter" id="aA9-yw-cYE"/>
</connections>
</textField>
</subviews>
<constraints>
@ -165,29 +224,71 @@
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="NvO-kt-eZ2" secondAttribute="bottom" id="upD-lF-5lW"/>
<constraint firstItem="XgA-Vl-CKh" firstAttribute="leading" secondItem="d3u-Ze-9uf" secondAttribute="leading" id="vKj-dp-A0D"/>
</constraints>
<connections>
<binding destination="mcS-ik-b0n" name="hidden" keyPath="selection" id="YUg-F9-YTd">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</customView>
<button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1Qo-iG-CQt">
<rect key="frame" x="251" y="300" width="139" height="19"/>
<button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1Qo-iG-CQt" userLabel="Login Button">
<rect key="frame" x="255" y="47" width="139" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="recessed" title="lhunath@lyndir.com" alternateTitle="Login Name" bezelStyle="recessed" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="QFo-9y-aVe">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="systemBold" size="12"/>
</buttonCell>
<connections>
<binding destination="mcS-ik-b0n" name="hidden" keyPath="selection" id="KRb-FF-ruz">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
<binding destination="mcS-ik-b0n" name="title" keyPath="selection.loginName" id="VU9-Uo-WlG"/>
</connections>
</button>
<secureTextField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iGR-wo-ual" userLabel="Password Field">
<rect key="frame" x="20" y="243" width="608" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" focusRingType="none" alignment="center" drawsBackground="YES" usesSingleLineMode="YES" id="NcX-1Z-2OC">
<font key="font" metaFont="system" size="36"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<allowedInputSourceLocales>
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
</allowedInputSourceLocales>
</secureTextFieldCell>
<connections>
<outlet property="delegate" destination="-2" id="egd-Ny-IEz"/>
</connections>
</secureTextField>
<progressIndicator hidden="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="oSh-Ec-8Nf">
<rect key="frame" x="316" y="494" width="16" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
</progressIndicator>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="Bme-XK-MMc" secondAttribute="bottom" id="1kJ-cV-fhc"/>
<constraint firstItem="Bme-XK-MMc" firstAttribute="top" secondItem="CnS-iI-dhr" secondAttribute="bottom" constant="8" symbolic="YES" id="1ta-BC-BdQ"/>
<constraint firstAttribute="bottom" secondItem="Bwc-sd-6gm" secondAttribute="bottom" id="3fF-7g-c6C"/>
<constraint firstItem="vES-W5-m4x" firstAttribute="centerX" secondItem="CnS-iI-dhr" secondAttribute="centerX" id="92S-HP-Vk7"/>
<constraint firstItem="CnS-iI-dhr" firstAttribute="top" secondItem="OnR-s6-d4P" secondAttribute="bottom" constant="8" symbolic="YES" id="CGj-SL-Qhp"/>
<constraint firstAttribute="centerY" secondItem="iGR-wo-ual" secondAttribute="centerY" id="GZE-mX-kjj"/>
<constraint firstAttribute="centerY" secondItem="CnS-iI-dhr" secondAttribute="centerY" id="HjG-vb-3Qg"/>
<constraint firstItem="d3u-Ze-9uf" firstAttribute="leading" secondItem="vES-W5-m4x" secondAttribute="trailing" constant="8" symbolic="YES" id="Juf-Q3-pkt"/>
<constraint firstItem="CnS-iI-dhr" firstAttribute="top" secondItem="vES-W5-m4x" secondAttribute="bottom" constant="8" symbolic="YES" id="KV1-8O-msX"/>
<constraint firstItem="iGR-wo-ual" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" constant="20" symbolic="YES" id="KNz-B2-qfi"/>
<constraint firstItem="Bwc-sd-6gm" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" id="Kqb-ig-5cP"/>
<constraint firstAttribute="trailing" secondItem="iGR-wo-ual" secondAttribute="trailing" constant="20" symbolic="YES" id="LW8-vu-scs"/>
<constraint firstAttribute="centerX" secondItem="OnR-s6-d4P" secondAttribute="centerX" id="Pun-kD-jgl"/>
<constraint firstAttribute="centerX" secondItem="CnS-iI-dhr" secondAttribute="centerX" id="Qqi-bu-q65"/>
<constraint firstItem="1Qo-iG-CQt" firstAttribute="centerX" secondItem="vES-W5-m4x" secondAttribute="centerX" id="YEW-63-DI1"/>
<constraint firstAttribute="centerX" secondItem="oSh-Ec-8Nf" secondAttribute="centerX" id="c28-5a-C45"/>
<constraint firstItem="oSh-Ec-8Nf" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="20" symbolic="YES" id="cUB-xF-1Wr"/>
<constraint firstAttribute="bottom" secondItem="vES-W5-m4x" secondAttribute="bottom" constant="20" symbolic="YES" id="eHI-Tn-bYD"/>
<constraint firstAttribute="trailing" secondItem="Bwc-sd-6gm" secondAttribute="trailing" id="gKu-JH-NDR"/>
<constraint firstItem="Bme-XK-MMc" firstAttribute="centerX" secondItem="CnS-iI-dhr" secondAttribute="centerX" id="i7B-jz-xgm"/>
<constraint firstAttribute="centerX" secondItem="iGR-wo-ual" secondAttribute="centerX" id="kXB-yZ-sur"/>
<constraint firstItem="d3u-Ze-9uf" firstAttribute="centerY" secondItem="vES-W5-m4x" secondAttribute="centerY" id="oyK-p1-dQM"/>
<constraint firstItem="Bwc-sd-6gm" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" id="tea-fv-b1S"/>
<constraint firstItem="d3u-Ze-9uf" firstAttribute="top" secondItem="1Qo-iG-CQt" secondAttribute="bottom" constant="8" symbolic="YES" id="vYh-fH-UME"/>
@ -202,6 +303,12 @@
</backgroundFilters>
</view>
</window>
<userDefaultsController representsSharedInstance="YES" id="yy2-3W-Ocj"/>
<arrayController objectClassName="MPElementModel" id="mcS-ik-b0n">
<connections>
<binding destination="-2" name="contentArray" keyPath="elements" id="c96-Dv-HK1"/>
</connections>
</arrayController>
</objects>
<resources>
<image name="small-screen" width="25" height="15.5"/>

View File

@ -1980,7 +1980,7 @@
);
GCC_PREFIX_HEADER = "MasterPassword-Prefix.pch";
INFOPLIST_FILE = "MasterPassword-Info.plist";
PROVISIONING_PROFILE = "9BA628A2-36F5-438B-9F08-A2527CECC9F8";
PROVISIONING_PROFILE = "FE417B22-12E9-4B76-8470-2E62BCB104B1";
SKIP_INSTALL = NO;
WRAPPER_NAME = "Master Password.${WRAPPER_EXTENSION}";
};
@ -2000,7 +2000,7 @@
);
GCC_PREFIX_HEADER = "MasterPassword-Prefix.pch";
INFOPLIST_FILE = "MasterPassword-Info.plist";
PROVISIONING_PROFILE = "9BA628A2-36F5-438B-9F08-A2527CECC9F8";
PROVISIONING_PROFILE = "FE417B22-12E9-4B76-8470-2E62BCB104B1";
SKIP_INSTALL = NO;
WRAPPER_NAME = "Master Password.${WRAPPER_EXTENSION}";
};