mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-17 08:01:24 +00:00
offer option to reload file
This commit is contained in:
parent
2ace3c327a
commit
f9ed96a3e4
1 changed files with 9 additions and 1 deletions
|
@ -675,11 +675,19 @@
|
|||
PCLogInfo(self, @"File modified externally. %@ - %@", _lastSaveDate, fileModDate);
|
||||
choice = NSRunAlertPanel(@"Overwrite File?",
|
||||
@"File %@ was modified externally. Overwrite?",
|
||||
@"Cancel", nil, @"Proceed", [_path lastPathComponent]);
|
||||
@"Cancel", @"Reload", @"Proceed", [_path lastPathComponent]);
|
||||
if (choice == NSAlertDefaultReturn)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
else if (choice == NSAlertAlternateReturn)
|
||||
{
|
||||
NSLog(@"Self");
|
||||
if ([self revertFileToSaved] == YES)
|
||||
return NO;
|
||||
NSLog(@"reload failed");
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
|
|
Loading…
Reference in a new issue