mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 05:52:58 +00:00
Removed unused notifications before saving
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user