mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 16:22:21 +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 MPDocumentCurrentItemChangedNotification;
|
||||||
|
|
||||||
APPKIT_EXTERN NSString *const MPDocumentWillSaveNotification;
|
|
||||||
|
|
||||||
/* Keys used in userInfo NSDictionaries on notifications */
|
/* Keys used in userInfo NSDictionaries on notifications */
|
||||||
APPKIT_EXTERN NSString *const MPDocumentEntryKey;
|
APPKIT_EXTERN NSString *const MPDocumentEntryKey;
|
||||||
APPKIT_EXTERN NSString *const MPDocumentGroupKey;
|
APPKIT_EXTERN NSString *const MPDocumentGroupKey;
|
||||||
|
|||||||
@@ -48,8 +48,6 @@ NSString *const MPDocumentDidUnlockDatabaseNotification = @"com.hicknhack.macp
|
|||||||
|
|
||||||
NSString *const MPDocumentCurrentItemChangedNotification = @"com.hicknhack.macpass.MPDocumentCurrentItemChangedNotification";
|
NSString *const MPDocumentCurrentItemChangedNotification = @"com.hicknhack.macpass.MPDocumentCurrentItemChangedNotification";
|
||||||
|
|
||||||
NSString *const MPDocumentWillSaveNotification = @"com.hicknhack.macpass.MPDocumentWillSaveNotification";
|
|
||||||
|
|
||||||
NSString *const MPDocumentEntryKey = @"MPDocumentEntryKey";
|
NSString *const MPDocumentEntryKey = @"MPDocumentEntryKey";
|
||||||
NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey";
|
||||||
|
|
||||||
@@ -136,29 +134,6 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey
|
|||||||
[self addWindowController:windowController];
|
[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 {
|
- (BOOL)writeToURL:(NSURL *)url ofType:(NSString *)typeName error:(NSError **)outError {
|
||||||
if(!self.compositeKey.hasPasswordOrKeyFile) {
|
if(!self.compositeKey.hasPasswordOrKeyFile) {
|
||||||
if(outError != NULL) {
|
if(outError != NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user