Revision: 5241
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5241&view=rev
Author:   hofman
Date:     2009-03-03 16:18:40 +0000 (Tue, 03 Mar 2009)

Log Message:
-----------
rename swizzled methods

Modified Paths:
--------------
    trunk/NSCharacterSet_SKExtensions.m
    trunk/NSScrollView_SKExtensions.m
    trunk/NSURL_SKExtensions.m
    trunk/PDFAnnotationLink_SKExtensions.m
    trunk/PDFAnnotationMarkup_SKExtensions.m
    trunk/PDFDisplayView_SKExtensions.m
    trunk/PDFDocument_SKExtensions.m
    trunk/PDFPage_SKExtensions.m
    trunk/SKPDFDocument.m
    trunk/SKThumbnailTableView.m
    trunk/SKTypeSelectHelper.m

Modified: trunk/NSCharacterSet_SKExtensions.m
===================================================================
--- trunk/NSCharacterSet_SKExtensions.m 2009-03-03 15:59:14 UTC (rev 5240)
+++ trunk/NSCharacterSet_SKExtensions.m 2009-03-03 16:18:40 UTC (rev 5241)
@@ -42,7 +42,7 @@
 
 @implementation NSCharacterSet (SKExtensions)
 
-+ (id)replacementNewlineCharacterSet {
++ (id)replacement_newlineCharacterSet {
     static NSCharacterSet *newlineCharacterSet = nil;
     if (newlineCharacterSet == nil) {
         NSMutableCharacterSet *tmpSet = [[NSCharacterSet 
whitespaceCharacterSet] mutableCopy];
@@ -62,7 +62,7 @@
 }
 
 + (void)load {
-    SKAddClassMethodImplementationFromSelector(self, 
@selector(newlineCharacterSet), @selector(replacementNewlineCharacterSet));
+    SKAddClassMethodImplementationFromSelector(self, 
@selector(newlineCharacterSet), @selector(replacement_newlineCharacterSet));
 }
 
 @end

Modified: trunk/NSScrollView_SKExtensions.m
===================================================================
--- trunk/NSScrollView_SKExtensions.m   2009-03-03 15:59:14 UTC (rev 5240)
+++ trunk/NSScrollView_SKExtensions.m   2009-03-03 16:18:40 UTC (rev 5241)
@@ -43,33 +43,33 @@
 
 @implementation NSScrollView (SKExtensions)
 
-static void (*originalSetHasHorizontalScroller)(id, SEL, BOOL) = NULL;
-static void (*originalSetAutohidesScrollers)(id, SEL, BOOL) = NULL;
-static void (*originalDealloc)(id, SEL) = NULL;
-static void (*originalTile)(id, SEL) = NULL;
+static void (*original_setHasHorizontalScroller)(id, SEL, BOOL) = NULL;
+static void (*original_setAutohidesScrollers)(id, SEL, BOOL) = NULL;
+static void (*original_dealloc)(id, SEL) = NULL;
+static void (*original_tile)(id, SEL) = NULL;
 
 static CFMutableDictionaryRef scrollViewPlacards = NULL;
 
-- (void)replacementDealloc;
+- (void)replacement_dealloc;
 {
     CFDictionaryRemoveValue(scrollViewPlacards, self);
-    originalDealloc(self, _cmd);
+    original_dealloc(self, _cmd);
 }
 
-- (void)replacementSetHasHorizontalScroller:(BOOL)flag;
+- (void)replacement_setHasHorizontalScroller:(BOOL)flag;
 {
     if ([[self placards] count] == 0)
-        originalSetHasHorizontalScroller(self, _cmd, flag);
+        original_setHasHorizontalScroller(self, _cmd, flag);
 }
 
-- (void)replacementSetAutohidesScrollers:(BOOL)flag;
+- (void)replacement_setAutohidesScrollers:(BOOL)flag;
 {
     if ([[self placards] count] == 0)
-        originalSetAutohidesScrollers(self, _cmd, flag);
+        original_setAutohidesScrollers(self, _cmd, flag);
 }
 
-- (void)replacementTile {
-    originalTile(self, _cmd);
+- (void)replacement_tile {
+    original_tile(self, _cmd);
     
     NSArray *placards = [self placards];
     
@@ -103,10 +103,10 @@
 }
 
 + (void)load{
-    originalSetHasHorizontalScroller = (void (*)(id, SEL, 
BOOL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(setHasHorizontalScroller:), 
@selector(replacementSetHasHorizontalScroller:));
-    originalSetAutohidesScrollers = (void (*)(id, SEL, 
BOOL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(setAutohidesScrollers:), 
@selector(replacementSetAutohidesScrollers:));
-    originalDealloc = (void (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(dealloc), @selector(replacementDealloc));
-    originalTile = (void (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(tile), 
@selector(replacementTile));
+    original_setHasHorizontalScroller = (void (*)(id, SEL, 
BOOL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(setHasHorizontalScroller:), 
@selector(replacement_setHasHorizontalScroller:));
+    original_setAutohidesScrollers = (void (*)(id, SEL, 
BOOL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(setAutohidesScrollers:), 
@selector(replacement_setAutohidesScrollers:));
+    original_dealloc = (void (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(dealloc), @selector(replacement_dealloc));
+    original_tile = (void (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, @selector(tile), 
@selector(replacement_tile));
     
     // dictionary doesn't retain keys, so no retain cycles; pointer equality 
used to compare views
     scrollViewPlacards = CFDictionaryCreateMutable(CFAllocatorGetDefault(), 0, 
NULL, &kCFTypeDictionaryValueCallBacks);
@@ -127,8 +127,8 @@
     [placards setArray:newPlacards];
     
     if ([placards count] != 0) {
-        originalSetHasHorizontalScroller(self, 
@selector(setHasHorizontalScroller:), YES);
-        originalSetAutohidesScrollers(self, @selector(setAutohidesScrollers:), 
NO);
+        original_setHasHorizontalScroller(self, 
@selector(setHasHorizontalScroller:), YES);
+        original_setAutohidesScrollers(self, 
@selector(setAutohidesScrollers:), NO);
     } else if (placards) {
         CFDictionaryRemoveValue(scrollViewPlacards, self);
         placards = nil;

Modified: trunk/NSURL_SKExtensions.m
===================================================================
--- trunk/NSURL_SKExtensions.m  2009-03-03 15:59:14 UTC (rev 5240)
+++ trunk/NSURL_SKExtensions.m  2009-03-03 16:18:40 UTC (rev 5241)
@@ -43,20 +43,20 @@
 
 @implementation NSURL (SKExtensions)
 
-static id (*originalInitFileURLWithPath)(id, SEL, id) = NULL;
-static id (*originalInitWithString)(id, SEL, id) = NULL;
+static id (*original_initFileURLWithPath)(id, SEL, id) = NULL;
+static id (*original_initWithString)(id, SEL, id) = NULL;
 
-- (id)replacementInitFileURLWithPath:(NSString *)path {
-    return path == nil ? nil : originalInitFileURLWithPath(self, _cmd, path);
+- (id)replacement_initFileURLWithPath:(NSString *)path {
+    return path == nil ? nil : original_initFileURLWithPath(self, _cmd, path);
 }
 
-- (id)replacementInitWithString:(NSString *)URLString {
-    return URLString == nil ? nil : originalInitWithString(self, _cmd, 
URLString);
+- (id)replacement_initWithString:(NSString *)URLString {
+    return URLString == nil ? nil : original_initWithString(self, _cmd, 
URLString);
 }
 
 + (void)load {
-    originalInitFileURLWithPath = (id (*)(id, SEL, 
id))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(initFileURLWithPath:), @selector(replacementInitFileURLWithPath:));
-    originalInitWithString = (id (*)(id, SEL, 
id))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(initWithString:), @selector(replacementInitWithString:));
+    original_initFileURLWithPath = (id (*)(id, SEL, 
id))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(initFileURLWithPath:), @selector(replacement_initFileURLWithPath:));
+    original_initWithString = (id (*)(id, SEL, 
id))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(initWithString:), @selector(replacement_initWithString:));
 }
 
 + (NSURL *)URLFromPasteboardAnyType:(NSPasteboard *)pasteboard {

Modified: trunk/PDFAnnotationLink_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLink_SKExtensions.m      2009-03-03 15:59:14 UTC (rev 
5240)
+++ trunk/PDFAnnotationLink_SKExtensions.m      2009-03-03 16:18:40 UTC (rev 
5241)
@@ -49,20 +49,20 @@
 
 // override these Leopard methods to avoid showing the standard tool tips over 
our own
 
-static id (*originalToolTip)(id, SEL) = NULL;
-static id (*originalToolTipNoLabel)(id, SEL) = NULL;
+static id (*original_toolTip)(id, SEL) = NULL;
+static id (*original_toolTipNoLabel)(id, SEL) = NULL;
 
-- (NSString *)replacementToolTip {
-    return ([self URL] || [self destination] || originalToolTip == NULL) ? nil 
: originalToolTip(self, _cmd);
+- (NSString *)replacement_toolTip {
+    return ([self URL] || [self destination] || original_toolTip == NULL) ? 
nil : original_toolTip(self, _cmd);
 }
 
-- (NSString *)replacementToolTipNoLabel {
-    return ([self URL] || [self destination] || originalToolTipNoLabel == 
NULL) ? nil : originalToolTipNoLabel(self, _cmd);
+- (NSString *)replacement_toolTipNoLabel {
+    return ([self URL] || [self destination] || original_toolTipNoLabel == 
NULL) ? nil : original_toolTipNoLabel(self, _cmd);
 }
 
 + (void)load {
-    originalToolTip = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(toolTip), @selector(replacementToolTip));
-    originalToolTipNoLabel = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(toolTip), @selector(replacementToolTipNoLabel));
+    original_toolTip = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(toolTip), @selector(replacement_toolTip));
+    original_toolTipNoLabel = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(toolTipNoLabel), @selector(replacement_toolTipNoLabel));
 }
 
 - (BOOL)isLink { return YES; }
@@ -81,8 +81,8 @@
 
 - (id)accessibilityTitleAttribute {
     NSString *title = nil;
-    if (originalToolTip != NULL)
-        title = originalToolTip(self, _cmd);
+    if (original_toolTip != NULL)
+        title = original_toolTip(self, _cmd);
     if (title == nil)
         title = [self contents];
     return title;

Modified: trunk/PDFAnnotationMarkup_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationMarkup_SKExtensions.m    2009-03-03 15:59:14 UTC (rev 
5240)
+++ trunk/PDFAnnotationMarkup_SKExtensions.m    2009-03-03 16:18:40 UTC (rev 
5241)
@@ -108,26 +108,26 @@
 
 static CFMutableDictionaryRef lineRectsDict = NULL;
 
-static void (*originalDealloc)(id, SEL) = NULL;
-static void (*originalDrawWithBoxInContext)(id, SEL, CGPDFBox, CGContextRef) = 
NULL;
+static void (*original_dealloc)(id, SEL) = NULL;
+static void (*original_drawWithBox_inContext)(id, SEL, CGPDFBox, CGContextRef) 
= NULL;
 
 - (void)replacementDealloc {
     CFDictionaryRemoveValue(lineRectsDict, self);
-    originalDealloc(self, _cmd);
+    original_dealloc(self, _cmd);
 }
 
 // fix a bug in PDFKit, the color space sometimes is not correct
-- (void)replacementDrawWithBox:(CGPDFBox)box inContext:(CGContextRef)context {
+- (void)replacement_drawWithBox:(CGPDFBox)box inContext:(CGContextRef)context {
     CGContextSaveGState(context);
     SKCGContextSetDefaultRGBColorSpace(context);
-    originalDrawWithBoxInContext(self, _cmd, box, context);
+    original_drawWithBox_inContext(self, _cmd, box, context);
     CGContextRestoreGState(context);
 }
 
 + (void)load {
-    originalDealloc = (void (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(dealloc), @selector(replacementDealloc));
+    original_dealloc = (void (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(dealloc), @selector(replacement_dealloc));
     if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_4)
-        originalDrawWithBoxInContext = (void (*)(id, SEL, CGPDFBox, 
CGContextRef))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(drawWithBox:inContext:), 
@selector(replacementDrawWithBox:inContext:));
+        original_drawWithBox_inContext = (void (*)(id, SEL, CGPDFBox, 
CGContextRef))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(drawWithBox:inContext:), 
@selector(replacement_drawWithBox:inContext:));
     lineRectsDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, NULL, 
&kCFTypeDictionaryValueCallBacks);
 }
 

Modified: trunk/PDFDisplayView_SKExtensions.m
===================================================================
--- trunk/PDFDisplayView_SKExtensions.m 2009-03-03 15:59:14 UTC (rev 5240)
+++ trunk/PDFDisplayView_SKExtensions.m 2009-03-03 16:18:40 UTC (rev 5241)
@@ -68,59 +68,59 @@
     return pdfView;
 }
 
-static void (*originalResetCursorRects)(id, SEL) = NULL;
-static void (*originalPasswordEntered)(id, SEL, id) = NULL;
+static void (*original_resetCursorRects)(id, SEL) = NULL;
+static void (*original_passwordEntered)(id, SEL, id) = NULL;
 
-static id (*originalAccessibilityAttributeNames)(id, SEL) = NULL;
-static id (*originalAccessibilityParameterizedAttributeNames)(id, SEL) = NULL;
-static id (*originalAccessibilityAttributeValue)(id, SEL, id) = NULL;
-static id (*originalAccessibilityHitTest)(id, SEL, NSPoint) = NULL;
-static id (*originalAccessibilityFocusedUIElement)(id, SEL) = NULL;
+static id (*original_accessibilityAttributeNames)(id, SEL) = NULL;
+static id (*original_accessibilityParameterizedAttributeNames)(id, SEL) = NULL;
+static id (*original_accessibilityAttributeValue)(id, SEL, id) = NULL;
+static id (*original_accessibilityHitTest)(id, SEL, NSPoint) = NULL;
+static id (*original_accessibilityFocusedUIElement)(id, SEL) = NULL;
 
 #pragma mark Skim support
 
-static void replacementResetCursorRects(id self, SEL _cmd) {
-       originalResetCursorRects(self, _cmd);
+static void replacement_resetCursorRects(id self, SEL _cmd) {
+       original_resetCursorRects(self, _cmd);
     id pdfView = SKGetPDFView(self);
     if ([pdfView respondsToSelector:@selector(resetPDFToolTipRects)])
         [pdfView resetPDFToolTipRects];
 }
 
-static void replacementPasswordEntered(id self, SEL _cmd, id sender) {
+static void replacement_passwordEntered(id self, SEL _cmd, id sender) {
     SKPDFDocument *document = [[[self window] windowController] document];
-    originalPasswordEntered(self, _cmd, sender);
+    original_passwordEntered(self, _cmd, sender);
     if ([document respondsToSelector:@selector(savePasswordInKeychain:)])
         [document savePasswordInKeychain:[sender stringValue]];
 }
 
 #pragma mark Accessibility
 
-static NSArray *replacementAccessibilityAttributeNames(id self, SEL _cmd) {
+static NSArray *replacement_accessibilityAttributeNames(id self, SEL _cmd) {
     if ([SKGetPDFView(self) 
respondsToSelector:@selector(accessibilityChildren)]) {
         static NSArray *attributes = nil;
         if (attributes == nil)
-            attributes = [[originalAccessibilityAttributeNames(self, _cmd) 
arrayByAddingObject:NSAccessibilityChildrenAttribute] retain];
+            attributes = [[original_accessibilityAttributeNames(self, _cmd) 
arrayByAddingObject:NSAccessibilityChildrenAttribute] retain];
         return attributes;
     } else {
-        return originalAccessibilityAttributeNames(self, _cmd);
+        return original_accessibilityAttributeNames(self, _cmd);
     }
 }
 
-static NSArray *replacementAccessibilityParameterizedAttributeNames(id self, 
SEL _cmd) {
+static NSArray *replacement_accessibilityParameterizedAttributeNames(id self, 
SEL _cmd) {
     static NSArray *attributes = nil;
     if (attributes == nil)
-        attributes = [[originalAccessibilityParameterizedAttributeNames(self, 
_cmd) arrayByAddingObjectsFromArray:[NSArray 
arrayWithObjects:NSAccessibilityRangeForPositionParameterizedAttribute, 
NSAccessibilityRTFForRangeParameterizedAttribute, 
NSAccessibilityAttributedStringForRangeParameterizedAttribute, nil]] retain];
+        attributes = [[original_accessibilityParameterizedAttributeNames(self, 
_cmd) arrayByAddingObjectsFromArray:[NSArray 
arrayWithObjects:NSAccessibilityRangeForPositionParameterizedAttribute, 
NSAccessibilityRTFForRangeParameterizedAttribute, 
NSAccessibilityAttributedStringForRangeParameterizedAttribute, nil]] retain];
     return attributes;
 }
 
-static id replacementAccessibilityAttributeValue(id self, SEL _cmd, NSString 
*attribute) {
+static id replacement_accessibilityAttributeValue(id self, SEL _cmd, NSString 
*attribute) {
     if ([attribute isEqualToString:NSAccessibilityRoleAttribute]) {
         return NSAccessibilityTextAreaRole;
     } else if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) {
         id pdfView = SKGetPDFView(self);
-        return [pdfView respondsToSelector:@selector(accessibilityChildren)] ? 
NSAccessibilityUnignoredChildren([pdfView accessibilityChildren]) : 
originalAccessibilityAttributeValue(self, _cmd, attribute);
+        return [pdfView respondsToSelector:@selector(accessibilityChildren)] ? 
NSAccessibilityUnignoredChildren([pdfView accessibilityChildren]) : 
original_accessibilityAttributeValue(self, _cmd, attribute);
     } else {
-        return originalAccessibilityAttributeValue(self, _cmd, attribute);
+        return original_accessibilityAttributeValue(self, _cmd, attribute);
     }
 }
 
@@ -136,7 +136,7 @@
     return attributedString;
 }
 
-static id replacementAccessibilityRangeForPositionAttributeForParameter(id 
self, SEL _cmd, id parameter) {
+static id replacement_accessibilityRangeForPositionAttributeForParameter(id 
self, SEL _cmd, id parameter) {
     id pdfView = SKGetPDFView(self);
     if (pdfView && [self 
respondsToSelector:@selector(accessibilityRangeForSelection:)]) {
         NSPoint point = [pdfView convertPoint:[[pdfView window] 
convertScreenToBase:[parameter pointValue]] fromView:nil];
@@ -153,7 +153,7 @@
     return nil;
 }
 
-static id replacementAccessibilityRTFForRangeAttributeForParameter(id self, 
SEL _cmd, id parameter) {
+static id replacement_accessibilityRTFForRangeAttributeForParameter(id self, 
SEL _cmd, id parameter) {
     id pdfView = SKGetPDFView(self);
     if (pdfView) {
         NSAttributedString *attributedString = 
attributedStringForAccessibilityRange(self, [parameter rangeValue]);
@@ -162,7 +162,7 @@
     return nil;
 }
 
-static id 
replacementAccessibilityAttributedStringForRangeAttributeForParameter(id self, 
SEL _cmd, id parameter) {
+static id 
replacement_accessibilityAttributedStringForRangeAttributeForParameter(id self, 
SEL _cmd, id parameter) {
     id pdfView = SKGetPDFView(self);
     if (pdfView) {
         return [attributedStringForAccessibilityRange(self, [parameter 
rangeValue]) accessibilityAttributedString];
@@ -170,7 +170,7 @@
     return nil;
 }
 
-static id replacementAccessibilityStyleRangeForIndexAttributeForParameter(id 
self, SEL _cmd, id parameter) {
+static id replacement_accessibilityStyleRangeForIndexAttributeForParameter(id 
self, SEL _cmd, id parameter) {
     id pdfView = SKGetPDFView(self);
     if (pdfView) {
         // make sure the accessibility table is generated
@@ -199,20 +199,20 @@
     return nil;
 }
 
-static id replacementAccessibilityHitTest(id self, SEL _cmd, NSPoint point) {
+static id replacement_accessibilityHitTest(id self, SEL _cmd, NSPoint point) {
     id pdfView = SKGetPDFView(self);
     id element = nil;
     if ([pdfView respondsToSelector:@selector(accessibilityChildAtPoint:)])
         element = [pdfView accessibilityChildAtPoint:point];
-    return element ?: originalAccessibilityHitTest(self, _cmd, point);
+    return element ?: original_accessibilityHitTest(self, _cmd, point);
 }
 
-static id replacementAccessibilityFocusedUIElement(id self, SEL _cmd) {
+static id replacement_accessibilityFocusedUIElement(id self, SEL _cmd) {
     id pdfView = SKGetPDFView(self);
     id element = nil;
     if ([pdfView respondsToSelector:@selector(accessibilityFocusedChild)])
         element = [pdfView accessibilityFocusedChild];
-    return element ?: originalAccessibilityFocusedUIElement(self, _cmd);
+    return element ?: original_accessibilityFocusedUIElement(self, _cmd);
 }
 
 #pragma mark SKSwizzlePDFDisplayViewMethods
@@ -220,21 +220,21 @@
 void SKSwizzlePDFDisplayViewMethods() {
     Class PDFDisplayViewClass = NSClassFromString(@"PDFDisplayView");
     if (PDFDisplayViewClass) {
-        originalResetCursorRects = (void (*)(id, 
SEL))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(resetCursorRects), (IMP)replacementResetCursorRects);
-        originalPasswordEntered = (void (*)(id, SEL, 
id))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(passwordEntered:), (IMP)replacementPasswordEntered);
+        original_resetCursorRects = (void (*)(id, 
SEL))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(resetCursorRects), (IMP)replacement_resetCursorRects);
+        original_passwordEntered = (void (*)(id, SEL, 
id))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(passwordEntered:), (IMP)replacement_passwordEntered);
         
         if ([[NSUserDefaults standardUserDefaults] 
boolForKey:@"SKDisableExtendedPDFViewAccessibility"]) return;
         
-        originalAccessibilityAttributeNames = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityAttributeNames), 
(IMP)replacementAccessibilityAttributeNames);
-        originalAccessibilityAttributeValue = (id (*)(id, SEL, 
id))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityAttributeValue:), 
(IMP)replacementAccessibilityAttributeValue);
-        originalAccessibilityHitTest = (id (*)(id, SEL, 
NSPoint))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityHitTest:), (IMP)replacementAccessibilityHitTest);
-        originalAccessibilityFocusedUIElement = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityFocusedUIElement), 
(IMP)replacementAccessibilityFocusedUIElement);
-        originalAccessibilityParameterizedAttributeNames = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityParameterizedAttributeNames), 
(IMP)replacementAccessibilityParameterizedAttributeNames);
+        original_accessibilityAttributeNames = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityAttributeNames), 
(IMP)replacement_accessibilityAttributeNames);
+        original_accessibilityAttributeValue = (id (*)(id, SEL, 
id))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityAttributeValue:), 
(IMP)replacement_accessibilityAttributeValue);
+        original_accessibilityHitTest = (id (*)(id, SEL, 
NSPoint))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityHitTest:), (IMP)replacement_accessibilityHitTest);
+        original_accessibilityFocusedUIElement = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityFocusedUIElement), 
(IMP)replacement_accessibilityFocusedUIElement);
+        original_accessibilityParameterizedAttributeNames = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityParameterizedAttributeNames), 
(IMP)replacement_accessibilityParameterizedAttributeNames);
         
-        SKAddInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityRangeForPositionAttributeForParameter:), 
(IMP)replacementAccessibilityRangeForPositionAttributeForParameter, "@@:@");
-        SKAddInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityRTFForRangeAttributeForParameter:), 
(IMP)replacementAccessibilityRTFForRangeAttributeForParameter, "@@:@");
-        SKAddInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityAttributedStringForRangeAttributeForParameter:), 
(IMP)replacementAccessibilityAttributedStringForRangeAttributeForParameter, 
"@@:@");
-        SKAddInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityStyleRangeForIndexAttributeForParameter:), 
(IMP)replacementAccessibilityStyleRangeForIndexAttributeForParameter, "@@:@");
+        SKAddInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityRangeForPositionAttributeForParameter:), 
(IMP)replacement_accessibilityRangeForPositionAttributeForParameter, "@@:@");
+        SKAddInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityRTFForRangeAttributeForParameter:), 
(IMP)replacement_accessibilityRTFForRangeAttributeForParameter, "@@:@");
+        SKAddInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityAttributedStringForRangeAttributeForParameter:), 
(IMP)replacement_accessibilityAttributedStringForRangeAttributeForParameter, 
"@@:@");
+        SKAddInstanceMethodImplementation(PDFDisplayViewClass, 
@selector(accessibilityStyleRangeForIndexAttributeForParameter:), 
(IMP)replacement_accessibilityStyleRangeForIndexAttributeForParameter, "@@:@");
     }
 }
 

Modified: trunk/PDFDocument_SKExtensions.m
===================================================================
--- trunk/PDFDocument_SKExtensions.m    2009-03-03 15:59:14 UTC (rev 5240)
+++ trunk/PDFDocument_SKExtensions.m    2009-03-03 16:18:40 UTC (rev 5241)
@@ -48,10 +48,10 @@
 
 @implementation PDFDocument (SKExtensions)
 
-static id (*originalGetPrintOperationForPrintInfo)(id, SEL, id, BOOL) = NULL;
+static id (*original_getPrintOperationForPrintInfo_autoRotate)(id, SEL, id, 
BOOL) = NULL;
 
-- (NSPrintOperation *)replacementGetPrintOperationForPrintInfo:(NSPrintInfo 
*)printInfo autoRotate:(BOOL)autoRotate {
-    NSPrintOperation *printOperation = 
originalGetPrintOperationForPrintInfo(self, _cmd, printInfo, autoRotate);
+- (NSPrintOperation *)replacement_getPrintOperationForPrintInfo:(NSPrintInfo 
*)printInfo autoRotate:(BOOL)autoRotate {
+    NSPrintOperation *printOperation = 
original_getPrintOperationForPrintInfo_autoRotate(self, _cmd, printInfo, 
autoRotate);
     BOOL suppressPrintPanel = [[[[printOperation printInfo] dictionary] 
objectForKey:@"SKSuppressPrintPanel"] boolValue];
     
     if (suppressPrintPanel) {
@@ -72,7 +72,7 @@
 }
 
 + (void)load {
-    originalGetPrintOperationForPrintInfo = (id (*)(id, SEL, id, 
BOOL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(getPrintOperationForPrintInfo:autoRotate:), 
@selector(replacementGetPrintOperationForPrintInfo:autoRotate:));
+    original_getPrintOperationForPrintInfo_autoRotate = (id (*)(id, SEL, id, 
BOOL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(getPrintOperationForPrintInfo:autoRotate:), 
@selector(replacement_getPrintOperationForPrintInfo:autoRotate:));
 }
 
 - (PDFSelection *)selectionByExtendingSelection:(PDFSelection *)selection 
toPage:(PDFPage *)page atPoint:(NSPoint)point {

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2009-03-03 15:59:14 UTC (rev 5240)
+++ trunk/PDFPage_SKExtensions.m        2009-03-03 16:18:40 UTC (rev 5241)
@@ -69,15 +69,15 @@
 
 // A subclass with ivars would be nicer in some respects, but that would 
require subclassing PDFDocument and returning instances of the subclass for 
each page.
 static CFMutableDictionaryRef bboxCache = NULL;
-static void (*originalDealloc)(id, SEL) = NULL;
+static void (*original_dealloc)(id, SEL) = NULL;
 
-- (void)replacementDealloc {
+- (void)replacement_dealloc {
     CFDictionaryRemoveValue(bboxCache, self);
-    originalDealloc(self, _cmd);
+    original_dealloc(self, _cmd);
 }
 
 + (void)load {
-    originalDealloc = (void (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(dealloc), @selector(replacementDealloc));
+    original_dealloc = (void (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(dealloc), @selector(replacement_dealloc));
     bboxCache = CFDictionaryCreateMutable(NULL, 0, NULL, 
&kSKNSRectDictionaryValueCallBacks);
 }
 

Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m       2009-03-03 15:59:14 UTC (rev 5240)
+++ trunk/SKPDFDocument.m       2009-03-03 16:18:40 UTC (rev 5241)
@@ -2129,15 +2129,15 @@
 
 @implementation NSWindow (SKScriptingExtensions)
 
-static id (*originalDocument)(id, SEL) = NULL;
+static id (*original_document)(id, SEL) = NULL;
 
-- (id)replacementDocument {
-    id document = originalDocument(self, _cmd);
+- (id)replacement_document {
+    id document = original_document(self, _cmd);
     return [[NSApp orderedDocuments] containsObject:document] ? document : 
[NSNull null];
 }
 
 + (void)load {
-    originalDocument = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(document), @selector(replacementDocument));
+    original_document = (id (*)(id, 
SEL))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(document), @selector(replacement_document));
 }
 
 - (void)handleRevertScriptCommand:(NSScriptCommand *)command {

Modified: trunk/SKThumbnailTableView.m
===================================================================
--- trunk/SKThumbnailTableView.m        2009-03-03 15:59:14 UTC (rev 5240)
+++ trunk/SKThumbnailTableView.m        2009-03-03 16:18:40 UTC (rev 5241)
@@ -49,16 +49,16 @@
 
 @implementation NSScroller (SKExtensions)
 
-static void (*originalTrackKnob)(id, SEL, id) = NULL;
+static void (*original_trackKnob)(id, SEL, id) = NULL;
 
-- (void)replacementTrackKnob:(NSEvent *)theEvent {
+- (void)replacement_trackKnob:(NSEvent *)theEvent {
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKScrollerWillScrollNotification object:self];
-    originalTrackKnob(self, _cmd, theEvent);
+    original_trackKnob(self, _cmd, theEvent);
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKScrollerDidScrollNotification object:self];
 }
 
 + (void)load {
-    originalTrackKnob = (void (*)(id, SEL, 
id))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(trackKnob:), @selector(replacementTrackKnob:));
+    original_trackKnob = (void (*)(id, SEL, 
id))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(trackKnob:), @selector(replacement_trackKnob:));
 }
 
 @end

Modified: trunk/SKTypeSelectHelper.m
===================================================================
--- trunk/SKTypeSelectHelper.m  2009-03-03 15:59:14 UTC (rev 5240)
+++ trunk/SKTypeSelectHelper.m  2009-03-03 16:18:40 UTC (rev 5241)
@@ -427,18 +427,18 @@
 
 @implementation NSWindow (SKTypeAheadHelperExtensions)
 
-static BOOL (*originalMakeFirstResponder)(id, SEL, id) = NULL;
+static BOOL (*original_makeFirstResponder)(id, SEL, id) = NULL;
 
-- (BOOL)replacementMakeFirstResponder:(NSResponder *)aResponder {
+- (BOOL)replacement_makeFirstResponder:(NSResponder *)aResponder {
     id oldFirstResponder = [self firstResponder];
-    BOOL success = originalMakeFirstResponder(self, _cmd, aResponder);
+    BOOL success = original_makeFirstResponder(self, _cmd, aResponder);
     if (oldFirstResponder != [self firstResponder])
         [[NSNotificationCenter defaultCenter] 
postNotificationName:SKWindowDidChangeFirstResponderNotification object:self];
     return success;
 }
 
 + (void)load {
-    originalMakeFirstResponder = 
(typeof(originalMakeFirstResponder))SKReplaceInstanceMethodImplementationFromSelector(self,
 @selector(makeFirstResponder:), @selector(replacementMakeFirstResponder:));
+    original_makeFirstResponder = 
(typeof(original_makeFirstResponder))SKReplaceInstanceMethodImplementationFromSelector(self,
 @selector(makeFirstResponder:), @selector(replacement_makeFirstResponder:));
 }
 
 @end


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to