mirror of
https://github.com/MacPass/MacPass.git
synced 2026-01-30 09:58:22 +00:00
renamed property more appropriatly
This commit is contained in:
@@ -79,7 +79,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
|
|||||||
@property (strong) IBOutlet NSView *warningView;
|
@property (strong) IBOutlet NSView *warningView;
|
||||||
@property (weak) IBOutlet NSImageView *warningViewImage;
|
@property (weak) IBOutlet NSImageView *warningViewImage;
|
||||||
|
|
||||||
@property (assign) BOOL fileChangeDialogOpen;
|
@property (assign) BOOL lockedForFileChange;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
|
|||||||
if(self) {
|
if(self) {
|
||||||
_didLockFile = NO;
|
_didLockFile = NO;
|
||||||
_readOnly = NO;
|
_readOnly = NO;
|
||||||
_fileChangeDialogOpen = NO;
|
_lockedForFileChange = NO;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@@ -276,11 +276,12 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
|
|||||||
return; // Just metadata has changed
|
return; // Just metadata has changed
|
||||||
}
|
}
|
||||||
|
|
||||||
if(self.fileChangeDialogOpen) {
|
if(self.lockedForFileChange) {
|
||||||
return; // We are already displaying an alert
|
return; // We are already displaying an alert
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the flag in this call! */
|
/* Set the flag in this call! */
|
||||||
self.fileChangeDialogOpen = YES;
|
self.lockedForFileChange = YES;
|
||||||
|
|
||||||
/* Dispatch the alert to the main queue */
|
/* Dispatch the alert to the main queue */
|
||||||
__weak MPDocument *welf = self;
|
__weak MPDocument *welf = self;
|
||||||
@@ -295,7 +296,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
|
|||||||
[alert addButtonWithTitle:NSLocalizedString(@"KEEP_MINE", @"Ignore the changes to an open file!")];
|
[alert addButtonWithTitle:NSLocalizedString(@"KEEP_MINE", @"Ignore the changes to an open file!")];
|
||||||
[alert beginSheetModalForWindow:welf.windowForSheet completionHandler:^(NSModalResponse returnCode) {
|
[alert beginSheetModalForWindow:welf.windowForSheet completionHandler:^(NSModalResponse returnCode) {
|
||||||
|
|
||||||
welf.fileChangeDialogOpen = NO;
|
welf.lockedForFileChange = NO;
|
||||||
|
|
||||||
switch(returnCode) {
|
switch(returnCode) {
|
||||||
case NSAlertFirstButtonReturn: {
|
case NSAlertFirstButtonReturn: {
|
||||||
|
|||||||
Reference in New Issue
Block a user