Revision: 4135
http://skim-app.svn.sourceforge.net/skim-app/?rev=4135&view=rev
Author: hofman
Date: 2008-07-05 07:04:36 -0700 (Sat, 05 Jul 2008)
Log Message:
-----------
Rename two method names in categories to be less generic. Now all method names
in categories on system objects contain the words Skim and Note, which should
be sufficient to avoid name conflicts.
Modified Paths:
--------------
trunk/SkimNotes/PDFAnnotation_SKNExtensions.h
trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
trunk/SkimNotes/SKNPDFAnnotationNote.m
Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.h
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.h 2008-07-05 13:41:09 UTC
(rev 4134)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.h 2008-07-05 14:04:36 UTC
(rev 4135)
@@ -110,12 +110,12 @@
- (id)initSkimNoteWithProperties:(NSDictionary *)dict;
/*!
- @method properties
+ @method SkimNoteProperties
@abstract The Skim notes properties.
@discussion These properties can be used to initialize a new copy, and to
save to extended attributes or file.
@result A dictionary with properties of the Skim note. All values are
standard Cocoa objects conforming to <code>NSCoding</code> and
<code>NSCopying</code>.
*/
-- (NSDictionary *)properties;
+- (NSDictionary *)SkimNoteProperties;
/*!
@method isSkimNote
@@ -208,13 +208,13 @@
*/
@interface PDFAnnotationMarkup (SKNOptional)
/*!
- @method defaultColorForMarkupType:
+ @method defaultSkimNoteColorForMarkupType:
@abstract Optional method to implement to return the default color to
use for markup initialized with properties that do not contain a color.
@param markupType The markup style for which to return the default
color.
@discussion This optional method can be implemented in another category to
provide a default color for Skim notes that have no color set in the properties
dictionary. This method is not implemented by default.
@result The default color for an annotation with the passed in markup
style.
*/
-+ (NSColor *)defaultColorForMarkupType:(int)markupType;
++ (NSColor *)defaultSkimNoteColorForMarkupType:(int)markupType;
@end
#pragma mark -
Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.m 2008-07-05 13:41:09 UTC
(rev 4134)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.m 2008-07-05 14:04:36 UTC
(rev 4135)
@@ -185,7 +185,7 @@
return self;
}
-- (NSDictionary *)properties{
+- (NSDictionary *)SkimNoteProperties{
PDFPage *page = [self page];
unsigned int pageIndex = page ? [[page document] indexForPage:page] :
NSNotFound;
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:5];
@@ -237,8 +237,8 @@
return self;
}
-- (NSDictionary *)properties{
- NSMutableDictionary *dict = [[[super properties] mutableCopy] autorelease];
+- (NSDictionary *)SkimNoteProperties{
+ NSMutableDictionary *dict = [[[super SkimNoteProperties] mutableCopy]
autorelease];
[dict setValue:[self interiorColor]
forKey:SKNPDFAnnotationInteriorColorKey];
return dict;
}
@@ -259,8 +259,8 @@
return self;
}
-- (NSDictionary *)properties{
- NSMutableDictionary *dict = [[[super properties] mutableCopy] autorelease];
+- (NSDictionary *)SkimNoteProperties{
+ NSMutableDictionary *dict = [[[super SkimNoteProperties] mutableCopy]
autorelease];
[dict setValue:[self interiorColor]
forKey:SKNPDFAnnotationInteriorColorKey];
return dict;
}
@@ -290,8 +290,8 @@
return self;
}
-- (NSDictionary *)properties {
- NSMutableDictionary *dict = [[[super properties] mutableCopy] autorelease];
+- (NSDictionary *)SkimNoteProperties {
+ NSMutableDictionary *dict = [[[super SkimNoteProperties] mutableCopy]
autorelease];
[dict setValue:[NSNumber numberWithInt:[self startLineStyle]]
forKey:SKNPDFAnnotationStartLineStyleKey];
[dict setValue:[NSNumber numberWithInt:[self endLineStyle]]
forKey:SKNPDFAnnotationEndLineStyleKey];
[dict setValue:NSStringFromPoint([self startPoint])
forKey:SKNPDFAnnotationStartPointKey];
@@ -328,8 +328,8 @@
return self;
}
-- (NSDictionary *)properties{
- NSMutableDictionary *dict = [[[super properties] mutableCopy] autorelease];
+- (NSDictionary *)SkimNoteProperties{
+ NSMutableDictionary *dict = [[[super SkimNoteProperties] mutableCopy]
autorelease];
[dict setValue:[self font] forKey:SKNPDFAnnotationFontKey];
if ([self respondsToSelector:@selector(fontColor)] && [[self fontColor]
isEqual:[NSColor colorWithCalibratedWhite:0.0 alpha:0.0]] == NO)
[dict setValue:[self fontColor] forKey:SKNPDFAnnotationFontColorKey];
@@ -356,8 +356,8 @@
markupType = kPDFMarkupTypeStrikeOut;
if (markupType != [self markupType]) {
[self setMarkupType:markupType];
- if ([dict objectForKey:SKNPDFAnnotationColorKey] == nil &&
[[self class] respondsToSelector:@selector(defaultColorForMarkupType:)]) {
- NSColor *color = [[self class]
defaultColorForMarkupType:markupType];
+ if ([dict objectForKey:SKNPDFAnnotationColorKey] == nil &&
[[self class]
respondsToSelector:@selector(defaultSkimNoteColorForMarkupType:)]) {
+ NSColor *color = [[self class]
defaultSkimNoteColorForMarkupType:markupType];
if (color)
[self setColor:color];
}
@@ -383,8 +383,8 @@
return self;
}
-- (NSDictionary *)properties {
- NSMutableDictionary *dict = [[[super properties] mutableCopy] autorelease];
+- (NSDictionary *)SkimNoteProperties {
+ NSMutableDictionary *dict = [[[super SkimNoteProperties] mutableCopy]
autorelease];
NSArray *quadPoints = [self quadrilateralPoints];
if (quadPoints) {
int i, iMax = [quadPoints count];
@@ -412,8 +412,8 @@
return self;
}
-- (NSDictionary *)properties{
- NSMutableDictionary *dict = [[[super properties] mutableCopy] autorelease];
+- (NSDictionary *)SkimNoteProperties{
+ NSMutableDictionary *dict = [[[super SkimNoteProperties] mutableCopy]
autorelease];
[dict setValue:[NSNumber numberWithInt:[self iconType]]
forKey:SKNPDFAnnotationIconTypeKey];
return dict;
}
Modified: trunk/SkimNotes/SKNPDFAnnotationNote.m
===================================================================
--- trunk/SkimNotes/SKNPDFAnnotationNote.m 2008-07-05 13:41:09 UTC (rev
4134)
+++ trunk/SkimNotes/SKNPDFAnnotationNote.m 2008-07-05 14:04:36 UTC (rev
4135)
@@ -93,8 +93,8 @@
[super dealloc];
}
-- (NSDictionary *)properties{
- NSMutableDictionary *dict = [[[super properties] mutableCopy] autorelease];
+- (NSDictionary *)SkimNoteProperties{
+ NSMutableDictionary *dict = [[[super SkimNoteProperties] mutableCopy]
autorelease];
[dict setValue:[self text] forKey:SKNPDFAnnotationTextKey];
[dict setValue:[self image] forKey:SKNPDFAnnotationImageKey];
return dict;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit