Ask user for confirmation before reverting a file in PC.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@31943 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2011-01-24 13:29:44 +00:00
parent f8767ee74f
commit 405a68887b
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2011-01-24 Wolfgang Lux <wolfgang.lux@gmail.com>
* Modules/Editors/ProjectCenter/PCEditor.m (-revertFileToSaved):
Ask for confirmation before reverting.
2011-01-24 Wolfgang Lux <wolfgang.lux@gmail.com>
* Modules/Editors/ProjectCenter/PCEditorView.m (-performIndentation):

View file

@ -666,6 +666,16 @@
return YES;
}
if (NSAlertDefaultReturn !=
NSRunAlertPanel(@"Revert",
@"%@ has been modified. "
@"Are you sure you want to undo changes?",
@"Revert", @"Cancel", nil,
[_path lastPathComponent]))
{
return NO;
}
[[NSNotificationCenter defaultCenter]
postNotificationName:PCEditorWillRevertNotification
object:self];