Rearranged Inspector Layout to use the space more efficently

This commit is contained in:
michael starke
2013-06-22 13:02:42 +02:00
parent 84fdd1fb47
commit 449b6fa8bf
5 changed files with 859 additions and 621 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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;

View File

@@ -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]];

View File

@@ -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;
}

View File

@@ -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>