Revision: 3957
http://skim-app.svn.sourceforge.net/skim-app/?rev=3957&view=rev
Author: hofman
Date: 2008-06-04 03:16:47 -0700 (Wed, 04 Jun 2008)
Log Message:
-----------
Rename some initializers for Skim notes annotations so they consistently start
with initNote.
Modified Paths:
--------------
trunk/PDFAnnotationCircle_SKExtensions.m
trunk/PDFAnnotationFreeText_SKExtensions.m
trunk/PDFAnnotationLine_SKExtensions.m
trunk/PDFAnnotationMarkup_SKExtensions.h
trunk/PDFAnnotationMarkup_SKExtensions.m
trunk/PDFAnnotationSquare_SKExtensions.m
trunk/PDFAnnotationText_SKExtensions.m
trunk/PDFAnnotation_SKExtensions.h
trunk/PDFAnnotation_SKExtensions.m
trunk/SKMainWindowController.m
trunk/SKPDFAnnotationNote.m
trunk/SKPDFDocument.m
trunk/SKPDFView.m
Modified: trunk/PDFAnnotationCircle_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationCircle_SKExtensions.m 2008-06-04 09:23:44 UTC (rev
3956)
+++ trunk/PDFAnnotationCircle_SKExtensions.m 2008-06-04 10:16:47 UTC (rev
3957)
@@ -60,8 +60,8 @@
return self;
}
-- (id)initWithProperties:(NSDictionary *)dict{
- if (self = [super initWithProperties:dict]) {
+- (id)initNoteWithProperties:(NSDictionary *)dict{
+ if (self = [super initNoteWithProperties:dict]) {
Class colorClass = [NSColor class];
NSColor *interiorColor = [dict
objectForKey:SKPDFAnnotationInteriorColorKey];
if ([interiorColor isKindOfClass:colorClass])
Modified: trunk/PDFAnnotationFreeText_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationFreeText_SKExtensions.m 2008-06-04 09:23:44 UTC (rev
3956)
+++ trunk/PDFAnnotationFreeText_SKExtensions.m 2008-06-04 10:16:47 UTC (rev
3957)
@@ -77,8 +77,8 @@
return self;
}
-- (id)initWithProperties:(NSDictionary *)dict{
- if (self = [super initWithProperties:dict]) {
+- (id)initNoteWithProperties:(NSDictionary *)dict{
+ if (self = [super initNoteWithProperties:dict]) {
Class fontClass = [NSFont class];
Class colorClass = [NSColor class];
NSFont *font = [dict objectForKey:SKPDFAnnotationFontKey];
Modified: trunk/PDFAnnotationLine_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.m 2008-06-04 09:23:44 UTC (rev
3956)
+++ trunk/PDFAnnotationLine_SKExtensions.m 2008-06-04 10:16:47 UTC (rev
3957)
@@ -100,8 +100,8 @@
return self;
}
-- (id)initWithProperties:(NSDictionary *)dict{
- if (self = [super initWithProperties:dict]) {
+- (id)initNoteWithProperties:(NSDictionary *)dict{
+ if (self = [super initNoteWithProperties:dict]) {
Class stringClass = [NSString class];
NSString *startPoint = [dict
objectForKey:SKPDFAnnotationStartPointKey];
NSString *endPoint = [dict objectForKey:SKPDFAnnotationEndPointKey];
Modified: trunk/PDFAnnotationMarkup_SKExtensions.h
===================================================================
--- trunk/PDFAnnotationMarkup_SKExtensions.h 2008-06-04 09:23:44 UTC (rev
3956)
+++ trunk/PDFAnnotationMarkup_SKExtensions.h 2008-06-04 10:16:47 UTC (rev
3957)
@@ -50,7 +50,7 @@
@interface PDFAnnotationMarkup (SKExtensions)
-- (id)initWithSelection:(PDFSelection *)selection markupType:(int)type;
+- (id)initNoteWithSelection:(PDFSelection *)selection markupType:(int)type;
- (PDFSelection *)selection;
@end
Modified: trunk/PDFAnnotationMarkup_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationMarkup_SKExtensions.m 2008-06-04 09:23:44 UTC (rev
3956)
+++ trunk/PDFAnnotationMarkup_SKExtensions.m 2008-06-04 10:16:47 UTC (rev
3957)
@@ -188,8 +188,8 @@
return self;
}
-- (id)initWithProperties:(NSDictionary *)dict{
- if (self = [super initWithProperties:dict]) {
+- (id)initNoteWithProperties:(NSDictionary *)dict{
+ if (self = [super initNoteWithProperties:dict]) {
Class stringClass = [NSString class];
NSString *type = [dict objectForKey:SKPDFAnnotationTypeKey];
if ([type isKindOfClass:stringClass]) {
@@ -237,7 +237,7 @@
return YES;
}
-- (id)initWithSelection:(PDFSelection *)selection markupType:(int)type {
+- (id)initNoteWithSelection:(PDFSelection *)selection markupType:(int)type {
NSRect bounds = [[selection pages] count] ? [selection
boundsForPage:[[selection pages] objectAtIndex:0]] : NSZeroRect;
if (selection == nil || NSIsEmptyRect(bounds)) {
[[self initWithBounds:NSZeroRect] release];
Modified: trunk/PDFAnnotationSquare_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationSquare_SKExtensions.m 2008-06-04 09:23:44 UTC (rev
3956)
+++ trunk/PDFAnnotationSquare_SKExtensions.m 2008-06-04 10:16:47 UTC (rev
3957)
@@ -60,8 +60,8 @@
return self;
}
-- (id)initWithProperties:(NSDictionary *)dict{
- if (self = [super initWithProperties:dict]) {
+- (id)initNoteWithProperties:(NSDictionary *)dict{
+ if (self = [super initNoteWithProperties:dict]) {
Class colorClass = [NSColor class];
NSColor *interiorColor = [dict
objectForKey:SKPDFAnnotationInteriorColorKey];
if ([interiorColor isKindOfClass:colorClass])
Modified: trunk/PDFAnnotationText_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationText_SKExtensions.m 2008-06-04 09:23:44 UTC (rev
3956)
+++ trunk/PDFAnnotationText_SKExtensions.m 2008-06-04 10:16:47 UTC (rev
3957)
@@ -75,8 +75,8 @@
@implementation PDFAnnotationText (SKExtensions)
-- (id)initWithProperties:(NSDictionary *)dict{
- if (self = [super initWithProperties:dict]) {
+- (id)initNoteWithProperties:(NSDictionary *)dict{
+ if (self = [super initNoteWithProperties:dict]) {
NSNumber *iconType = [dict objectForKey:SKPDFAnnotationIconTypeKey];
if ([iconType respondsToSelector:@selector(intValue)])
[self setIconType:[iconType intValue]];
Modified: trunk/PDFAnnotation_SKExtensions.h
===================================================================
--- trunk/PDFAnnotation_SKExtensions.h 2008-06-04 09:23:44 UTC (rev 3956)
+++ trunk/PDFAnnotation_SKExtensions.h 2008-06-04 10:16:47 UTC (rev 3957)
@@ -95,7 +95,7 @@
@interface PDFAnnotation (SKExtensions)
- (id)initNoteWithBounds:(NSRect)bounds;
-- (id)initWithProperties:(NSDictionary *)dict;
+- (id)initNoteWithProperties:(NSDictionary *)dict;
- (NSDictionary *)properties;
Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m 2008-06-04 09:23:44 UTC (rev 3956)
+++ trunk/PDFAnnotation_SKExtensions.m 2008-06-04 10:16:47 UTC (rev 3957)
@@ -138,7 +138,7 @@
}
-- (id)initWithProperties:(NSDictionary *)dict{
+- (id)initNoteWithProperties:(NSDictionary *)dict{
Class stringClass = [NSString class];
if ([self class] == [PDFAnnotation class]) {
@@ -162,7 +162,7 @@
annotationClass = [PDFAnnotationLine class];
[[self initWithBounds:NSZeroRect] release];
- self = [[annotationClass alloc] initWithProperties:dict];
+ self = [[annotationClass alloc] initNoteWithProperties:dict];
} else {
// called from the initialization of a subclass
@@ -406,7 +406,7 @@
markupType = kPDFMarkupTypeUnderline;
else if (type == SKScriptingStrikeOutNote)
markupType = kPDFMarkupTypeStrikeOut;
- if (self = [[PDFAnnotationMarkup alloc]
initWithSelection:selection markupType:markupType]) {
+ if (self = [[PDFAnnotationMarkup alloc]
initNoteWithSelection:selection markupType:markupType]) {
PDFPage *page = [[selection pages] objectAtIndex:0];
if (page && [self
respondsToSelector:@selector(setPage:)])
[self performSelector:@selector(setPage:)
withObject:page];
@@ -442,7 +442,7 @@
// to support the 'duplicate' command
- (id)copyWithZone:(NSZone *)zone {
if ([self isMovable]) // we don't want to duplicate markup
- return [[PDFAnnotation allocWithZone:zone] initWithProperties:[self
properties]];
+ return [[PDFAnnotation allocWithZone:zone]
initNoteWithProperties:[self properties]];
else
return nil;
}
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2008-06-04 09:23:44 UTC (rev 3956)
+++ trunk/SKMainWindowController.m 2008-06-04 10:16:47 UTC (rev 3957)
@@ -838,7 +838,7 @@
// create new annotations from the dictionary and add them to their page
and to the document
while (dict = [e nextObject]) {
unsigned pageIndex = [[dict objectForKey:SKPDFAnnotationPageIndexKey]
unsignedIntValue];
- if (annotation = [[PDFAnnotation alloc] initWithProperties:dict]) {
+ if (annotation = [[PDFAnnotation alloc] initNoteWithProperties:dict]) {
if (pageIndex == NSNotFound)
pageIndex = 0;
else if (pageIndex >= [pdfDoc pageCount])
Modified: trunk/SKPDFAnnotationNote.m
===================================================================
--- trunk/SKPDFAnnotationNote.m 2008-06-04 09:23:44 UTC (rev 3956)
+++ trunk/SKPDFAnnotationNote.m 2008-06-04 10:16:47 UTC (rev 3957)
@@ -79,8 +79,8 @@
[self setContents:contents];
}
-- (id)initWithProperties:(NSDictionary *)dict{
- if (self = [super initWithProperties:dict]) {
+- (id)initNoteWithProperties:(NSDictionary *)dict{
+ if (self = [super initNoteWithProperties:dict]) {
Class attrStringClass = [NSAttributedString class];
Class stringClass = [NSString class];
Class imageClass = [NSImage class];
Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m 2008-06-04 09:23:44 UTC (rev 3956)
+++ trunk/SKPDFDocument.m 2008-06-04 10:16:47 UTC (rev 3957)
@@ -919,7 +919,7 @@
while (annotation = [annEnum nextObject]) {
if ([annotation isNote] == NO && [annotation
isConvertibleAnnotation]) {
if ([[annotation type] isEqualToString:SKTextString]) {
- PDFAnnotation *newAnnotation = [[SKPDFAnnotationNote
alloc] initWithProperties:[annotation properties]];
+ PDFAnnotation *newAnnotation = [[SKPDFAnnotationNote
alloc] initNoteWithProperties:[annotation properties]];
[[self pdfView] removeAnnotation:annotation];
[[self pdfView] addAnnotation:newAnnotation toPage:page];
[newAnnotation release];
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2008-06-04 09:23:44 UTC (rev 3956)
+++ trunk/SKPDFView.m 2008-06-04 10:16:47 UTC (rev 3957)
@@ -871,7 +871,7 @@
NSDictionary *note = [NSKeyedUnarchiver unarchiveObjectWithData:data];
NSRect bounds;
- newAnnotation = [[[PDFAnnotation alloc] initWithProperties:note]
autorelease];
+ newAnnotation = [[[PDFAnnotation alloc] initNoteWithProperties:note]
autorelease];
bounds = [newAnnotation bounds];
page = [self currentPage];
bounds = SKConstrainRect(bounds, [page boundsForBox:[self
displayBox]]);
@@ -1875,7 +1875,7 @@
[self removeActiveAnnotation:nil];
text = [[sel string]
stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines];
}
- newAnnotation = [[PDFAnnotationMarkup alloc] initWithSelection:sel
markupType:kPDFMarkupTypeHighlight];
+ newAnnotation = [[PDFAnnotationMarkup alloc]
initNoteWithSelection:sel markupType:kPDFMarkupTypeHighlight];
break;
case SKUnderlineNote:
if ([[activeAnnotation type] isEqualToString:SKUnderlineString] &&
[[activeAnnotation page] isEqual:page]) {
@@ -1883,7 +1883,7 @@
[self removeActiveAnnotation:nil];
text = [[sel string]
stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines];
}
- newAnnotation = [[PDFAnnotationMarkup alloc] initWithSelection:sel
markupType:kPDFMarkupTypeUnderline];
+ newAnnotation = [[PDFAnnotationMarkup alloc]
initNoteWithSelection:sel markupType:kPDFMarkupTypeUnderline];
break;
case SKStrikeOutNote:
if ([[activeAnnotation type] isEqualToString:SKStrikeOutString] &&
[[activeAnnotation page] isEqual:page]) {
@@ -1891,7 +1891,7 @@
[self removeActiveAnnotation:nil];
text = [[sel string]
stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines];
}
- newAnnotation = [[PDFAnnotationMarkup alloc] initWithSelection:sel
markupType:kPDFMarkupTypeStrikeOut];
+ newAnnotation = [[PDFAnnotationMarkup alloc]
initNoteWithSelection:sel markupType:kPDFMarkupTypeStrikeOut];
break;
case SKLineNote:
newAnnotation = [[PDFAnnotationLine alloc]
initNoteWithBounds:bounds];
@@ -2937,7 +2937,7 @@
if (hideNotes == NO) {
if (([theEvent modifierFlags] & NSAlternateKeyMask) &&
[newActiveAnnotation isMovable]) {
// select a new copy of the annotation
- PDFAnnotation *newAnnotation = [[PDFAnnotation alloc]
initWithProperties:[newActiveAnnotation properties]];
+ PDFAnnotation *newAnnotation = [[PDFAnnotation alloc]
initNoteWithProperties:[newActiveAnnotation properties]];
[self addAnnotation:newAnnotation toPage:page];
[[self undoManager] setActionName:NSLocalizedString(@"Add Note",
@"Undo action name")];
newActiveAnnotation = newAnnotation;
@@ -2968,7 +2968,7 @@
[accessibilityChildren release];
accessibilityChildren = nil;
- newActiveAnnotation = [[[PDFAnnotationMarkup alloc]
initWithSelection:sel markupType:markupType] autorelease];
+ newActiveAnnotation = [[[PDFAnnotationMarkup alloc]
initNoteWithSelection:sel markupType:markupType] autorelease];
[newActiveAnnotation setString:[[sel string]
stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines]];
[self addAnnotation:newActiveAnnotation toPage:page];
[[self undoManager] setActionName:NSLocalizedString(@"Join Notes",
@"Undo action name")];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit