Revision: 5164
http://skim-app.svn.sourceforge.net/skim-app/?rev=5164&view=rev
Author: hofman
Date: 2009-01-25 22:36:47 +0000 (Sun, 25 Jan 2009)
Log Message:
-----------
hidden pref to save open meta tags for testing
Modified Paths:
--------------
trunk/SKPDFDocument.m
Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m 2009-01-25 18:15:35 UTC (rev 5163)
+++ trunk/SKPDFDocument.m 2009-01-25 22:36:47 UTC (rev 5164)
@@ -87,6 +87,7 @@
static NSString *SKAutoReloadFileUpdateKey = @"SKAutoReloadFileUpdate";
static NSString *SKAutoRotatePrintedPagesKey = @"SKAutoRotatePrintedPages";
static NSString *SKDisableReloadAlertKey = @"SKDisableReloadAlert";
+static NSString *SKSaveOpenMetaTagsKey = @"SKSaveOpenMetaTags";
static void *SKPDFDocumentDefaultsObservationContext = (void
*)@"SKPDFDocumentDefaultsObservationContext";
@@ -361,19 +362,21 @@
informativeTextWithFormat:[NSString
stringWithFormat:message, [[absoluteURL path] lastPathComponent]]];
[alert runModal];
}
- /*
- SKNExtendedAttributeManager *eam = [SKNExtendedAttributeManager
sharedNoSplitManager];
- if ([[self tags] count])
- [eam setExtendedAttributeNamed:OPEN_META_TAGS_KEY
toPropertyListValue:[self tags] atPath:[absoluteURL path]
options:kSKNXattrNoCompress error:NULL];
- else
- [eam removeExtendedAttribute:OPEN_META_TAGS_KEY
atPath:[absoluteURL path] traverseLink:YES error:NULL];
+ if ([[NSUserDefaults standardUserDefaults]
boolForKey:SKSaveOpenMetaTagsKey]) {
+ SKNExtendedAttributeManager *eam =
[SKNExtendedAttributeManager sharedNoSplitManager];
+
+ if ([[self tags] count])
+ [eam setExtendedAttributeNamed:OPEN_META_TAGS_KEY
toPropertyListValue:[self tags] atPath:[absoluteURL path]
options:kSKNXattrNoCompress error:NULL];
+ else
+ [eam removeExtendedAttribute:OPEN_META_TAGS_KEY
atPath:[absoluteURL path] traverseLink:YES error:NULL];
+
+ if ([self rating] > 0.0)
+ [eam setExtendedAttributeNamed:OPEN_META_RATING_KEY
toPropertyListValue:[NSNumber numberWithDouble:[self rating]]
atPath:[absoluteURL path] options:kSKNXattrNoCompress error:NULL];
+ else
+ [eam removeExtendedAttribute:OPEN_META_RATING_KEY
atPath:[absoluteURL path] traverseLink:YES error:NULL];
+ }
- if ([self rating] > 0.0)
- [eam setExtendedAttributeNamed:OPEN_META_RATING_KEY
toPropertyListValue:[NSNumber numberWithDouble:[self rating]]
atPath:[absoluteURL path] options:kSKNXattrNoCompress error:NULL];
- else
- [eam removeExtendedAttribute:OPEN_META_RATING_KEY
atPath:[absoluteURL path] traverseLink:YES error:NULL];
- */
if (success)
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:SKSkimFileDidSaveNotification
object:[absoluteURL path]];
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:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit