Revision: 3376
http://skim-app.svn.sourceforge.net/skim-app/?rev=3376&view=rev
Author: hofman
Date: 2008-01-22 15:18:02 -0800 (Tue, 22 Jan 2008)
Log Message:
-----------
Send a distributed notifications when a pdf or pdfd file is saved.
Modified Paths:
--------------
trunk/SKDocument.h
trunk/SKDocument.m
Modified: trunk/SKDocument.h
===================================================================
--- trunk/SKDocument.h 2008-01-20 00:03:31 UTC (rev 3375)
+++ trunk/SKDocument.h 2008-01-22 23:18:02 UTC (rev 3376)
@@ -41,6 +41,7 @@
extern NSString *SKDocumentErrorDomain;
extern NSString *SKDocumentWillSaveNotification;
+extern NSString *SKSkimFileDidSaveNotification;
enum {
SKASDisplaySinglePage = '1Pg ',
Modified: trunk/SKDocument.m
===================================================================
--- trunk/SKDocument.m 2008-01-20 00:03:31 UTC (rev 3375)
+++ trunk/SKDocument.m 2008-01-22 23:18:02 UTC (rev 3376)
@@ -74,6 +74,7 @@
NSString *SKDocumentErrorDomain = @"SKDocumentErrorDomain";
NSString *SKDocumentWillSaveNotification = @"SKDocumentWillSaveNotification";
+NSString *SKSkimFileDidSaveNotification = @"SKSkimFileDidSaveNotification";
static NSString *SKLastExportedTypeKey = @"SKLastExportedType";
static NSString *SKAutoReloadFileUpdateKey = @"SKAutoReloadFileUpdate";
@@ -308,6 +309,9 @@
[alert runModal];
}
+ if (success)
+ [[NSDistributedNotificationCenter defaultCenter]
+ postNotificationName:SKSkimFileDidSaveNotification
object:[absoluteURL path]];
}
} else if ([typeName isEqualToString:SKPDFBundleDocumentType] || [typeName
isEqual:SKPDFBundleDocumentUTI]) {
@@ -369,6 +373,10 @@
[fm removeFileAtPath:tmpDir handler:nil];
}
+ if (success)
+ [[NSDistributedNotificationCenter defaultCenter]
+ postNotificationName:SKSkimFileDidSaveNotification
object:[absoluteURL path]];
+
} else {
success = [super saveToURL:absoluteURL ofType:typeName
forSaveOperation:saveOperation error:&error];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit