mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 00:02:28 +00:00
Added EntryViewController
Fixed issues with firstResponder in MainWindowController
This commit is contained in:
@@ -63,7 +63,6 @@
|
||||
4C77E37A15B84A240093A587 /* MPAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C77E37915B84A240093A587 /* MPAppDelegate.m */; };
|
||||
4C77E37D15B84A240093A587 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C77E37B15B84A240093A587 /* MainMenu.xib */; };
|
||||
4C83814215BF4677001AE468 /* MPMainWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C83814115BF4677001AE468 /* MPMainWindowController.m */; };
|
||||
4C90D9B416CA4B18003081E7 /* MPMainWindowDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C90D9B316CA4B18003081E7 /* MPMainWindowDelegate.m */; };
|
||||
4CA0B2ED15BCADAC00654E32 /* SettingsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CA0B2EC15BCADAC00654E32 /* SettingsWindow.xib */; };
|
||||
4CA0B2F015BCADC800654E32 /* GeneralSettings.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CA0B2EF15BCADC800654E32 /* GeneralSettings.xib */; };
|
||||
4CA0B2F915BCAF6700654E32 /* MPGeneralSettingsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CA0B2F815BCAF6700654E32 /* MPGeneralSettingsController.m */; };
|
||||
@@ -83,6 +82,7 @@
|
||||
4CD78ABF16D155FF00768A1D /* 10_ContactTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78ABA16D155FF00768A1D /* 10_ContactTemplate.pdf */; };
|
||||
4CD78AC016D155FF00768A1D /* 11_CameraTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CD78ABB16D155FF00768A1D /* 11_CameraTemplate.pdf */; };
|
||||
4CD884B715BD47080042BBF8 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CD884B615BD47080042BBF8 /* MainWindow.xib */; };
|
||||
4CDF01A316D1B76700D0AC08 /* MPEntryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CDF01A216D1B76700D0AC08 /* MPEntryViewController.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@@ -102,7 +102,6 @@
|
||||
4C586FA116D07F6A00E7DB57 /* 02_MessageBoxWarningTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 02_MessageBoxWarningTemplate.pdf; sourceTree = "<group>"; };
|
||||
4C65FAE616D16DDB006E0577 /* MPPasswordInputController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPasswordInputController.h; sourceTree = "<group>"; };
|
||||
4C65FAE716D16DDB006E0577 /* MPPasswordInputController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPPasswordInputController.m; sourceTree = "<group>"; };
|
||||
4C65FAEB16D16FB5006E0577 /* MPViewControllerProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPViewControllerProtocol.h; sourceTree = "<group>"; };
|
||||
4C669B3016760ED100DD0774 /* AesInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AesInputStream.h; sourceTree = "<group>"; };
|
||||
4C669B3116760ED100DD0774 /* AesInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AesInputStream.m; sourceTree = "<group>"; };
|
||||
4C669B3216760ED100DD0774 /* AesOutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AesOutputStream.h; sourceTree = "<group>"; };
|
||||
@@ -194,8 +193,6 @@
|
||||
4C77E37C15B84A240093A587 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
4C83814015BF4677001AE468 /* MPMainWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMainWindowController.h; sourceTree = "<group>"; };
|
||||
4C83814115BF4677001AE468 /* MPMainWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMainWindowController.m; sourceTree = "<group>"; };
|
||||
4C90D9B216CA4B18003081E7 /* MPMainWindowDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMainWindowDelegate.h; sourceTree = "<group>"; };
|
||||
4C90D9B316CA4B18003081E7 /* MPMainWindowDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMainWindowDelegate.m; sourceTree = "<group>"; };
|
||||
4CA0B2EC15BCADAC00654E32 /* SettingsWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SettingsWindow.xib; sourceTree = "<group>"; };
|
||||
4CA0B2EF15BCADC800654E32 /* GeneralSettings.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GeneralSettings.xib; sourceTree = "<group>"; };
|
||||
4CA0B2F715BCAF6700654E32 /* MPGeneralSettingsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGeneralSettingsController.h; sourceTree = "<group>"; };
|
||||
@@ -227,6 +224,8 @@
|
||||
4CD78ABA16D155FF00768A1D /* 10_ContactTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 10_ContactTemplate.pdf; sourceTree = "<group>"; };
|
||||
4CD78ABB16D155FF00768A1D /* 11_CameraTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 11_CameraTemplate.pdf; sourceTree = "<group>"; };
|
||||
4CD884B615BD47080042BBF8 /* MainWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
|
||||
4CDF01A116D1B76700D0AC08 /* MPEntryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPEntryViewController.h; sourceTree = "<group>"; };
|
||||
4CDF01A216D1B76700D0AC08 /* MPEntryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPEntryViewController.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -273,8 +272,6 @@
|
||||
4C77E37915B84A240093A587 /* MPAppDelegate.m */,
|
||||
4CC6258F15BA1C99002F5B11 /* MPOutlineViewDelegate.h */,
|
||||
4CC6259015BA1C99002F5B11 /* MPOutlineViewDelegate.m */,
|
||||
4C90D9B216CA4B18003081E7 /* MPMainWindowDelegate.h */,
|
||||
4C90D9B316CA4B18003081E7 /* MPMainWindowDelegate.m */,
|
||||
);
|
||||
name = Delegates;
|
||||
sourceTree = "<group>";
|
||||
@@ -487,6 +484,8 @@
|
||||
4C2E382516D1470200037A9D /* MPViewController.m */,
|
||||
4C65FAE616D16DDB006E0577 /* MPPasswordInputController.h */,
|
||||
4C65FAE716D16DDB006E0577 /* MPPasswordInputController.m */,
|
||||
4CDF01A116D1B76700D0AC08 /* MPEntryViewController.h */,
|
||||
4CDF01A216D1B76700D0AC08 /* MPEntryViewController.m */,
|
||||
);
|
||||
name = Controller;
|
||||
sourceTree = "<group>";
|
||||
@@ -495,7 +494,6 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CA0B30D15BCB6FD00654E32 /* MPSettingsTabProtocoll.h */,
|
||||
4C65FAEB16D16FB5006E0577 /* MPViewControllerProtocol.h */,
|
||||
);
|
||||
name = Protocolls;
|
||||
sourceTree = "<group>";
|
||||
@@ -690,11 +688,11 @@
|
||||
4C669BA016760ED100DD0774 /* Salsa20RandomStream.m in Sources */,
|
||||
4C669BA116760ED100DD0774 /* Utils.m in Sources */,
|
||||
4C669BA216760ED100DD0774 /* UUID.m in Sources */,
|
||||
4C90D9B416CA4B18003081E7 /* MPMainWindowDelegate.m in Sources */,
|
||||
4C75CE3C16CB128700F61A4D /* MPDatabaseController.m in Sources */,
|
||||
4C2E382316D1421B00037A9D /* MPIconHelper.m in Sources */,
|
||||
4C2E382616D1470200037A9D /* MPViewController.m in Sources */,
|
||||
4C65FAE916D16DDB006E0577 /* MPPasswordInputController.m in Sources */,
|
||||
4CDF01A316D1B76700D0AC08 /* MPEntryViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="NSCustomObject" id="1001">
|
||||
<string key="NSClassName">NSObject</string>
|
||||
<string key="NSClassName">MPEntryViewController</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1003">
|
||||
<string key="NSClassName">FirstResponder</string>
|
||||
@@ -68,7 +68,7 @@
|
||||
<string key="NSFrameSize">{351, 544}</string>
|
||||
<reference key="NSSuperview" ref="538218614"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="371078858"/>
|
||||
<reference key="NSNextKeyView" ref="604836755"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:13</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
@@ -232,6 +232,7 @@
|
||||
<string key="NSFrame">{{1, 119}, {223, 15}}</string>
|
||||
<reference key="NSSuperview" ref="836307073"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="661617748"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:60</string>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSsFlags">1</int>
|
||||
@@ -258,7 +259,7 @@
|
||||
<string key="NSFrameSize">{353, 562}</string>
|
||||
<reference key="NSSuperview" ref="1017866760"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="538218614"/>
|
||||
<reference key="NSNextKeyView" ref="371078858"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<int key="NSsFlags">133682</int>
|
||||
<reference key="NSVScroller" ref="604836755"/>
|
||||
@@ -274,6 +275,7 @@
|
||||
<string key="NSFrameSize">{353, 563}</string>
|
||||
<reference key="NSSuperview" ref="817972379"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="836307073"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:11</string>
|
||||
<string key="NSClassName">NSView</string>
|
||||
</object>
|
||||
@@ -287,6 +289,7 @@
|
||||
<string key="NSFrame">{{13, 10}, {323, 539}}</string>
|
||||
<reference key="NSSuperview" ref="661617748"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="835935918"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<array class="NSMutableArray" key="NSTabViewItems">
|
||||
<object class="NSTabViewItem" id="962181595">
|
||||
@@ -297,7 +300,7 @@
|
||||
<string key="NSFrame">{{10, 33}, {303, 493}}</string>
|
||||
<reference key="NSSuperview" ref="590827347"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="590827347"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:11</string>
|
||||
</object>
|
||||
<string key="NSLabel">Tab</string>
|
||||
@@ -335,6 +338,7 @@
|
||||
<string key="NSFrame">{{354, 0}, {349, 563}}</string>
|
||||
<reference key="NSSuperview" ref="817972379"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="590827347"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:13</string>
|
||||
<string key="NSClassName">NSView</string>
|
||||
</object>
|
||||
@@ -342,6 +346,7 @@
|
||||
<string key="NSFrameSize">{703, 563}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="1017866760"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSIsVertical">YES</bool>
|
||||
<int key="NSDividerStyle">2</int>
|
||||
@@ -350,12 +355,21 @@
|
||||
<string key="NSFrameSize">{703, 563}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<reference key="NSNextKeyView" ref="817972379"/>
|
||||
<string key="NSClassName">NSView</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords"/>
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<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">42</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
@@ -825,10 +839,26 @@
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">41</int>
|
||||
<int key="maxID">42</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MPEntryViewController</string>
|
||||
<string key="superclassName">MPViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/MPEntryViewController.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>
|
||||
|
||||
@@ -44,19 +44,7 @@
|
||||
}
|
||||
|
||||
- (void)openDocument:(id)sender {
|
||||
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
|
||||
[openPanel setCanChooseDirectories:NO];
|
||||
[openPanel setCanChooseFiles:YES];
|
||||
[openPanel setCanCreateDirectories:NO];
|
||||
[openPanel setAllowsMultipleSelection:NO];
|
||||
[openPanel beginSheetModalForWindow:[self.mainWindowController window] completionHandler:^(NSInteger result){
|
||||
if(result == NSFileHandlingPanelOKButton) {
|
||||
NSURL *file = [[openPanel URLs] lastObject];
|
||||
if(file) {
|
||||
[self.mainWindowController presentPasswordInput:(NSURL *)file];
|
||||
}
|
||||
}
|
||||
}];
|
||||
[self.mainWindowController openDocument];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,17 +8,28 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class MPDatabaseDocument;
|
||||
/*
|
||||
Notification is posted, when a database is loaded
|
||||
The userInfo dictionary contains the following keys
|
||||
MPDatabaseControllerDatabaseKey
|
||||
*/
|
||||
APPKIT_EXTERN NSString *const MPDatabaseControllerDidLoadDatabaseNotification;
|
||||
APPKIT_EXTERN NSString *const MPDatabaseControllerDidCloseDatabaseNotification;
|
||||
/*
|
||||
Database loaded or closed
|
||||
*/
|
||||
APPKIT_EXTERN NSString *const MPDatabaseControllerDatabaseKey;
|
||||
|
||||
typedef enum{
|
||||
MPDatabaseVersion1,
|
||||
MPDatabaseVersion2
|
||||
} MPDatabaseVersion;
|
||||
|
||||
@class MPDatabaseDocument;
|
||||
|
||||
@interface MPDatabaseController : NSObject
|
||||
|
||||
@property (retain, readonly) MPDatabaseDocument *database;
|
||||
@property (retain, readonly, nonatomic) MPDatabaseDocument *database;
|
||||
|
||||
+ (MPDatabaseController *)defaultController;
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#import "MPDatabaseController.h"
|
||||
#import "MPDatabaseDocument.h"
|
||||
|
||||
NSString *const MPDatabaseControllerDidLoadDatabaseNotification = @"MPDatabaseControllerDidLoadDatabaseNotification";
|
||||
NSString *const MPDatabaseControllerDidCloseDatabaseNotification = @"MPDatabaseControllerDidCloseDatabaseNotification";
|
||||
NSString *const MPDatabaseControllerDatabaseKey = @"MPDatabaseControllerDatabaseKey";
|
||||
|
||||
@interface MPDatabaseController ()
|
||||
|
||||
@property (retain) MPDatabaseDocument *database;
|
||||
@@ -37,7 +41,6 @@
|
||||
}
|
||||
|
||||
- (MPDatabaseDocument *)createDatabase:(MPDatabaseVersion)version password:(NSString *)password keyfile:(NSURL *)key {
|
||||
|
||||
return self.database;
|
||||
}
|
||||
|
||||
@@ -46,4 +49,21 @@
|
||||
return self.database;
|
||||
}
|
||||
|
||||
- (void)setDatabase:(MPDatabaseDocument *)database {
|
||||
if(_database != database) {
|
||||
if(_database) {
|
||||
NSDictionary *userInfo = @{ MPDatabaseControllerDatabaseKey: _database };
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPDatabaseControllerDidCloseDatabaseNotification
|
||||
object:self
|
||||
userInfo:userInfo];
|
||||
}
|
||||
[_database release];
|
||||
_database = [database retain];
|
||||
NSDictionary *userInfo = @{ MPDatabaseControllerDatabaseKey: _database };
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPDatabaseControllerDidLoadDatabaseNotification
|
||||
object:self
|
||||
userInfo:userInfo];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
13
MacPass/MPEntryViewController.h
Normal file
13
MacPass/MPEntryViewController.h
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// MPEntryViewController.h
|
||||
// MacPass
|
||||
//
|
||||
// Created by michael starke on 18.02.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPViewController.h"
|
||||
|
||||
@interface MPEntryViewController : MPViewController
|
||||
|
||||
@end
|
||||
21
MacPass/MPEntryViewController.m
Normal file
21
MacPass/MPEntryViewController.m
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// MPEntryViewController.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by michael starke on 18.02.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPEntryViewController.h"
|
||||
|
||||
@interface MPEntryViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation MPEntryViewController
|
||||
|
||||
- (id)init {
|
||||
return [[MPEntryViewController alloc] initWithNibName:@"EntryView" bundle:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -12,11 +12,16 @@ APPKIT_EXTERN NSString *const MPMainWindowControllerPasswordKey;
|
||||
APPKIT_EXTERN NSString *const MPMainWindowControllerKeyfileKey;
|
||||
|
||||
@class MPDatabaseDocument;
|
||||
@class MPViewController;
|
||||
|
||||
@interface MPMainWindowController : NSWindowController
|
||||
|
||||
@property (readonly, retain) MPDatabaseDocument *database;
|
||||
|
||||
- (void)presentPasswordInput:(NSURL *)file;
|
||||
- (void)openDocument;
|
||||
- (void)showEntries;
|
||||
/*
|
||||
Sets the content View controller
|
||||
@param viewController - use nil to reset to welcome screen
|
||||
*/
|
||||
- (void)setContentViewController:(MPViewController *)viewController;
|
||||
|
||||
@end
|
||||
|
||||
@@ -9,9 +9,10 @@
|
||||
#import "MPMainWindowController.h"
|
||||
#import "MPOutlineDataSource.h"
|
||||
#import "MPOutlineViewDelegate.h"
|
||||
#import "MPMainWindowDelegate.h"
|
||||
#import "MPDatabaseController.h"
|
||||
#import "MPDatabaseDocument.h"
|
||||
#import "MPPasswordInputController.h"
|
||||
#import "MPEntryViewController.h"
|
||||
|
||||
NSString *const MPMainWindowControllerPasswordKey = @"MPMainWindowControllerPasswordKey";
|
||||
NSString *const MPMainWindowControllerKeyfileKey = @"MPMainWindowControllerKeyfileKey";
|
||||
@@ -27,12 +28,14 @@ NSString *const kOutlineViewIdentifier = @"OutlineView";
|
||||
@property (assign) IBOutlet NSView *contentView;
|
||||
@property (retain) IBOutlet NSView *welcomeView;
|
||||
|
||||
@property (retain) NSURL *openFile;
|
||||
@property (retain) MPOutlineDataSource *datasource;
|
||||
@property (retain) MPOutlineViewDelegate *outlineDelegate;
|
||||
@property (retain) MPMainWindowDelegate *windowDelegate;
|
||||
|
||||
@property (retain) MPPasswordInputController *passwordInputController;
|
||||
@property (retain) MPEntryViewController *entryViewController;
|
||||
|
||||
- (void)updateData;
|
||||
- (void)didOpenDocument:(NSNotification *)notification;
|
||||
|
||||
@end
|
||||
|
||||
@@ -42,35 +45,69 @@ NSString *const kOutlineViewIdentifier = @"OutlineView";
|
||||
self = [super initWithWindowNibName:@"MainWindow" owner:self];
|
||||
if( self ) {
|
||||
NSArray *topLevelObjects;
|
||||
self.windowDelegate = [[[MPMainWindowDelegate alloc] init] autorelease];
|
||||
self.outlineDelegate = [[[MPOutlineViewDelegate alloc] init] autorelease];
|
||||
self.datasource = [[[MPOutlineDataSource alloc] init] autorelease];
|
||||
[[NSBundle mainBundle] loadNibNamed:@"WelcomeView" owner:self topLevelObjects:&topLevelObjects];
|
||||
[self.welcomeView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(didOpenDocument:)
|
||||
name:MPDatabaseControllerDidLoadDatabaseNotification
|
||||
object:nil];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)windowDidLoad
|
||||
{
|
||||
[super windowDidLoad];
|
||||
/*
|
||||
Setup Connections for Outline View
|
||||
*/
|
||||
|
||||
[self.window setDelegate:self.windowDelegate];
|
||||
[[self.outlineView outlineTableColumn] setIdentifier:kColumnIdentifier];
|
||||
[self.outlineView setDelegate:self.outlineDelegate];
|
||||
[self.outlineView setDataSource:self.datasource];
|
||||
|
||||
[self setContentViewController:nil];
|
||||
}
|
||||
|
||||
- (void)setContentViewController:(MPViewController *)viewController {
|
||||
NSView *newContentView = self.welcomeView;
|
||||
if(viewController && viewController.view) {
|
||||
newContentView = viewController.view;
|
||||
}
|
||||
/*
|
||||
Set correct size and resizing for view
|
||||
*/
|
||||
[newContentView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
||||
NSSize frameSize = [self.contentView frame].size;
|
||||
[newContentView setFrame:NSMakeRect(0,0, frameSize.width, frameSize.height)];
|
||||
|
||||
/*
|
||||
Add Welcome Screen
|
||||
Add or replace subview
|
||||
*/
|
||||
NSSize frameSize = [self.contentView frame].size;
|
||||
[self.contentView setFrame:NSMakeRect(0,0, frameSize.width, frameSize.height)];
|
||||
[self.contentView addSubview:self.welcomeView];
|
||||
|
||||
NSArray *subViews = [self.contentView subviews];
|
||||
BOOL hasSubViews = ([subViews count] > 0);
|
||||
if(hasSubViews) {
|
||||
NSView *subView = subViews[0];
|
||||
assert(subView);
|
||||
[self.contentView replaceSubview:subView with:newContentView];
|
||||
}
|
||||
else {
|
||||
[self.contentView addSubview:newContentView];
|
||||
}
|
||||
/*
|
||||
Set focus AFTER having added the view
|
||||
*/
|
||||
[self.window makeFirstResponder:[viewController reconmendedFirstResponder]];
|
||||
}
|
||||
|
||||
- (void)didOpenDocument:(NSNotification *)notification {
|
||||
[self updateData];
|
||||
[self showEntries];
|
||||
}
|
||||
|
||||
- (void)updateData {
|
||||
@@ -79,16 +116,31 @@ NSString *const kOutlineViewIdentifier = @"OutlineView";
|
||||
[self.outlineView expandItem:dbContoller.database.root expandChildren:NO];
|
||||
}
|
||||
|
||||
- (void)presentPasswordInput:(NSURL *)file {
|
||||
NSArray *topLevelObjects;
|
||||
self.openFile = file;
|
||||
[[NSBundle mainBundle] loadNibNamed:@"PasswordView" owner:self topLevelObjects:&topLevelObjects];
|
||||
[self.passwordView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
||||
NSSize frameSize = [self.contentView frame].size;
|
||||
[self.passwordView setFrame:NSMakeRect(0,0, frameSize.width, frameSize.height)];
|
||||
[self.contentView setAutoresizesSubviews:YES];
|
||||
[self.contentView replaceSubview:self.welcomeView with:self.passwordView];
|
||||
[self.window makeFirstResponder:self.passwordView];
|
||||
- (void)openDocument {
|
||||
|
||||
if(!self.passwordInputController) {
|
||||
self.passwordInputController = [[[MPPasswordInputController alloc] init] autorelease];
|
||||
}
|
||||
|
||||
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
|
||||
[openPanel setCanChooseDirectories:NO];
|
||||
[openPanel setCanChooseFiles:YES];
|
||||
[openPanel setCanCreateDirectories:NO];
|
||||
[openPanel setAllowsMultipleSelection:NO];
|
||||
[openPanel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result){
|
||||
if(result == NSFileHandlingPanelOKButton) {
|
||||
NSURL *file = [[openPanel URLs] lastObject];
|
||||
self.passwordInputController.fileURL = file;
|
||||
[self setContentViewController:self.passwordInputController];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)showEntries {
|
||||
if(!self.entryViewController) {
|
||||
self.entryViewController = [[[MPEntryViewController alloc] init] autorelease];
|
||||
}
|
||||
[self setContentViewController:self.entryViewController];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// MPMainWindowDelegate.h
|
||||
// MacPass
|
||||
//
|
||||
// Created by michael starke on 12.02.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MPMainWindowDelegate : NSObject <NSWindowDelegate>
|
||||
|
||||
@end
|
||||
@@ -1,14 +0,0 @@
|
||||
//
|
||||
// MPMainWindowDelegate.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by michael starke on 12.02.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPMainWindowDelegate.h"
|
||||
|
||||
@implementation MPMainWindowDelegate
|
||||
|
||||
|
||||
@end
|
||||
@@ -7,8 +7,9 @@
|
||||
//
|
||||
|
||||
#import "MPViewController.h"
|
||||
#import "MPViewControllerProtocol.h"
|
||||
|
||||
@interface MPPasswordInputController : MPViewController <MPViewControllerProtocol>
|
||||
@interface MPPasswordInputController : MPViewController
|
||||
|
||||
@property (retain) NSURL *fileURL;
|
||||
|
||||
@end
|
||||
|
||||
@@ -15,27 +15,36 @@
|
||||
|
||||
- (IBAction)selectKeyFile:(id)sender;
|
||||
- (IBAction)open:(id)sender;
|
||||
- (void)showError;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MPPasswordInputController
|
||||
|
||||
- (id)init {
|
||||
return [[MPPasswordInputController alloc] initWithNibName:@"PasswordView" bundle:nil];
|
||||
return [[MPPasswordInputController alloc] initWithNibName:@"PasswordInputView" bundle:nil];
|
||||
}
|
||||
|
||||
- (NSResponder *)reconmendetFirstResponder {
|
||||
return nil;
|
||||
- (NSResponder *)reconmendedFirstResponder {
|
||||
return self.passwordTextField;
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)selectKeyFile:(id)sender {
|
||||
|
||||
}
|
||||
|
||||
- (IBAction)open:(id)sender {
|
||||
NSString *password = [self.passwordTextField stringValue];
|
||||
[[MPDatabaseController defaultController] openDatabase:self.openFile password:password keyfile:nil];
|
||||
NSString *password = [self.passwordTextField stringValue];
|
||||
[self.passwordTextField setStringValue:@""];
|
||||
MPDatabaseDocument *document = [[MPDatabaseController defaultController] openDatabase:self.fileURL
|
||||
password:password
|
||||
keyfile:nil];
|
||||
if(!document) {
|
||||
[self showError];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)showError {
|
||||
NSLog(@"Something went wrong");
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
@interface MPViewController : NSViewController
|
||||
|
||||
- (void)didLoadView;
|
||||
- (NSResponder *)reconmendedFirstResponder;
|
||||
|
||||
@end
|
||||
|
||||
@@ -19,4 +19,8 @@
|
||||
// override
|
||||
}
|
||||
|
||||
- (NSResponder *)reconmendedFirstResponder {
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// MPViewControllerProtocol.h
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 17.02.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol MPViewControllerProtocol <NSObject>
|
||||
|
||||
@required
|
||||
- (NSResponder *)reconmendetFirstResponder;
|
||||
|
||||
@end
|
||||
@@ -42,10 +42,54 @@
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="NSSecureTextField" id="219521947">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{128, 163}, {191, 22}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSSecureTextFieldCell" key="NSCell" id="160320867">
|
||||
<int key="NSCellFlags">342884416</int>
|
||||
<int key="NSCellFlags2">272630848</int>
|
||||
<string key="NSContents"/>
|
||||
<object class="NSFont" key="NSSupport" id="786940182">
|
||||
<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="219521947"/>
|
||||
<bool key="NSDrawsBackground">YES</bool>
|
||||
<object class="NSColor" key="NSBackgroundColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">textBackgroundColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColor" key="NSTextColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">textColor</string>
|
||||
<object class="NSColor" key="NSColor" id="418573088">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MAA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<array key="NSAllowedInputLocales">
|
||||
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
|
||||
</array>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
<object class="NSButton" id="723622123">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{186, 69}, {97, 32}}</string>
|
||||
<string key="NSFrame">{{228, 127}, {97, 32}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="769513826"/>
|
||||
@@ -55,11 +99,7 @@
|
||||
<int key="NSCellFlags">67108864</int>
|
||||
<int key="NSCellFlags2">134217728</int>
|
||||
<string key="NSContents">Browse...</string>
|
||||
<object class="NSFont" key="NSSupport" id="786940182">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">13</double>
|
||||
<int key="NSfFlags">1044</int>
|
||||
</object>
|
||||
<reference key="NSSupport" ref="786940182"/>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
<reference key="NSControlView" ref="723622123"/>
|
||||
<int key="NSButtonFlags">-2038284288</int>
|
||||
@@ -74,10 +114,10 @@
|
||||
<object class="NSTextField" id="662046682">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 108}, {64, 17}}</string>
|
||||
<string key="NSFrame">{{59, 166}, {64, 17}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="83199440"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1535</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="108091909">
|
||||
@@ -100,10 +140,7 @@
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlTextColor</string>
|
||||
<object class="NSColor" key="NSColor" id="418573088">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MAA</bytes>
|
||||
</object>
|
||||
<reference key="NSColor" ref="418573088"/>
|
||||
</object>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
@@ -111,7 +148,7 @@
|
||||
<object class="NSTextField" id="333885704">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{35, 78}, {46, 17}}</string>
|
||||
<string key="NSFrame">{{77, 136}, {46, 17}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="723622123"/>
|
||||
@@ -129,48 +166,10 @@
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
<object class="NSSecureTextField" id="83199440">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{86, 105}, {191, 22}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="333885704"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSSecureTextFieldCell" key="NSCell" id="111035397">
|
||||
<int key="NSCellFlags">342884416</int>
|
||||
<int key="NSCellFlags2">272630848</int>
|
||||
<string key="NSContents"/>
|
||||
<reference key="NSSupport" ref="786940182"/>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
<reference key="NSControlView" ref="83199440"/>
|
||||
<bool key="NSDrawsBackground">YES</bool>
|
||||
<object class="NSColor" key="NSBackgroundColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">textBackgroundColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColor" key="NSTextColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">textColor</string>
|
||||
<reference key="NSColor" ref="418573088"/>
|
||||
</object>
|
||||
<array key="NSAllowedInputLocales">
|
||||
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
|
||||
</array>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
<object class="NSButton" id="769513826">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{209, 13}, {74, 32}}</string>
|
||||
<string key="NSFrame">{{251, 71}, {74, 32}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
@@ -192,7 +191,7 @@
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{363, 232}</string>
|
||||
<string key="NSFrameSize">{447, 347}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="662046682"/>
|
||||
@@ -209,14 +208,6 @@
|
||||
</object>
|
||||
<int key="connectionID">143</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">passwordTextField</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="83199440"/>
|
||||
</object>
|
||||
<int key="connectionID">151</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">selectKeyFile:</string>
|
||||
@@ -233,6 +224,22 @@
|
||||
</object>
|
||||
<int key="connectionID">154</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">passwordTextField</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="219521947"/>
|
||||
</object>
|
||||
<int key="connectionID">196</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">nextKeyView</string>
|
||||
<reference key="source" ref="219521947"/>
|
||||
<reference key="destination" ref="723622123"/>
|
||||
</object>
|
||||
<int key="connectionID">197</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
@@ -316,7 +323,7 @@
|
||||
<reference key="firstItem" ref="723622123"/>
|
||||
<int key="firstAttribute">3</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="83199440"/>
|
||||
<reference key="secondItem" ref="219521947"/>
|
||||
<int key="secondAttribute">4</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||
@@ -328,11 +335,59 @@
|
||||
<float key="scoringTypeFloat">40</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="207368608">
|
||||
<reference key="firstItem" ref="219521947"/>
|
||||
<int key="firstAttribute">5</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="662046682"/>
|
||||
<int key="secondAttribute">6</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||
<double key="value">8</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">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="649511608">
|
||||
<reference key="firstItem" ref="1005"/>
|
||||
<int key="firstAttribute">9</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="219521947"/>
|
||||
<int key="secondAttribute">9</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">0.0</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">2</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="679367678">
|
||||
<reference key="firstItem" ref="1005"/>
|
||||
<int key="firstAttribute">10</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="219521947"/>
|
||||
<int key="secondAttribute">10</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">0.0</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">2</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="937587174">
|
||||
<reference key="firstItem" ref="723622123"/>
|
||||
<reference key="firstItem" ref="219521947"/>
|
||||
<int key="firstAttribute">6</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="83199440"/>
|
||||
<reference key="secondItem" ref="723622123"/>
|
||||
<int key="secondAttribute">6</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
@@ -344,6 +399,22 @@
|
||||
<float key="scoringTypeFloat">24</float>
|
||||
<int key="contentType">2</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="151404172">
|
||||
<reference key="firstItem" ref="219521947"/>
|
||||
<int key="firstAttribute">10</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="662046682"/>
|
||||
<int key="secondAttribute">10</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">0.0</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="1005"/>
|
||||
<int key="scoringType">6</int>
|
||||
<float key="scoringTypeFloat">24</float>
|
||||
<int key="contentType">2</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="957344773">
|
||||
<reference key="firstItem" ref="333885704"/>
|
||||
<int key="firstAttribute">10</int>
|
||||
@@ -360,92 +431,12 @@
|
||||
<float key="scoringTypeFloat">24</float>
|
||||
<int key="contentType">2</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="339307312">
|
||||
<reference key="firstItem" ref="333885704"/>
|
||||
<int key="firstAttribute">6</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="662046682"/>
|
||||
<int key="secondAttribute">6</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">0.0</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="1005"/>
|
||||
<int key="scoringType">6</int>
|
||||
<float key="scoringTypeFloat">24</float>
|
||||
<int key="contentType">2</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="679367678">
|
||||
<reference key="firstItem" ref="1005"/>
|
||||
<int key="firstAttribute">10</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="83199440"/>
|
||||
<int key="secondAttribute">10</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">0.0</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">2</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="744080106">
|
||||
<reference key="firstItem" ref="1005"/>
|
||||
<int key="firstAttribute">6</int>
|
||||
<int key="relation">1</int>
|
||||
<reference key="secondItem" ref="83199440"/>
|
||||
<int key="secondAttribute">6</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">9</int>
|
||||
<float key="scoringTypeFloat">40</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="649511608">
|
||||
<reference key="firstItem" ref="83199440"/>
|
||||
<int key="firstAttribute">9</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="1005"/>
|
||||
<int key="secondAttribute">9</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">0.0</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">2</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="207368608">
|
||||
<reference key="firstItem" ref="83199440"/>
|
||||
<int key="firstAttribute">5</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="662046682"/>
|
||||
<int key="secondAttribute">6</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBNSLayoutSymbolicConstant" key="constant">
|
||||
<double key="value">8</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">3</int>
|
||||
</object>
|
||||
<object class="IBNSLayoutConstraint" id="151404172">
|
||||
<object class="IBNSLayoutConstraint" id="72942573">
|
||||
<reference key="firstItem" ref="662046682"/>
|
||||
<int key="firstAttribute">10</int>
|
||||
<int key="firstAttribute">6</int>
|
||||
<int key="relation">0</int>
|
||||
<reference key="secondItem" ref="83199440"/>
|
||||
<int key="secondAttribute">10</int>
|
||||
<reference key="secondItem" ref="333885704"/>
|
||||
<int key="secondAttribute">6</int>
|
||||
<float key="multiplier">1</float>
|
||||
<object class="IBLayoutConstant" key="constant">
|
||||
<double key="value">0.0</double>
|
||||
@@ -472,11 +463,11 @@
|
||||
<float key="scoringTypeFloat">40</float>
|
||||
<int key="contentType">3</int>
|
||||
</object>
|
||||
<reference ref="83199440"/>
|
||||
<reference ref="723622123"/>
|
||||
<reference ref="769513826"/>
|
||||
<reference ref="333885704"/>
|
||||
<reference ref="662046682"/>
|
||||
<reference ref="219521947"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
@@ -493,35 +484,6 @@
|
||||
<reference key="object" ref="736946738"/>
|
||||
<reference key="parent" ref="769513826"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="83199440"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="111035397"/>
|
||||
<object class="IBNSLayoutConstraint" id="856703813">
|
||||
<reference key="firstItem" ref="83199440"/>
|
||||
<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">191</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="83199440"/>
|
||||
<int key="scoringType">9</int>
|
||||
<float key="scoringTypeFloat">40</float>
|
||||
<int key="contentType">1</int>
|
||||
</object>
|
||||
</array>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">7</int>
|
||||
<reference key="object" ref="111035397"/>
|
||||
<reference key="parent" ref="83199440"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">17</int>
|
||||
<reference key="object" ref="333885704"/>
|
||||
@@ -566,11 +528,6 @@
|
||||
<reference key="object" ref="1041224580"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">89</int>
|
||||
<reference key="object" ref="856703813"/>
|
||||
<reference key="parent" ref="83199440"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">122</int>
|
||||
<reference key="object" ref="1001566026"/>
|
||||
@@ -581,53 +538,82 @@
|
||||
<reference key="object" ref="781301592"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">131</int>
|
||||
<reference key="object" ref="339307312"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">132</int>
|
||||
<reference key="object" ref="957344773"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">142</int>
|
||||
<reference key="object" ref="679367678"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">133</int>
|
||||
<reference key="object" ref="949733562"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">107</int>
|
||||
<reference key="object" ref="937587174"/>
|
||||
<int key="objectID">177</int>
|
||||
<reference key="object" ref="219521947"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="160320867"/>
|
||||
<object class="IBNSLayoutConstraint" id="856703813">
|
||||
<reference key="firstItem" ref="219521947"/>
|
||||
<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">191</double>
|
||||
</object>
|
||||
<float key="priority">1000</float>
|
||||
<reference key="containingView" ref="219521947"/>
|
||||
<int key="scoringType">9</int>
|
||||
<float key="scoringTypeFloat">40</float>
|
||||
<int key="contentType">1</int>
|
||||
</object>
|
||||
</array>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">45</int>
|
||||
<reference key="object" ref="207368608"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
<int key="objectID">178</int>
|
||||
<reference key="object" ref="160320867"/>
|
||||
<reference key="parent" ref="219521947"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">123</int>
|
||||
<reference key="object" ref="744080106"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">134</int>
|
||||
<int key="objectID">181</int>
|
||||
<reference key="object" ref="151404172"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">119</int>
|
||||
<int key="objectID">182</int>
|
||||
<reference key="object" ref="937587174"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">184</int>
|
||||
<reference key="object" ref="856703813"/>
|
||||
<reference key="parent" ref="219521947"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">187</int>
|
||||
<reference key="object" ref="679367678"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">188</int>
|
||||
<reference key="object" ref="649511608"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">112</int>
|
||||
<int key="objectID">193</int>
|
||||
<reference key="object" ref="207368608"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">194</int>
|
||||
<reference key="object" ref="72942573"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">195</int>
|
||||
<reference key="object" ref="862589174"/>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
@@ -639,14 +625,13 @@
|
||||
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<array class="NSMutableArray" key="1.IBNSViewMetadataConstraints">
|
||||
<reference ref="781301592"/>
|
||||
<reference ref="151404172"/>
|
||||
<reference ref="207368608"/>
|
||||
<reference ref="649511608"/>
|
||||
<reference ref="744080106"/>
|
||||
<reference ref="679367678"/>
|
||||
<reference ref="339307312"/>
|
||||
<reference ref="72942573"/>
|
||||
<reference ref="957344773"/>
|
||||
<reference ref="151404172"/>
|
||||
<reference ref="937587174"/>
|
||||
<reference ref="679367678"/>
|
||||
<reference ref="649511608"/>
|
||||
<reference ref="207368608"/>
|
||||
<reference ref="862589174"/>
|
||||
<reference ref="1041224580"/>
|
||||
<reference ref="1001566026"/>
|
||||
@@ -656,72 +641,71 @@
|
||||
<boolean value="NO" key="104.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="104.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="105.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="107.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="112.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="114.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="119.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="122.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="123.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="124.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="132.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="133.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="142.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<boolean value="NO" key="17.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="17.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<array class="NSMutableArray" key="177.IBNSViewMetadataConstraints">
|
||||
<reference ref="856703813"/>
|
||||
</array>
|
||||
<boolean value="NO" key="177.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="177.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="178.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="18.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="181.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="182.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="184.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="187.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="188.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="193.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="194.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="195.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<boolean value="NO" key="2.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<boolean value="NO" key="31.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="31.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="32.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="45.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<array class="NSMutableArray" key="6.IBNSViewMetadataConstraints">
|
||||
<reference ref="856703813"/>
|
||||
</array>
|
||||
<boolean value="NO" key="6.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="89.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">154</int>
|
||||
<int key="maxID">197</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">MPPasswordInputController</string>
|
||||
<string key="superclassName">MPViewController</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">selectKeyFile:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">selectKeyFile:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="open:">id</string>
|
||||
<string key="selectKeyFile:">id</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||
<object class="IBActionInfo" key="open:">
|
||||
<string key="name">open:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="selectKeyFile:">
|
||||
<string key="name">selectKeyFile:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="openDocument">NSButton</string>
|
||||
<string key="passwordTextField">NSSecureTextField</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="openDocument">
|
||||
<string key="name">openDocument</string>
|
||||
<string key="candidateClassName">NSButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="passwordTextField">
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">passwordTextField</string>
|
||||
<string key="NS.object.0">NSSecureTextField</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">passwordTextField</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">passwordTextField</string>
|
||||
<string key="candidateClassName">NSSecureTextField</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/MPPasswordInputController.h</string>
|
||||
|
||||
Reference in New Issue
Block a user