diff --git a/MacPass/MPDocument.h b/MacPass/MPDocument.h index ad123962..2a73ffe3 100644 --- a/MacPass/MPDocument.h +++ b/MacPass/MPDocument.h @@ -45,8 +45,6 @@ APPKIT_EXTERN NSString *const MPDocumentDidUnlockDatabaseNotification; APPKIT_EXTERN NSString *const MPDocumentCurrentItemChangedNotification; -APPKIT_EXTERN NSString *const MPDocumentWillSaveNotification; - /* Keys used in userInfo NSDictionaries on notifications */ APPKIT_EXTERN NSString *const MPDocumentEntryKey; APPKIT_EXTERN NSString *const MPDocumentGroupKey; diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index e7b1bca2..388aedfb 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -48,8 +48,6 @@ NSString *const MPDocumentDidUnlockDatabaseNotification = @"com.hicknhack.macp NSString *const MPDocumentCurrentItemChangedNotification = @"com.hicknhack.macpass.MPDocumentCurrentItemChangedNotification"; -NSString *const MPDocumentWillSaveNotification = @"com.hicknhack.macpass.MPDocumentWillSaveNotification"; - NSString *const MPDocumentEntryKey = @"MPDocumentEntryKey"; NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey"; @@ -136,29 +134,6 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey [self addWindowController:windowController]; } -- (void)saveDocumentAs:(id)sender { - /* FIXME: Use controllers for bindings to enable NSEditorRegistration. NSDocument supports this! */ - [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentWillSaveNotification object:self]; - [super saveDocumentAs:sender]; -} - -- (void)saveDocument:(id)sender { - /* FIXME: Use controllers for bindings to enable NSEditorRegistration. NSDocument supports this! */ - [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentWillSaveNotification object:self]; - [super saveDocument:sender]; -} - -- (void)saveDocumentTo:(id)sender { - /* FIXME: Use controllers for bindings to enable NSEditorRegistration. NSDocument supports this! */ - [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentWillSaveNotification object:self]; - [super saveDocumentTo:sender]; -} - -- (void)windowControllerDidLoadNib:(NSWindowController *)aController -{ - [super windowControllerDidLoadNib:aController]; -} - - (BOOL)writeToURL:(NSURL *)url ofType:(NSString *)typeName error:(NSError **)outError { if(!self.compositeKey.hasPasswordOrKeyFile) { if(outError != NULL) {