mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 20:32:43 +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 KdbEntry;
|
||||
@class KdbTree;
|
||||
@class UUID;
|
||||
|
||||
@interface MPDocument : NSDocument
|
||||
|
||||
@property (assign, readonly) BOOL isProtected;
|
||||
@property (retain, readonly) KdbTree *tree;
|
||||
@property (assign, readonly) KdbGroup *root;
|
||||
@property (nonatomic,retain) NSString *password;
|
||||
@property (nonatomic, retain) NSURL *key;
|
||||
|
||||
@@ -224,7 +224,7 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur
|
||||
else {
|
||||
// Remove contraint on view removal.
|
||||
[_splitView addSubview:inspectorView];
|
||||
[_splitView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"[inspectorView(>=300)]"
|
||||
[_splitView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"[inspectorView(>=200)]"
|
||||
options:0
|
||||
metrics:nil
|
||||
views:NSDictionaryOfVariableBindings(inspectorView)]];
|
||||
@@ -255,7 +255,7 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur
|
||||
removeInspector = YES;
|
||||
}
|
||||
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
|
||||
metrics:nil
|
||||
views:views]];
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#import "MPDocumentWindowController.h"
|
||||
#import "MPOutlineViewController.h"
|
||||
#import "MPOutlineViewDelegate.h"
|
||||
#import "MPDocument.h"
|
||||
|
||||
#import "KdbLib.h"
|
||||
#import "Kdb4Node.h"
|
||||
@@ -295,6 +296,14 @@ enum {
|
||||
Kdb4Entry *entry = (Kdb4Entry *)self.selectedEntry;
|
||||
BinaryRef *binaryRef = entry.binaries[row];
|
||||
[[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;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>932</string>
|
||||
<string>947</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
Reference in New Issue
Block a user