mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 15:52:19 +00:00
Added AI assets
Keyfiles are now usable for opening databases
This commit is contained in:
529
Assets/Keepass Icons.ai
Normal file
529
Assets/Keepass Icons.ai
Normal file
File diff suppressed because one or more lines are too long
@@ -72,6 +72,7 @@
|
||||
4C77E37315B84A240093A587 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C77E37215B84A240093A587 /* main.m */; };
|
||||
4C77E37A15B84A240093A587 /* MPAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C77E37915B84A240093A587 /* MPAppDelegate.m */; };
|
||||
4C77E37D15B84A240093A587 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C77E37B15B84A240093A587 /* MainMenu.xib */; };
|
||||
4C811C8316ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C811C8216ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m */; };
|
||||
4C83814215BF4677001AE468 /* MPMainWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C83814115BF4677001AE468 /* MPMainWindowController.m */; };
|
||||
4C888C9016EB6C91003D34A1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C888C8E16EB6C91003D34A1 /* Localizable.strings */; };
|
||||
4C888C9316EB6F5E003D34A1 /* MPToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C888C9216EB6F5E003D34A1 /* MPToolbarItem.m */; };
|
||||
@@ -229,6 +230,8 @@
|
||||
4C77E37815B84A240093A587 /* MPAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPAppDelegate.h; sourceTree = "<group>"; };
|
||||
4C77E37915B84A240093A587 /* MPAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPAppDelegate.m; sourceTree = "<group>"; };
|
||||
4C77E37C15B84A240093A587 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
4C811C8116ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPKeyfilePathControlDelegate.h; sourceTree = "<group>"; };
|
||||
4C811C8216ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPKeyfilePathControlDelegate.m; 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>"; };
|
||||
4C888C8F16EB6C91003D34A1 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
@@ -355,6 +358,8 @@
|
||||
4C3BD51416D276F800389F1F /* MPToolbarDelegate.m */,
|
||||
4CAC6F7616D2B54800D79D5E /* MPMainWindowSplitViewDelegate.h */,
|
||||
4CAC6F7716D2B54800D79D5E /* MPMainWindowSplitViewDelegate.m */,
|
||||
4C811C8116ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.h */,
|
||||
4C811C8216ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m */,
|
||||
);
|
||||
name = Delegates;
|
||||
sourceTree = "<group>";
|
||||
@@ -864,6 +869,7 @@
|
||||
4CFC53BF16E94729007396BE /* MPShadowBox.m in Sources */,
|
||||
4C888C9316EB6F5E003D34A1 /* MPToolbarItem.m in Sources */,
|
||||
4C888C9716EB754B003D34A1 /* MPActionHelper.m in Sources */,
|
||||
4C811C8316ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
13
MacPass/MPKeyfilePathControlDelegate.h
Normal file
13
MacPass/MPKeyfilePathControlDelegate.h
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// MPKeyfilePathControlDelegate.h
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 10.03.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MPKeyfilePathControlDelegate : NSObject <NSPathControlDelegate>
|
||||
|
||||
@end
|
||||
22
MacPass/MPKeyfilePathControlDelegate.m
Normal file
22
MacPass/MPKeyfilePathControlDelegate.m
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// MPKeyfilePathControlDelegate.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 10.03.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPKeyfilePathControlDelegate.h"
|
||||
|
||||
@implementation MPKeyfilePathControlDelegate
|
||||
|
||||
- (NSDragOperation)pathControl:(NSPathControl *)pathControl validateDrop:(id<NSDraggingInfo>)info {
|
||||
NSLog(@"%@", [info draggingPasteboard]);
|
||||
return NSDragOperationNone;
|
||||
}
|
||||
|
||||
- (void)pathControl:(NSPathControl *)pathControl willDisplayOpenPanel:(NSOpenPanel *)openPanel {
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -17,8 +17,6 @@
|
||||
#import "MPInspectorTabViewController.h"
|
||||
#import "MPAppDelegate.h"
|
||||
|
||||
#define MIN_WINDOW_WIDTH MPMainWindowSplitViewDelegateMinimumContentWidth + MPMainWindowSplitViewDelegateMinimumOutlineWidth + [self.splitView dividerThickness]
|
||||
|
||||
@interface MPMainWindowController ()
|
||||
|
||||
@property (assign) IBOutlet NSView *outlineView;
|
||||
@@ -92,8 +90,8 @@
|
||||
[self _updateWindowTitle];
|
||||
|
||||
[[self.welcomeText cell] setBackgroundStyle:NSBackgroundStyleRaised];
|
||||
|
||||
[self.window setMinSize:NSMakeSize( MIN_WINDOW_WIDTH, 400)];
|
||||
CGFloat minWidht = MPMainWindowSplitViewDelegateMinimumContentWidth + MPMainWindowSplitViewDelegateMinimumOutlineWidth + [self.splitView dividerThickness];
|
||||
[self.window setMinSize:NSMakeSize( minWidht, 400)];
|
||||
|
||||
_toolbar = [[NSToolbar alloc] initWithIdentifier:@"MainWindowToolbar"];
|
||||
[self.toolbar setAllowsUserCustomization:YES];
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#import "MPMainWindowSplitViewDelegate.h"
|
||||
|
||||
const CGFloat MPMainWindowSplitViewDelegateMinimumOutlineWidth = 150.0;
|
||||
const CGFloat MPMainWindowSplitViewDelegateMinimumContentWidth = 250.0;
|
||||
const CGFloat MPMainWindowSplitViewDelegateMinimumContentWidth = 350.0;
|
||||
const CGFloat MPMainWindowSplitViewDelegateMinimumInspectorWidth = 250.0;
|
||||
|
||||
|
||||
|
||||
@@ -8,14 +8,19 @@
|
||||
|
||||
#import "MPPasswordInputController.h"
|
||||
#import "MPDatabaseController.h"
|
||||
#import "MPKeyfilePathControlDelegate.h"
|
||||
|
||||
@interface MPPasswordInputController ()
|
||||
|
||||
@property (assign) IBOutlet NSSecureTextField *passwordTextField;
|
||||
@property (assign) IBOutlet NSPathControl *keyPathControl;
|
||||
@property (retain) MPKeyfilePathControlDelegate *pathControlDelegate;
|
||||
@property (assign) IBOutlet NSImageView *errorImageView;
|
||||
@property (assign) IBOutlet NSTextField *errorInfoTextField;
|
||||
|
||||
- (IBAction)_selectKeyFile:(id)sender;
|
||||
- (IBAction)_open:(id)sender;
|
||||
- (void)_showError;
|
||||
- (void)_reset;
|
||||
|
||||
@end
|
||||
|
||||
@@ -26,32 +31,43 @@
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
self.fileURL = nil;
|
||||
[_fileURL release];
|
||||
[_pathControlDelegate release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)didLoadView {
|
||||
[self.keyPathControl setDelegate:self.pathControlDelegate];
|
||||
[self.errorImageView setImage:[NSImage imageNamed:NSImageNameCaution]];
|
||||
[self _reset];
|
||||
}
|
||||
|
||||
- (NSResponder *)reconmendedFirstResponder {
|
||||
return self.passwordTextField;
|
||||
}
|
||||
|
||||
- (IBAction)_selectKeyFile:(id)sender {
|
||||
|
||||
}
|
||||
|
||||
- (IBAction)_open:(id)sender {
|
||||
NSString *password = [self.passwordTextField stringValue];
|
||||
[self.passwordTextField setStringValue:@""];
|
||||
NSURL *keyfile = [self.keyPathControl URL];
|
||||
[self _reset];
|
||||
MPDatabaseDocument *document = [[MPDatabaseController defaultController] openDatabase:self.fileURL
|
||||
password:password
|
||||
keyfile:nil];
|
||||
keyfile:keyfile];
|
||||
if(!document) {
|
||||
[self _showError];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)_reset {
|
||||
[self.passwordTextField setStringValue:@""];
|
||||
[self.keyPathControl setURL:nil];
|
||||
[self.errorInfoTextField setHidden:YES];
|
||||
[self.errorImageView setHidden:YES];
|
||||
}
|
||||
|
||||
- (void)_showError {
|
||||
#ifdef DEBUG
|
||||
NSLog(@"Something went wrong");
|
||||
#endif
|
||||
[self.errorImageView setHidden:NO];
|
||||
[self.errorInfoTextField setHidden:NO];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>4DD</string>
|
||||
<string>4EB</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user