Revision: 5540
http://skim-app.svn.sourceforge.net/skim-app/?rev=5540&view=rev
Author: hofman
Date: 2009-08-12 10:03:32 +0000 (Wed, 12 Aug 2009)
Log Message:
-----------
disable the revert script command when we're auto-updating
Modified Paths:
--------------
trunk/SKPDFDocument.m
Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m 2009-08-12 10:02:33 UTC (rev 5539)
+++ trunk/SKPDFDocument.m 2009-08-12 10:03:32 UTC (rev 5540)
@@ -2165,8 +2165,11 @@
- (void)handleRevertScriptCommand:(NSScriptCommand *)command {
if ([self fileURL] && [[NSFileManager defaultManager]
fileExistsAtPath:[self fileName]]) {
- if ([self revertToContentsOfURL:[self fileURL] ofType:[self fileType]
error:NULL] == NO) {
+ if (docFlags.isUpdatingFile) {
[command setScriptErrorNumber:NSInternalScriptError];
+ [command setScriptErrorString:@"Cannot revert."];
+ } else if ([self revertToContentsOfURL:[self fileURL] ofType:[self
fileType] error:NULL] == NO) {
+ [command setScriptErrorNumber:NSInternalScriptError];
[command setScriptErrorString:@"Revert failed."];
}
} else {
@@ -2280,10 +2283,7 @@
- (void)handleRevertScriptCommand:(NSScriptCommand *)command {
id document = [[self windowController] document];
- if (docFlags.isUpdatingFile) {
- [command setScriptErrorNumber:NSInternalScriptError];
- [command setScriptErrorString:@"Cannot revert."];
- } else if (document == nil) {
+ if (document == nil) {
[command setScriptErrorNumber:NSArgumentsWrongScriptError];
[command setScriptErrorString:@"Window does not have a document."];
} else
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit