mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 08:12:28 +00:00
Rearranged Inspector Layout to use the space more efficently
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -20,11 +20,13 @@ APPKIT_EXTERN NSString *const MPDocumentGroupKey;
|
|||||||
|
|
||||||
@class KdbGroup;
|
@class KdbGroup;
|
||||||
@class KdbEntry;
|
@class KdbEntry;
|
||||||
|
@class KdbTree;
|
||||||
@class UUID;
|
@class UUID;
|
||||||
|
|
||||||
@interface MPDocument : NSDocument
|
@interface MPDocument : NSDocument
|
||||||
|
|
||||||
@property (assign, readonly) BOOL isProtected;
|
@property (assign, readonly) BOOL isProtected;
|
||||||
|
@property (retain, readonly) KdbTree *tree;
|
||||||
@property (assign, readonly) KdbGroup *root;
|
@property (assign, readonly) KdbGroup *root;
|
||||||
@property (nonatomic,retain) NSString *password;
|
@property (nonatomic,retain) NSString *password;
|
||||||
@property (nonatomic, retain) NSURL *key;
|
@property (nonatomic, retain) NSURL *key;
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur
|
|||||||
else {
|
else {
|
||||||
// Remove contraint on view removal.
|
// Remove contraint on view removal.
|
||||||
[_splitView addSubview:inspectorView];
|
[_splitView addSubview:inspectorView];
|
||||||
[_splitView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"[inspectorView(>=300)]"
|
[_splitView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"[inspectorView(>=200)]"
|
||||||
options:0
|
options:0
|
||||||
metrics:nil
|
metrics:nil
|
||||||
views:NSDictionaryOfVariableBindings(inspectorView)]];
|
views:NSDictionaryOfVariableBindings(inspectorView)]];
|
||||||
@@ -255,7 +255,7 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur
|
|||||||
removeInspector = YES;
|
removeInspector = YES;
|
||||||
}
|
}
|
||||||
NSDictionary *views = NSDictionaryOfVariableBindings(outlineView, inspectorView, entryView, _splitView);
|
NSDictionary *views = NSDictionaryOfVariableBindings(outlineView, inspectorView, entryView, _splitView);
|
||||||
[self.splitView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[outlineView(>=150,<=250)]-1-[entryView(>=350)]-1-[inspectorView(>=300)]|"
|
[self.splitView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[outlineView(>=150,<=250)]-1-[entryView(>=350)]-1-[inspectorView(>=200)]|"
|
||||||
options:0
|
options:0
|
||||||
metrics:nil
|
metrics:nil
|
||||||
views:views]];
|
views:views]];
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#import "MPDocumentWindowController.h"
|
#import "MPDocumentWindowController.h"
|
||||||
#import "MPOutlineViewController.h"
|
#import "MPOutlineViewController.h"
|
||||||
#import "MPOutlineViewDelegate.h"
|
#import "MPOutlineViewDelegate.h"
|
||||||
|
#import "MPDocument.h"
|
||||||
|
|
||||||
#import "KdbLib.h"
|
#import "KdbLib.h"
|
||||||
#import "Kdb4Node.h"
|
#import "Kdb4Node.h"
|
||||||
@@ -295,6 +296,14 @@ enum {
|
|||||||
Kdb4Entry *entry = (Kdb4Entry *)self.selectedEntry;
|
Kdb4Entry *entry = (Kdb4Entry *)self.selectedEntry;
|
||||||
BinaryRef *binaryRef = entry.binaries[row];
|
BinaryRef *binaryRef = entry.binaries[row];
|
||||||
[[view textField] bind:NSValueBinding toObject:binaryRef withKeyPath:@"key" options:nil];
|
[[view textField] bind:NSValueBinding toObject:binaryRef withKeyPath:@"key" options:nil];
|
||||||
|
MPDocument *document = [[self windowController] document];
|
||||||
|
Kdb4Tree *tree = (Kdb4Tree *)document.tree;
|
||||||
|
NSPredicate *filterPredicate = [NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) {
|
||||||
|
Binary *binaryFile = evaluatedObject;
|
||||||
|
return (binaryFile.binaryId == binaryRef.ref);
|
||||||
|
}];
|
||||||
|
NSArray *filteredBinary = [tree.binaries filteredArrayUsingPredicate:filterPredicate];
|
||||||
|
Binary *attachedFile = [filteredBinary lastObject];
|
||||||
}
|
}
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>932</string>
|
<string>947</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user