Revision: 4156
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4156&view=rev
Author:   hofman
Date:     2008-07-08 11:46:51 -0700 (Tue, 08 Jul 2008)

Log Message:
-----------
Move link annotation class to separate file.

Modified Paths:
--------------
    trunk/PDFAnnotation_SKExtensions.m
    trunk/Skim.xcodeproj/project.pbxproj

Added Paths:
-----------
    trunk/PDFAnnotationLink_SKExtensions.h
    trunk/PDFAnnotationLink_SKExtensions.m

Added: trunk/PDFAnnotationLink_SKExtensions.h
===================================================================
--- trunk/PDFAnnotationLink_SKExtensions.h                              (rev 0)
+++ trunk/PDFAnnotationLink_SKExtensions.h      2008-07-08 18:46:51 UTC (rev 
4156)
@@ -0,0 +1,43 @@
+//
+//  PDFAnnotationLink_SKExtensions.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 7/8/08.
+/*
+ This software is Copyright (c) 2008
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
[EMAIL PROTECTED] PDFAnnotationLink (SKExtension)
[EMAIL PROTECTED]

Added: trunk/PDFAnnotationLink_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLink_SKExtensions.m                              (rev 0)
+++ trunk/PDFAnnotationLink_SKExtensions.m      2008-07-08 18:46:51 UTC (rev 
4156)
@@ -0,0 +1,104 @@
+//
+//  PDFAnnotationLink_SKExtensions.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 7/8/08.
+/*
+ This software is Copyright (c) 2008
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "PDFAnnotationLink_SKExtensions.h"
+#import "SKUtilities.h"
+
+
[EMAIL PROTECTED] PDFAnnotationLink (SKExtensions)
+
+// override these Leopard methods to avoid showing the standard tool tips over 
our own
+
+static IMP originalToolTip = NULL;
+static IMP originalToolTipNoLabel = NULL;
+
+- (NSString *)replacementToolTip {
+    return ([self URL] || [self destination] || originalToolTip == NULL) ? nil 
: originalToolTip(self, _cmd);
+}
+
+- (NSString *)replacementToolTipNoLabel {
+    return ([self URL] || [self destination] || originalToolTipNoLabel == 
NULL) ? nil : originalToolTipNoLabel(self, _cmd);
+}
+
++ (void)load {
+    if ([self instancesRespondToSelector:@selector(toolTip)])
+        originalToolTip = SKReplaceMethodImplementationWithSelector(self, 
@selector(toolTip), @selector(replacementToolTip));
+    if ([self instancesRespondToSelector:@selector(toolTipNoLabel)])
+        originalToolTipNoLabel = 
SKReplaceMethodImplementationWithSelector(self, @selector(toolTip), 
@selector(replacementToolTipNoLabel));
+}
+
+- (BOOL)isLink { return YES; }
+
+- (NSArray *)accessibilityAttributeNames {
+    static NSArray *attributes = nil;
+    if (attributes == nil) {
+        attributes = [[[super accessibilityAttributeNames] 
arrayByAddingObject:NSAccessibilityURLAttribute] retain];
+    }
+    return attributes;
+}
+
+- (id)accessibilityRoleAttribute {
+    return NSAccessibilityLinkRole;
+}
+
+- (id)accessibilityTitleAttribute {
+    NSString *title = nil;
+    if (originalToolTip != NULL)
+        title = originalToolTip(self, _cmd);
+    if (title == nil)
+        title = [self contents];
+    return title;
+}
+
+- (id)accessibilityURLAttribute {
+    return [self URL];
+}
+
+- (id)accessibilityValueAttribute {
+    return [[[self page] selectionForRect:NSInsetRect([self bounds], -3.0, 
-3.0)] string];
+}
+
+- (id)accessibilityEnabledAttribute {
+    return [NSNumber numberWithBool:YES];
+}
+
+- (NSArray *)accessibilityActionNames {
+    return [NSArray arrayWithObject:NSAccessibilityPressAction];
+}
+
[EMAIL PROTECTED]

Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m  2008-07-08 18:06:48 UTC (rev 4155)
+++ trunk/PDFAnnotation_SKExtensions.m  2008-07-08 18:46:51 UTC (rev 4156)
@@ -484,64 +484,3 @@
 }
 
 @end
-
-#pragma mark -
-
[EMAIL PROTECTED] PDFAnnotationLink (SKExtensions)
[EMAIL PROTECTED]
-
[EMAIL PROTECTED] PDFAnnotationLink (SKExtensions)
-
-// override these Leopard methods to avoid showing the standard tool tips over 
our own
-
-static IMP originalToolTip = NULL;
-
-- (NSString *)replacementToolTip {
-    return ([self URL] || [self destination] || originalToolTip == NULL) ? nil 
: originalToolTip(self, _cmd);
-}
-
-+ (void)load {
-    if ([self instancesRespondToSelector:@selector(toolTip)])
-        originalToolTip = SKReplaceMethodImplementationWithSelector(self, 
@selector(toolTip), @selector(replacementToolTip));
-}
-
-- (BOOL)isLink { return YES; }
-
-- (NSArray *)accessibilityAttributeNames {
-    static NSArray *attributes = nil;
-    if (attributes == nil) {
-        attributes = [[[super accessibilityAttributeNames] 
arrayByAddingObject:NSAccessibilityURLAttribute] retain];
-    }
-    return attributes;
-}
-
-- (id)accessibilityRoleAttribute {
-    return NSAccessibilityLinkRole;
-}
-
-- (id)accessibilityTitleAttribute {
-    NSString *title = nil;
-    if (originalToolTip != NULL)
-        title = originalToolTip(self, _cmd);
-    if (title == nil)
-        title = [self contents];
-    return title;
-}
-
-- (id)accessibilityURLAttribute {
-    return [self URL];
-}
-
-- (id)accessibilityValueAttribute {
-    return [[[self page] selectionForRect:NSInsetRect([self bounds], -3.0, 
-3.0)] string];
-}
-
-- (id)accessibilityEnabledAttribute {
-    return [NSNumber numberWithBool:YES];
-}
-
-- (NSArray *)accessibilityActionNames {
-    return [NSArray arrayWithObject:NSAccessibilityPressAction];
-}
-
[EMAIL PROTECTED]

Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj        2008-07-08 18:06:48 UTC (rev 
4155)
+++ trunk/Skim.xcodeproj/project.pbxproj        2008-07-08 18:46:51 UTC (rev 
4156)
@@ -190,6 +190,7 @@
                CEB735A20C4A8CD6000350F9 /* TransitionShading.tiff in Resources 
*/ = {isa = PBXBuildFile; fileRef = CEB735A10C4A8CD6000350F9 /* 
TransitionShading.tiff */; };
                CEBD52ED0C9C0AE500FBF6A4 /* SKBookmark.m in Sources */ = {isa = 
PBXBuildFile; fileRef = CEBD52EB0C9C0AE500FBF6A4 /* SKBookmark.m */; };
                CEBF85E20CCE2DE70057A050 /* NSAffineTransform_SKExtensions.m in 
Sources */ = {isa = PBXBuildFile; fileRef = CEBF85E00CCE2DE70057A050 /* 
NSAffineTransform_SKExtensions.m */; };
+               CEC3AD240E23EC0300F40B0B /* PDFAnnotationLink_SKExtensions.m in 
Sources */ = {isa = PBXBuildFile; fileRef = CEC3AD230E23EC0300F40B0B /* 
PDFAnnotationLink_SKExtensions.m */; };
                CEC7B39A0CF5F2D2008CCD63 /* AppleRemote.m in Sources */ = {isa 
= PBXBuildFile; fileRef = CEC7B38E0CF5F2D2008CCD63 /* AppleRemote.m */; };
                CEC7B39C0CF5F2D2008CCD63 /* GlobalKeyboardDevice.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = CEC7B3900CF5F2D2008CCD63 /* 
GlobalKeyboardDevice.m */; };
                CEC7B39E0CF5F2D2008CCD63 /* HIDRemoteControlDevice.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = CEC7B3920CF5F2D2008CCD63 /* 
HIDRemoteControlDevice.m */; };
@@ -776,6 +777,8 @@
                CEBD52EB0C9C0AE500FBF6A4 /* SKBookmark.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= SKBookmark.m; sourceTree = "<group>"; };
                CEBF85DF0CCE2DE70057A050 /* NSAffineTransform_SKExtensions.h */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; path = NSAffineTransform_SKExtensions.h; sourceTree = 
"<group>"; };
                CEBF85E00CCE2DE70057A050 /* NSAffineTransform_SKExtensions.m */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = NSAffineTransform_SKExtensions.m; sourceTree = 
"<group>"; };
+               CEC3AD220E23EC0300F40B0B /* PDFAnnotationLink_SKExtensions.h */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; path = PDFAnnotationLink_SKExtensions.h; sourceTree = 
"<group>"; };
+               CEC3AD230E23EC0300F40B0B /* PDFAnnotationLink_SKExtensions.m */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = PDFAnnotationLink_SKExtensions.m; sourceTree = 
"<group>"; };
                CEC4C33C0CA90CA100299397 /* Spanish */ = {isa = 
PBXFileReference; lastKnownFileType = wrapper.nib; name = Spanish; path = 
Spanish.lproj/BookmarkSheet.nib; sourceTree = "<group>"; };
                CEC4C33D0CA90CA100299397 /* Spanish */ = {isa = 
PBXFileReference; lastKnownFileType = wrapper.nib; name = Spanish; path = 
Spanish.lproj/BookmarksWindow.nib; sourceTree = "<group>"; };
                CEC4C33E0CA90CA100299397 /* Spanish */ = {isa = 
PBXFileReference; lastKnownFileType = wrapper.nib; name = Spanish; path = 
Spanish.lproj/ConversionProgressWindow.nib; sourceTree = "<group>"; };
@@ -1565,6 +1568,8 @@
                                CEE54DB30DA2E99D0037169F /* 
PDFAnnotationMarkup_SKExtensions.m */,
                                CE4642E30DF5CBD900CFD8D2 /* 
PDFAnnotationText_SKExtensions.h */,
                                CE4642E40DF5CBD900CFD8D2 /* 
PDFAnnotationText_SKExtensions.m */,
+                               CEC3AD220E23EC0300F40B0B /* 
PDFAnnotationLink_SKExtensions.h */,
+                               CEC3AD230E23EC0300F40B0B /* 
PDFAnnotationLink_SKExtensions.m */,
                                CE3A3D2A0B78C0A0006B64D3 /* 
SKNPDFAnnotationNote_SKExtensions.h */,
                                CE3A3D2B0B78C0A0006B64D3 /* 
SKNPDFAnnotationNote_SKExtensions.m */,
                                CEE54DC60DA2EAE00037169F /* 
PDFBorder_SKExtensions.h */,
@@ -2079,6 +2084,7 @@
                                CE3401E00E01378A00A7FFE6 /* 
NSAttributedString_SKExtensions.m in Sources */,
                                CE3401E60E01388700A7FFE6 /* 
NSNumber_SKExtensions.m in Sources */,
                                CE665A140E1BF43700D0704D /* 
SKBookmarkOutlineView.m in Sources */,
+                               CEC3AD240E23EC0300F40B0B /* 
PDFAnnotationLink_SKExtensions.m in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };


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

Reply via email to