Revision: 4138
http://skim-app.svn.sourceforge.net/skim-app/?rev=4138&view=rev
Author: hofman
Date: 2008-07-06 10:21:35 -0700 (Sun, 06 Jul 2008)
Log Message:
-----------
change some types in skimnotes framework
Modified Paths:
--------------
trunk/SkimNotes/NSFileManager_SKNExtensions.m
trunk/SkimNotes/PDFAnnotation_SKNExtensions.h
trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
trunk/SkimNotes/PDFDocument_SKNExtensions.m
trunk/SkimNotes/SKNAgentListener.m
trunk/SkimNotes/SKNExtendedAttributeManager.m
Modified: trunk/SkimNotes/NSFileManager_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/NSFileManager_SKNExtensions.m 2008-07-06 10:00:59 UTC
(rev 4137)
+++ trunk/SkimNotes/NSFileManager_SKNExtensions.m 2008-07-06 17:21:35 UTC
(rev 4138)
@@ -300,7 +300,7 @@
if ([files containsObject:filename] == NO) {
filename = [[[path lastPathComponent]
stringByDeletingPathExtension] stringByAppendingPathExtension:extension];
if ([files containsObject:filename] == NO) {
- unsigned idx = [[files
valueForKeyPath:@"pathExtension.lowercaseString"] indexOfObject:extension];
+ unsigned int idx = [[files
valueForKeyPath:@"pathExtension.lowercaseString"] indexOfObject:extension];
filename = idx == NSNotFound ? nil : [files objectAtIndex:idx];
}
}
Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.h
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.h 2008-07-06 10:00:59 UTC
(rev 4137)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.h 2008-07-06 17:21:35 UTC
(rev 4138)
@@ -214,7 +214,7 @@
@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 *)defaultSkimNoteColorForMarkupType:(int)markupType;
++ (NSColor *)defaultSkimNoteColorForMarkupType:(PDFMarkupType)markupType;
@end
#pragma mark -
Modified: trunk/SkimNotes/PDFAnnotation_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/PDFAnnotation_SKNExtensions.m 2008-07-06 10:00:59 UTC
(rev 4137)
+++ trunk/SkimNotes/PDFAnnotation_SKNExtensions.m 2008-07-06 17:21:35 UTC
(rev 4138)
@@ -349,7 +349,7 @@
Class stringClass = [NSString class];
NSString *type = [dict objectForKey:SKNPDFAnnotationTypeKey];
if ([type isKindOfClass:stringClass]) {
- int markupType = kPDFMarkupTypeHighlight;
+ PDFMarkupType markupType = kPDFMarkupTypeHighlight;
if ([type isEqualToString:SKNUnderlineString])
markupType = kPDFMarkupTypeUnderline;
else if ([type isKindOfClass:stringClass] && [type
isEqualToString:SKNStrikeOutString])
Modified: trunk/SkimNotes/PDFDocument_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/PDFDocument_SKNExtensions.m 2008-07-06 10:00:59 UTC (rev
4137)
+++ trunk/SkimNotes/PDFDocument_SKNExtensions.m 2008-07-06 17:21:35 UTC (rev
4138)
@@ -75,7 +75,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:SKNPDFAnnotationPageIndexKey]
unsignedIntValue];
+ unsigned int pageIndex = [[dict
objectForKey:SKNPDFAnnotationPageIndexKey] unsignedIntValue];
if (annotation = [[PDFAnnotation alloc]
initSkimNoteWithProperties:dict]) {
if (pageIndex == NSNotFound)
pageIndex = 0;
Modified: trunk/SkimNotes/SKNAgentListener.m
===================================================================
--- trunk/SkimNotes/SKNAgentListener.m 2008-07-06 10:00:59 UTC (rev 4137)
+++ trunk/SkimNotes/SKNAgentListener.m 2008-07-06 17:21:35 UTC (rev 4138)
@@ -89,7 +89,7 @@
if ([files containsObject:filename] == NO) {
filename = [[[path lastPathComponent]
stringByDeletingPathExtension] stringByAppendingPathExtension:extension];
if ([files containsObject:filename] == NO) {
- unsigned idx = [[files
valueForKeyPath:@"pathExtension.lowercaseString"] indexOfObject:@"skim"];
+ unsigned int idx = [[files
valueForKeyPath:@"pathExtension.lowercaseString"] indexOfObject:@"skim"];
filename = idx == NSNotFound ? nil : [files objectAtIndex:idx];
}
}
Modified: trunk/SkimNotes/SKNExtendedAttributeManager.m
===================================================================
--- trunk/SkimNotes/SKNExtendedAttributeManager.m 2008-07-06 10:00:59 UTC
(rev 4137)
+++ trunk/SkimNotes/SKNExtendedAttributeManager.m 2008-07-06 17:21:35 UTC
(rev 4138)
@@ -325,7 +325,7 @@
// this will be a unique identifier for the set of keys we're about to
write (appending a counter to the UUID)
NSString *uniqueValue = [namePrefix
stringByAppendingString:UNIQUE_VALUE];
- unsigned numberOfFragments = ([value length] / MAX_XATTR_LENGTH) +
([value length] % MAX_XATTR_LENGTH ? 1 : 0);
+ unsigned int numberOfFragments = ([value length] / MAX_XATTR_LENGTH) +
([value length] % MAX_XATTR_LENGTH ? 1 : 0);
NSDictionary *wrapper = [NSDictionary
dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], wrapperKey,
uniqueValue, uniqueKey, [NSNumber numberWithUnsignedInt:numberOfFragments],
fragmentsKey, nil];
NSData *wrapperData = [NSPropertyListSerialization
dataFromPropertyList:wrapper format:NSPropertyListBinaryFormat_v1_0
errorDescription:NULL];
NSParameterAssert([wrapperData length] < MAX_XATTR_LENGTH &&
[wrapperData length] > 0);
@@ -338,14 +338,14 @@
// now split the original data value into multiple segments
NSString *name;
- unsigned j;
+ unsigned int j;
const char *valuePtr = [value bytes];
for (j = 0; success && j < numberOfFragments; j++) {
name = [[NSString alloc] initWithFormat:@"[EMAIL PROTECTED]",
uniqueValue, j];
char *subdataPtr = (char *)&valuePtr[j * MAX_XATTR_LENGTH];
- unsigned subdataLen = j == numberOfFragments - 1 ? ([value length]
- j * MAX_XATTR_LENGTH) : MAX_XATTR_LENGTH;
+ unsigned int subdataLen = j == numberOfFragments - 1 ? ([value
length] - j * MAX_XATTR_LENGTH) : MAX_XATTR_LENGTH;
// could recurse here, but it's more efficient to use the
variables we already have
if (setxattr(fsPath, [name UTF8String], subdataPtr, subdataLen, 0,
xopts)) {
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