diff --git a/MacPass/Base.lproj/MainMenu.xib b/MacPass/Base.lproj/MainMenu.xib
index 1741a221..14c56992 100644
--- a/MacPass/Base.lproj/MainMenu.xib
+++ b/MacPass/Base.lproj/MainMenu.xib
@@ -272,6 +272,14 @@
+
241
+
showPreferences:
@@ -879,6 +895,7 @@
+
@@ -1204,6 +1221,11 @@
+
+ 1231
+
+
+
@@ -1217,6 +1239,7 @@
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -1275,7 +1298,7 @@
- 1230
+ 1232
@@ -1333,17 +1356,20 @@
MPDocumentWindowController
NSWindowController
-
- editPassword:
- id
-
-
- editPassword:
-
+
+ id
+ id
+
+
+
+ documentSettings:
+ id
+
+
editPassword:
id
-
+
splitView
NSSplitView
diff --git a/MacPass/DocumentSettingsWindow.xib b/MacPass/DocumentSettingsWindow.xib
index 37e3984f..1eb8ea62 100644
--- a/MacPass/DocumentSettingsWindow.xib
+++ b/MacPass/DocumentSettingsWindow.xib
@@ -11,7 +11,16 @@
3084
+ IBNSLayoutConstraint
+ NSButton
+ NSButtonCell
NSCustomObject
+ NSTextField
+ NSTextFieldCell
+ NSToolbar
+ NSToolbarFlexibleSpaceItem
+ NSToolbarItem
+ NSToolbarSpaceItem
NSView
NSWindowTemplate
@@ -24,7 +33,7 @@
- NSObject
+ MPDocumentSettingsWindowController
FirstResponder
@@ -35,31 +44,326 @@
15
2
- {{196, 240}, {473, 318}}
- 544735232
+ {{196, 240}, {452, 308}}
+ 1618477056
Window
NSWindow
-
+
+
+ 615AB250-BF7A-4DF4-AE86-7FA58AC539A2
+
+
+ YES
+ YES
+ NO
+ NO
+ 1
+ 1
+
+
+
+ 3DB592D7-5981-4B27-8ECA-6520245859E8
+
+ General
+ General
+
+
+
+ NSImage
+ NSPreferencesGeneral
+
+
+
+ {0, 0}
+ {0, 0}
+ YES
+ YES
+ -1
+ YES
+ 0
+
+
+ NSToolbarFlexibleSpaceItem
+
+ Flexible Space
+
+
+
+
+
+ {1, 5}
+ {20000, 32}
+ YES
+ YES
+ -1
+ YES
+ 0
+
+
+
+ NSToolbarSpaceItem
+
+ Space
+
+
+
+
+
+ {32, 5}
+ {32, 32}
+ YES
+ YES
+ -1
+ YES
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
256
- {473, 318}
+
+
+
+ 268
+ {{17, 268}, {106, 17}}
+
+
+
+ _NS:1535
+ YES
+
+ 68157504
+ 272630784
+ Database name:
+
+ LucidaGrande
+ 13
+ 1044
+
+ _NS:1535
+
+
+ 6
+ System
+ controlColor
+
+ 3
+ MC42NjY2NjY2NjY3AA
+
+
+
+ 6
+ System
+ controlTextColor
+
+ 3
+ MAA
+
+
+
+ NO
+
+
+
+ 268
+ {{128, 266}, {304, 22}}
+
+
+
+ _NS:9
+ YES
+
+ -1804599231
+ 272630784
+
+
+ _NS:9
+
+ YES
+
+ 6
+ System
+ textBackgroundColor
+
+ 3
+ MQA
+
+
+
+ 6
+ System
+ textColor
+
+
+
+ NO
+
+
+
+ 268
+ {{128, 185}, {304, 71}}
+
+
+
+ _NS:9
+ {250, 750}
+ YES
+
+ -1805647871
+ 272629760
+
+
+ _NS:9
+
+ YES
+
+
+
+ NO
+
+
+
+ 268
+ {{42, 239}, {81, 17}}
+
+
+
+ _NS:1535
+ YES
+
+ 68157504
+ 272630784
+ Description:
+
+ _NS:1535
+
+
+
+
+ NO
+
+
+
+ 268
+ {{331, 18}, {101, 25}}
+
+
+
+ _NS:22
+ YES
+
+ -2080374784
+ 134217728
+ Save Changes
+
+ _NS:22
+
+ -2038153216
+ 163
+
+
+ 400
+ 75
+
+ NO
+
+
+
+ 268
+ {{203, 18}, {120, 25}}
+
+
+
+ _NS:22
+ YES
+
+ -2080374784
+ 134217728
+ Discard Changes
+
+ _NS:22
+
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24
+ 2
+
+
+
+
+
+
+
+
+
+ 3
+
+
+
+
+
+
+
+
+
+ 4
+
+
+
+
+ 7
+
+
+
+
+ 9
+
+
+
+
+ 189
+
+
+
+
+
+
+
+ 190
+
+
+
+
+ 231
+
+
+
+
+
+
+
+ 232
+
+
+
+
+ 239
+
+
+
+
+ 242
+
+
+
+
+ 245
+
+
+
+
+ 246
+
+
+
+
+ 247
+
+
+
+
+
+ 8
+ 0
+
+ 0
+ 1
+
+ 71
+
+ 1000
+
+ 3
+ 9
+ 1
+
+
+
+
+
+ 248
+
+
+
+
+ 251
+
+
+
+
+ 256
+
+
+
+
+
+
+
+ 257
+
+
+
+
+ 259
+
+
+
+
+ 260
+
+
+
+
+ 243
+
+
+
+
+ 255
+
+
+
+
+ 264
+
+
+
+
+ 252
+
+
+
+
+ 271
+
+
+
+
+
+
+
+ 272
+
+
+
+
+ 273
+
+
+
+
+ 274
+
+
+
+
+ 275
+
+
+
+
+
+
+
+ 276
+
+
+
+
+ 277
+
+
+
+
+ 278
+
+
+
@@ -102,20 +833,111 @@
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
{{357, 418}, {480, 270}}
-
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
com.apple.InterfaceBuilder.CocoaPlugin
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
- 2
+ 282
+
+
+
+
+ MPDocumentSettingsWindowController
+ NSWindowController
+
+ saveChanges:
+ id
+
+
+ saveChanges:
+
+ saveChanges:
+ id
+
+
+
+ IBProjectSource
+ ./Classes/MPDocumentSettingsWindowController.h
+
+
+
+ NSLayoutConstraint
+ NSObject
+
+ IBProjectSource
+ ./Classes/NSLayoutConstraint.h
+
+
+
-
0
IBCocoaFramework
YES
3
+
+ {11, 11}
+ {10, 3}
+ {32, 32}
+
YES
diff --git a/MacPass/MPDocumentSettingsWindowController.h b/MacPass/MPDocumentSettingsWindowController.h
index 205635d8..8e81306d 100644
--- a/MacPass/MPDocumentSettingsWindowController.h
+++ b/MacPass/MPDocumentSettingsWindowController.h
@@ -10,4 +10,6 @@
@interface MPDocumentSettingsWindowController : NSWindowController
+- (IBAction)saveChanges:(id)sender;
+
@end
diff --git a/MacPass/MPDocumentSettingsWindowController.m b/MacPass/MPDocumentSettingsWindowController.m
index 8bc13c7c..60fa333c 100644
--- a/MacPass/MPDocumentSettingsWindowController.m
+++ b/MacPass/MPDocumentSettingsWindowController.m
@@ -59,8 +59,9 @@
return self;
}
-- (void)windowDidLoad {
- [super windowDidLoad];
+- (void)saveChanges:(id)sender {
+ [NSApp endSheet:[self window]];
+ [[self window] orderOut:nil];
}
@end
diff --git a/MacPass/MPDocumentWindowController.h b/MacPass/MPDocumentWindowController.h
index fbcdc809..1e01b5e8 100644
--- a/MacPass/MPDocumentWindowController.h
+++ b/MacPass/MPDocumentWindowController.h
@@ -34,10 +34,12 @@ APPKIT_EXTERN NSString *const MPCurrentItemChangedNotification;
@property (readonly, assign) KdbGroup *currentGroup;
@property (readonly, assign) KdbEntry *currentEntry;
+
- (void)showEntries;
- (void)showPasswordInput;
- (void)performFindPanelAction:(id)sender;
- (IBAction)editPassword:(id)sender;
+- (IBAction)documentSettings:(id)sender;
- (void)lock:(id)sender;
- (void)createGroup:(id)sender;
diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m
index 781c4f95..cb9e91c0 100644
--- a/MacPass/MPDocumentWindowController.m
+++ b/MacPass/MPDocumentWindowController.m
@@ -16,6 +16,7 @@
#import "MPInspectorViewController.h"
#import "MPAppDelegate.h"
#import "MPActionHelper.h"
+#import "MPDocumentSettingsWindowController.h"
NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCurrentItemChangedNotification";
@@ -36,6 +37,7 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur
@property (retain) MPEntryViewController *entryViewController;
@property (retain) MPOutlineViewController *outlineViewController;
@property (retain) MPInspectorViewController *inspectorViewController;
+@property (retain) MPDocumentSettingsWindowController *documentSettingsWindowController;
@property (retain) MPToolbarDelegate *toolbarDelegate;
@@ -217,6 +219,13 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur
[self _setContentViewController:self.passwordEditController];
}
+- (void)documentSettings:(id)sender {
+ if(!self.documentSettingsWindowController) {
+ _documentSettingsWindowController = [[MPDocumentSettingsWindowController alloc] init];
+ }
+ [[NSApplication sharedApplication] beginSheet:[_documentSettingsWindowController window] modalForWindow:[self window] modalDelegate:nil didEndSelector:NULL contextInfo:NULL];
+}
+
- (void)lock:(id)sender {
MPDocument *document = [self document];
if(!document.isSecured) {
diff --git a/MacPass/MPPasswordEditViewController.m b/MacPass/MPPasswordEditViewController.m
index 57950674..47a2dc3c 100644
--- a/MacPass/MPPasswordEditViewController.m
+++ b/MacPass/MPPasswordEditViewController.m
@@ -49,7 +49,7 @@
}
- (IBAction)_change:(id)sender {
- MPDocument *document = [[NSDocumentController sharedDocumentController] documentForWindow:[[self view] window]];
+ MPDocument *document = [[self windowController] document];
if(document) {
document.key = [self.keyfilePathControl URL];
NSString *password = [self.passwordTextField stringValue];
diff --git a/MacPass/MacPass-Info.plist b/MacPass/MacPass-Info.plist
index 4d1375bf..e67c88dd 100644
--- a/MacPass/MacPass-Info.plist
+++ b/MacPass/MacPass-Info.plist
@@ -48,7 +48,7 @@
CFBundleSignature
????
CFBundleVersion
- 1244
+ 1270
LSMinimumSystemVersion
${MACOSX_DEPLOYMENT_TARGET}
NSHumanReadableCopyright