Revision: 3143
http://skim-app.svn.sourceforge.net/skim-app/?rev=3143&view=rev
Author: hofman
Date: 2007-11-04 05:05:59 -0800 (Sun, 04 Nov 2007)
Log Message:
-----------
Forward compatibility, if we ever change the type of anchored notes in Skim
notes. Allow to interpret type=Text as an anchored note.
Modified Paths:
--------------
trunk/NSString_SKExtensions.m
trunk/SKNotesDocument.m
trunk/SKPDFAnnotationNote.m
Modified: trunk/NSString_SKExtensions.m
===================================================================
--- trunk/NSString_SKExtensions.m 2007-11-04 11:15:12 UTC (rev 3142)
+++ trunk/NSString_SKExtensions.m 2007-11-04 13:05:59 UTC (rev 3143)
@@ -320,7 +320,7 @@
- (NSString *)typeName {
if ([self isEqualToString:SKFreeTextString])
return NSLocalizedString(@"Text Note", @"Description for export");
- else if ([self isEqualToString:SKNoteString])
+ else if ([self isEqualToString:SKNoteString] || [self
isEqualToString:SKTextString])
return NSLocalizedString(@"Anchored Note", @"Description for export");
else if ([self isEqualToString:SKCircleString])
return NSLocalizedString(@"Circle", @"Description for export");
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2007-11-04 11:15:12 UTC (rev 3142)
+++ trunk/SKNotesDocument.m 2007-11-04 13:05:59 UTC (rev 3143)
@@ -133,7 +133,9 @@
NSMutableDictionary *note = [dict mutableCopy];
[note setValue:[dict valueForKey:@"contents"] forKey:@"string"];
- if ([[dict valueForKey:@"type"] isEqualToString:SKNoteString]) {
+ if ([[note valueForKey:@"type"] isEqualToString:SKTextString])
+ [note setValue:SKNoteString forKey:@"type"];
+ if ([[note valueForKey:@"type"] isEqualToString:SKNoteString]) {
[note setObject:[NSMutableDictionary
dictionaryWithObjectsAndKeys:[NSNumber numberWithFloat:85.0], @"rowHeight",
[dict valueForKey:@"text"], @"string", nil] forKey:@"child"];
NSMutableString *contents = [[NSMutableString alloc] init];
if ([[dict valueForKey:@"contents"] length])
Modified: trunk/SKPDFAnnotationNote.m
===================================================================
--- trunk/SKPDFAnnotationNote.m 2007-11-04 11:15:12 UTC (rev 3142)
+++ trunk/SKPDFAnnotationNote.m 2007-11-04 13:05:59 UTC (rev 3143)
@@ -185,7 +185,7 @@
NSRect bounds = NSRectFromString([dict objectForKey:BOUNDS_KEY]);
Class annotationClass = NULL;
- if ([type isEqualToString:SKNoteString])
+ if ([type isEqualToString:SKNoteString] || [type
isEqualToString:SKTextString])
annotationClass = [SKPDFAnnotationNote class];
else if ([type isEqualToString:SKFreeTextString])
annotationClass = [SKPDFAnnotationFreeText class];
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