Revision: 2744
http://skim-app.svn.sourceforge.net/skim-app/?rev=2744&view=rev
Author: hofman
Date: 2007-08-28 06:48:16 -0700 (Tue, 28 Aug 2007)
Log Message:
-----------
Replace = by ==. Use appropriate file extension for notes file when a format is
passed.
Modified Paths:
--------------
trunk/skimnotes.m
Modified: trunk/skimnotes.m
===================================================================
--- trunk/skimnotes.m 2007-08-28 13:42:30 UTC (rev 2743)
+++ trunk/skimnotes.m 2007-08-28 13:48:16 UTC (rev 2744)
@@ -91,7 +91,7 @@
BOOL isDir = NO;
if (action != SKNActionRemove && notesPath == nil) {
- notesPath = [[pdfPath stringByDeletingPathExtension]
stringByAppendingPathExtension:@"skim"];
+ notesPath = [[pdfPath stringByDeletingPathExtension]
stringByAppendingPathExtension:format == SKNFormatText ? @"txt" : format ==
SKNFormatRTF ? @"rtf" : @"skim"];
}
if ([[pdfPath pathExtension] caseInsensitiveCompare:@"pdf"] ==
NSOrderedSame &&
@@ -111,18 +111,18 @@
else
format = SKNFormatSkim;
}
- if (format = SKNFormatSkim) {
+ if (format == SKNFormatSkim) {
NSError *error = nil;
data = [fm extendedAttributeNamed:SKIM_NOTES_KEY atPath:pdfPath
traverseLink:YES error:&error];
if (data == nil && [error code] == ENOATTR)
data = [NSKeyedArchiver archivedDataWithRootObject:[NSArray
array]];
- } else if (format = SKNFormatText) {
+ } else if (format == SKNFormatText) {
NSError *error = nil;
NSString *string = [fm
propertyListFromExtendedAttributeNamed:SKIM_TEXT_NOTES_KEY atPath:pdfPath
traverseLink:YES error:&error];
data = [string dataUsingEncoding:NSUTF8StringEncoding];
if (string == nil && [error code] == ENOATTR)
data = [NSData data];
- } else if (format = SKNFormatRTF) {
+ } else if (format == SKNFormatRTF) {
data = [fm extendedAttributeNamed:SKIM_RTF_NOTES_KEY
atPath:pdfPath traverseLink:YES error:&error];
if (data == nil && [error code] == ENOATTR)
data = [NSData data];
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: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit