Revision: 7718
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7718&view=rev
Author:   hofman
Date:     2012-09-02 21:32:31 +0000 (Sun, 02 Sep 2012)
Log Message:
-----------
Remove workarounds for 10.5/10.6 cross development incompatibilities

Modified Paths:
--------------
    trunk/Info.plist
    trunk/MainWindow.xib
    trunk/NSData_SKExtensions.h
    trunk/NSData_SKExtensions.m
    trunk/NSEvent_SKExtensions.h
    trunk/NSEvent_SKExtensions.m
    trunk/NSMenu_SKExtensions.h
    trunk/NSMenu_SKExtensions.m
    trunk/NSResponder_SKExtensions.h
    trunk/PDFAnnotationMarkup_SKExtensions.m
    trunk/SKApplication.h
    trunk/SKApplication.m
    trunk/SKCompatibility.h
    trunk/SKDocumentController.m
    trunk/SKFindTableView.h
    trunk/SKFindTableView.m
    trunk/SKMainDocument.m
    trunk/SKMainWindowController.m
    trunk/SKNoteOutlineView.h
    trunk/SKNoteOutlineView.m
    trunk/SKNotesDocument.m
    trunk/SKOutlineView.h
    trunk/SKOutlineView.m
    trunk/SKPDFView.m
    trunk/SKPreferenceController.m
    trunk/SKSideViewController.m
    trunk/SKSplitView.m
    trunk/SKTableView.h
    trunk/SKTableView.m
    trunk/SKThumbnailTableView.h
    trunk/SKThumbnailTableView.m
    trunk/SKTocOutlineView.h
    trunk/SKTocOutlineView.m
    trunk/SKTransitionController.m

Modified: trunk/Info.plist
===================================================================
--- trunk/Info.plist    2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/Info.plist    2012-09-02 21:32:31 UTC (rev 7718)
@@ -495,11 +495,9 @@
                                <string>FDF </string>
                        </array>
                        <key>CFBundleTypeRole</key>
-                       <string>Viewer</string>
+                       <string>None</string>
                        <key>LSTypeIsPackage</key>
                        <false/>
-                       <key>NSDocumentClass</key>
-                       <string>SKNotesDocument</string>
                        <key>NSPersistentStoreTypeKey</key>
                        <string>Binary</string>
                </dict>

Modified: trunk/MainWindow.xib
===================================================================
--- trunk/MainWindow.xib        2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/MainWindow.xib        2012-09-02 21:32:31 UTC (rev 7718)
@@ -87,7 +87,7 @@
                                <string key="NSMaxSize">{1.79769e+308, 
1.79769e+308}</string>
                        </object>
                        <object class="NSSplitView" id="425696215">
-                               <nil key="NSNextResponder"/>
+                               <reference key="NSNextResponder"/>
                                <int key="NSvFlags">274</int>
                                <array class="NSMutableArray" key="NSSubviews">
                                        <object class="NSCustomView" 
id="202565042">
@@ -95,10 +95,14 @@
                                                <int key="NSvFlags">256</int>
                                                <string key="NSFrameSize">{265, 
250}</string>
                                                <reference key="NSSuperview" 
ref="425696215"/>
+                                               <reference key="NSWindow"/>
                                                <string 
key="NSClassName">NSView</string>
                                        </object>
                                </array>
                                <string key="NSFrameSize">{265, 250}</string>
+                               <reference key="NSSuperview"/>
+                               <reference key="NSWindow"/>
+                               <int key="NSDividerStyle">3</int>
                        </object>
                        <object class="NSCustomObject" id="441088418">
                                <string 
key="NSClassName">SKLeftSideViewController</string>

Modified: trunk/NSData_SKExtensions.h
===================================================================
--- trunk/NSData_SKExtensions.h 2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/NSData_SKExtensions.h 2012-09-02 21:32:31 UTC (rev 7718)
@@ -73,15 +73,3 @@
 - (id)scriptingRtfDescriptor;
 
 @end
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
-enum {
-   NSDataSearchBackwards = 1UL << 0,
-   NSDataSearchAnchored = 1UL << 1
-};
-typedef NSUInteger NSDataSearchOptions;
-
-@interface NSData (SKSnowLeopardExtensions)
-- (NSRange)rangeOfData:(NSData *)dataToFind options:(NSDataSearchOptions)mask 
range:(NSRange)searchRange;
-@end
-#endif

Modified: trunk/NSData_SKExtensions.m
===================================================================
--- trunk/NSData_SKExtensions.m 2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/NSData_SKExtensions.m 2012-09-02 21:32:31 UTC (rev 7718)
@@ -50,64 +50,11 @@
 
 #import "NSData_SKExtensions.h"
 #import "NSGeometry_SKExtensions.h"
-#import "SKRuntime.h"
 #import <CommonCrypto/CommonDigest.h>
 
 
 @implementation NSData (SKExtensions)
 
-- (NSRange)Leopard_rangeOfData:(NSData *)dataToFind 
options:(NSDataSearchOptions)mask range:(NSRange)searchRange {
-    NSUInteger patternLength = [dataToFind length];
-    NSUInteger selfLength = [self length];
-    
-    if (searchRange.location > selfLength || NSMaxRange(searchRange) > 
selfLength)
-        [NSException raise:NSRangeException format:@"Range {%lu,%lu} exceeds 
length %lu", (unsigned long)searchRange.location, (unsigned 
long)searchRange.length, (unsigned long)selfLength];
-    
-    // This test is a nice shortcut, but it's also necessary to avoid 
crashing: zero-length NSDatas will sometimes(?) return NULL for their bytes 
pointer, and the resulting pointer arithmetic can underflow.
-    if (patternLength == 0 || patternLength > searchRange.length)
-        return NSMakeRange(NSNotFound, 0);
-    
-    const void *patternBytes = [dataToFind bytes];
-    const unsigned char *selfBufferStart, *selfPtr, *selfPtrEnd, *selfPtrMax;
-    const unsigned char firstPatternByte = *(const char *)patternBytes;
-    BOOL backward = (mask & NSDataSearchBackwards) != 0;
-    BOOL anchored = (mask & NSDataSearchAnchored) != 0;
-    
-    selfBufferStart = [self bytes];
-    selfPtrMax = selfBufferStart + NSMaxRange(searchRange) + 1 - patternLength;
-    if (backward) {
-        selfPtr = selfPtrMax - 1;
-        selfPtrEnd = selfBufferStart + searchRange.location - 1;
-    } else {
-        selfPtr = selfBufferStart + searchRange.location;
-        selfPtrEnd = selfPtrMax;
-    }
-    
-    for (;;) {
-        if (memcmp(selfPtr, patternBytes, patternLength) == 0)
-            return NSMakeRange(selfPtr - selfBufferStart, patternLength);
-        
-        if (anchored)
-            break;
-        
-        if (backward) {
-            do {
-                selfPtr--;
-            } while (*selfPtr != firstPatternByte && selfPtr > selfPtrEnd);
-            if (*selfPtr != firstPatternByte)
-                break;
-        } else {
-            selfPtr++;
-            if (selfPtr == selfPtrEnd)
-                break;
-            selfPtr = memchr(selfPtr, firstPatternByte, (selfPtrMax - 
selfPtr));
-            if (selfPtr == NULL)
-                break;
-        }
-    }
-    return NSMakeRange(NSNotFound, 0);
-}
-
 // Mapping from 4 bit pattern to ASCII character.
 static unsigned char hexEncodeTable[17] = "0123456789ABCDEF";
 
@@ -334,7 +281,7 @@
 
 - (id)scriptingPdfDescriptor {
     return [NSAppleEventDescriptor descriptorWithDescriptorType:'PDF ' 
data:self];
-}
+} 
 
 + (id)scriptingTiffPictureWithDescriptor:(NSAppleEventDescriptor *)descriptor {
     return [descriptor data];
@@ -352,9 +299,4 @@
     return [NSAppleEventDescriptor descriptorWithDescriptorType:'RTF ' 
data:self];
 }
 
-+ (void)load {
-    // this should do nothing on Snow Leopard
-    SKAddInstanceMethodImplementationFromSelector(self, 
@selector(rangeOfData:options:range:), 
@selector(Leopard_rangeOfData:options:range:));
-}
-
 @end

Modified: trunk/NSEvent_SKExtensions.h
===================================================================
--- trunk/NSEvent_SKExtensions.h        2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/NSEvent_SKExtensions.h        2012-09-02 21:32:31 UTC (rev 7718)
@@ -49,8 +49,3 @@
 - (NSPoint)locationInView:(NSView *)view;
 
 @end
-
-@interface NSEvent (SKLeopardGestures)
-- (CGFloat)magnification;
-- (CGFloat)rotation;
-@end

Modified: trunk/NSEvent_SKExtensions.m
===================================================================
--- trunk/NSEvent_SKExtensions.m        2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/NSEvent_SKExtensions.m        2012-09-02 21:32:31 UTC (rev 7718)
@@ -37,35 +37,13 @@
  */
 
 #import "NSEvent_SKExtensions.h"
-#import <Carbon/Carbon.h>
 
 #define SKStandardModifierFlagsMask (NSCommandKeyMask | NSAlternateKeyMask | 
NSShiftKeyMask | NSControlKeyMask)
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
-@interface NSEvent (SKSnowLeopardDeclarations)
-+ (NSUInteger)modifierFlags;
-@end
-#endif
-
-
 @implementation NSEvent (SKExtensions)
 
 + (NSUInteger)standardModifierFlags {
-    if ([self respondsToSelector:@selector(modifierFlags)])
-        return [self modifierFlags] & SKStandardModifierFlagsMask;
-    
-    NSUInteger flags = 0;
-    UInt32 currentKeyModifiers = GetCurrentKeyModifiers();
-    if (currentKeyModifiers & cmdKey)
-        flags |= NSCommandKeyMask;
-    if (currentKeyModifiers & shiftKey)
-        flags |= NSShiftKeyMask;
-    if (currentKeyModifiers & optionKey)
-        flags |= NSAlternateKeyMask;
-    if (currentKeyModifiers & controlKey)
-        flags |= NSControlKeyMask;
-    
-    return flags;
+    return [self modifierFlags] & SKStandardModifierFlagsMask;
 }
 
 - (NSUInteger)deviceIndependentModifierFlags {

Modified: trunk/NSMenu_SKExtensions.h
===================================================================
--- trunk/NSMenu_SKExtensions.h 2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/NSMenu_SKExtensions.h 2012-09-02 21:32:31 UTC (rev 7718)
@@ -57,13 +57,7 @@
 
 @end
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
-@interface NSMenu (SKSnowLeopardExtensions)
-- (void)removeAllItems;
-@end
-#endif
 
-
 @interface NSMenuItem (SKExtensions)
 
 + (NSMenuItem *)menuItemWithTitle:(NSString *)aString action:(SEL)aSelector 
target:(id)aTarget;

Modified: trunk/NSMenu_SKExtensions.m
===================================================================
--- trunk/NSMenu_SKExtensions.m 2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/NSMenu_SKExtensions.m 2012-09-02 21:32:31 UTC (rev 7718)
@@ -37,21 +37,10 @@
  */
 
 #import "NSMenu_SKExtensions.h"
-#import "SKRuntime.h"
 
 
 @implementation NSMenu (SKExtensions)
 
-- (void)Leopard_removeAllItems {
-    NSInteger i = [self numberOfItems];
-    while (i--)
-        [self removeItemAtIndex:i];
-}
-
-+ (void)load {
-    SKAddInstanceMethodImplementationFromSelector(self, 
@selector(removeAllItems), @selector(Leopard_removeAllItems));
-}
-
 + (NSMenu *)menu {
     return [[[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:@""] 
autorelease];
 }

Modified: trunk/NSResponder_SKExtensions.h
===================================================================
--- trunk/NSResponder_SKExtensions.h    2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/NSResponder_SKExtensions.h    2012-09-02 21:32:31 UTC (rev 7718)
@@ -48,14 +48,3 @@
 - (void)magnifyWheel:(NSEvent *)theEvent;
 - (void)remoteButtonPressed:(NSEvent *)theEvent;
 @end
-
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
-@interface NSResponder (SKSnowLeopardExtension)
-- (void)magnifyWithEvent:(NSEvent *)theEvent;
-- (void)rotateWithEvent:(NSEvent *)theEvent;
-- (void)swipeWithEvent:(NSEvent *)theEvent;
-- (void)beginGestureWithEvent:(NSEvent *)theEvent;
-- (void)endGestureWithEvent:(NSEvent *)theEvent;
-@end
-#endif

Modified: trunk/PDFAnnotationMarkup_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationMarkup_SKExtensions.m    2012-09-02 21:06:47 UTC (rev 
7717)
+++ trunk/PDFAnnotationMarkup_SKExtensions.m    2012-09-02 21:32:31 UTC (rev 
7718)
@@ -162,7 +162,7 @@
         self = [self initSkimNoteWithBounds:bounds markupType:type 
quadrilateralPointsAsStrings:nil];
         if (self) {
             PDFPage *page = [selection safeFirstPage];
-            NSInteger rotation = floor(NSAppKitVersionNumber) > 
NSAppKitVersionNumber10_5 ? [page rotation] : 0;
+            NSInteger rotation = [page rotation];
             NSMutableArray *quadPoints = [[NSMutableArray alloc] init];
             NSRect newBounds = NSZeroRect;
             if (selection) {

Modified: trunk/SKApplication.h
===================================================================
--- trunk/SKApplication.h       2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKApplication.h       2012-09-02 21:32:31 UTC (rev 7718)
@@ -50,10 +50,8 @@
 
 - (void)updatePresentationOptionsForWindow:(NSWindow *)aWindow;
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKApplicationDelegate>)delegate;
 - (void)setDelegate:(id <SKApplicationDelegate>)newDelegate;
-#endif
 
 @end
 

Modified: trunk/SKApplication.m
===================================================================
--- trunk/SKApplication.m       2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKApplication.m       2012-09-02 21:32:31 UTC (rev 7718)
@@ -209,9 +209,7 @@
     return [super newScriptingObjectOfClass:objectClass forValueForKey:key 
withContentsValue:contentsValue properties:properties];
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKApplicationDelegate>)delegate { return (id 
<SKApplicationDelegate>)[super delegate]; }
 - (void)setDelegate:(id <SKApplicationDelegate>)newDelegate { [super 
setDelegate:newDelegate]; }
-#endif
 
 @end

Modified: trunk/SKCompatibility.h
===================================================================
--- trunk/SKCompatibility.h     2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKCompatibility.h     2012-09-02 21:32:31 UTC (rev 7718)
@@ -38,44 +38,14 @@
 
 #import <Cocoa/Cocoa.h>
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
-
-@protocol NSApplicationDelegate <NSObject> @end
-@protocol NSControlTextEditingDelegate <NSObject> @end
-@protocol NSTextFieldDelegate <NSControlTextEditingDelegate> @end
-@protocol NSTableViewDelegate <NSControlTextEditingDelegate> @end
-@protocol NSTableViewDataSource <NSObject> @end
-@protocol NSOutlineViewDelegate <NSControlTextEditingDelegate> @end
-@protocol NSOutlineViewDataSource <NSObject> @end
-@protocol NSToolbarDelegate <NSObject> @end
-@protocol NSMenuDelegate <NSObject> @end
-@protocol NSDrawerDelegate <NSObject> @end
-@protocol NSWindowDelegate <NSObject> @end
-@protocol NSAnimationDelegate <NSObject> @end
-@protocol NSTextDelegate <NSObject> @end
-@protocol NSTextViewDelegate <NSTextDelegate> @end
-@protocol NSTextStorageDelegate <NSObject> @end
-@protocol NSTabViewDelegate <NSObject> @end
-@protocol NSSplitViewDelegate <NSObject> @end
-
-#endif
-
-#if !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MAX_ALLOWED <= 
MAC_OS_X_VERSION_10_6
-
-@protocol NSURLDownloadDelegate <NSObject> @end
-
-#endif
-
-#ifndef NSAppKitVersionNumber10_5
-    #define NSAppKitVersionNumber10_5 949
-#endif
-
 #ifndef NSAppKitVersionNumber10_6
     #define NSAppKitVersionNumber10_6 1038
 #endif
 
-#if !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MAX_ALLOWED <= 
MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_6
 
+@protocol NSURLDownloadDelegate <NSObject> @end
+
 enum {
     NSWindowAnimationBehaviorDefault = 0,
     NSWindowAnimationBehaviorNone = 2,

Modified: trunk/SKDocumentController.m
===================================================================
--- trunk/SKDocumentController.m        2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKDocumentController.m        2012-09-02 21:32:31 UTC (rev 7718)
@@ -82,12 +82,10 @@
 
 NSString *SKDocumentControllerDocumentKey = @"document";
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 @interface NSDocumentController (SKDeprecated)
 // we don't want this to be flagged as deprecated, because Apple's replacement 
using UTIs is too buggy, and there's no replacement for this method
 - (NSArray *)fileExtensionsFromType:(NSString *)documentTypeName;
 @end
-#endif
 
 @implementation SKDocumentController
 

Modified: trunk/SKFindTableView.h
===================================================================
--- trunk/SKFindTableView.h     2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKFindTableView.h     2012-09-02 21:32:31 UTC (rev 7718)
@@ -43,10 +43,8 @@
 
 @interface SKFindTableView : SKTableView
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKFindTableViewDelegate>)delegate;
 - (void)setDelegate:(id <SKFindTableViewDelegate>)newDelegate;
-#endif
 
 @end
 

Modified: trunk/SKFindTableView.m
===================================================================
--- trunk/SKFindTableView.m     2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKFindTableView.m     2012-09-02 21:32:31 UTC (rev 7718)
@@ -62,9 +62,7 @@
     }
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKFindTableViewDelegate>)delegate { return (id 
<SKFindTableViewDelegate>)[super delegate]; }
 - (void)setDelegate:(id <SKFindTableViewDelegate>)newDelegate { [super 
setDelegate:newDelegate]; }
-#endif
 
 @end

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKMainDocument.m      2012-09-02 21:32:31 UTC (rev 7718)
@@ -942,7 +942,7 @@
     
     [oPanel beginSheetForDirectory:[path stringByDeletingLastPathComponent]
                               file:[path 
lastPathComponentReplacingPathExtension:@"skim"]
-                             types:[NSArray arrayWithObjects:@"skim", 
NSAppKitVersionNumber > NSAppKitVersionNumber10_5 ? nil : @"fdf", nil]
+                             types:[NSArray arrayWithObjects:@"skim", nil]
                     modalForWindow:[self windowForSheet]
                      modalDelegate:self
                     
didEndSelector:@selector(readNotesPanelDidEnd:returnCode:contextInfo:)

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKMainWindowController.m      2012-09-02 21:32:31 UTC (rev 7718)
@@ -476,8 +476,7 @@
     [menu addItem:[NSMenuItem separatorItem]];
     [[menu addItemWithTitle:NSLocalizedString(@"Note Type", @"Menu item 
title") action:NULL keyEquivalent:@""] setSubmenu:[noteTypeSheetController 
noteTypeMenu]];
     
-    if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5)
-        [rightSideController.noteOutlineView setIndentationPerLevel:1.0];
+    [rightSideController.noteOutlineView setIndentationPerLevel:1.0];
     
     [rightSideController.noteOutlineView registerForDraggedTypes:[NSArray 
arrayWithObjects:NSColorPboardType, nil]];
     

Modified: trunk/SKNoteOutlineView.h
===================================================================
--- trunk/SKNoteOutlineView.h   2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKNoteOutlineView.h   2012-09-02 21:32:31 UTC (rev 7718)
@@ -45,10 +45,8 @@
 
 - (void)toggleTableColumn:(id)sender;
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKNoteOutlineViewDelegate>)delegate;
 - (void)setDelegate:(id <SKNoteOutlineViewDelegate>)newDelegate;
-#endif
 
 @end
 

Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m   2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKNoteOutlineView.m   2012-09-02 21:32:31 UTC (rev 7718)
@@ -227,9 +227,7 @@
 
 #pragma mark Delegate
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKNoteOutlineViewDelegate>)delegate { return (id 
<SKNoteOutlineViewDelegate>)[super delegate]; }
 - (void)setDelegate:(id <SKNoteOutlineViewDelegate>)newDelegate { [super 
setDelegate:newDelegate]; }
-#endif
 
 @end

Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m     2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKNotesDocument.m     2012-09-02 21:32:31 UTC (rev 7718)
@@ -180,8 +180,7 @@
     [[searchField cell] setPlaceholderString:NSLocalizedString(@"Search", 
@"placeholder")];
     
     [outlineView setAutoresizesOutlineColumn: NO];
-    if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5)
-        [outlineView setIndentationPerLevel:1.0];
+    [outlineView setIndentationPerLevel:1.0];
     
     NSSortDescriptor *indexSortDescriptor = [[[NSSortDescriptor alloc] 
initWithKey:SKNPDFAnnotationPageIndexKey ascending:YES] autorelease];
     NSSortDescriptor *stringSortDescriptor = [[[NSSortDescriptor alloc] 
initWithKey:SKNPDFAnnotationStringKey ascending:YES 
selector:@selector(localizedCaseInsensitiveNumericCompare:)] autorelease];
@@ -292,15 +291,6 @@
     return data;
 }
 
-+ (NSArray *)readableTypes {
-    NSArray *types = [super readableTypes];
-    if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_5)
-        return types;
-    NSMutableArray *mutableTypes = [[types mutableCopy] autorelease];
-    [mutableTypes removeObject:SKNotesFDFDocumentType];
-    return mutableTypes;
-}
-
 - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError 
**)outError {
     BOOL didRead = NO;
     NSArray *array = nil;

Modified: trunk/SKOutlineView.h
===================================================================
--- trunk/SKOutlineView.h       2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKOutlineView.h       2012-09-02 21:32:31 UTC (rev 7718)
@@ -56,12 +56,10 @@
 - (void)scrollToBeginningOfDocument:(id)sender;
 - (void)scrollToEndOfDocument:(id)sender;
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKOutlineViewDelegate>)delegate;
 - (void)setDelegate:(id <SKOutlineViewDelegate>)newDelegate;
 - (id <SKOutlineViewDataSource>)dataSource;
 - (void)setDataSource:(id <SKOutlineViewDataSource>)newDataSource;
-#endif
 
 @end
 

Modified: trunk/SKOutlineView.m
===================================================================
--- trunk/SKOutlineView.m       2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKOutlineView.m       2012-09-02 21:32:31 UTC (rev 7718)
@@ -250,11 +250,9 @@
         [[self delegate] outlineView:self typeSelectHelper:aTypeSelectHelper 
updateSearchString:searchString];
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKOutlineViewDelegate>)delegate { return (id 
<SKOutlineViewDelegate>)[super delegate]; }
 - (void)setDelegate:(id <SKOutlineViewDelegate>)newDelegate { [super 
setDelegate:newDelegate]; }
 - (id <SKOutlineViewDataSource>)dataSource { return (id 
<SKOutlineViewDataSource>)[super dataSource]; }
 - (void)setDataSource:(id <SKOutlineViewDataSource>)newDataSource { [super 
setDataSource:newDataSource]; }
-#endif
 
 @end

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKPDFView.m   2012-09-02 21:32:31 UTC (rev 7718)
@@ -1168,11 +1168,7 @@
             } else if (area == kPDFPageArea && modifiers == 0 && [[page 
selectionForRect:NSMakeRect(p.x - 40.0, p.y - 50.0, 80.0, 100.0)] 
hasCharacters] == NO) {
                 [self doDragWithEvent:theEvent];
             } else {
-                // before 10.6 PDFView did not select behind an annotation
-                if (hitAnnotation && floor(NSAppKitVersionNumber) <= 
NSAppKitVersionNumber10_5)
-                    [self doSelectTextWithEvent:theEvent];
-                else // [super mouseDown:] since 10.5 runs a mouse-tracking 
loop, 
-                    [super mouseDown:theEvent];
+                [super mouseDown:theEvent];
                 if (toolMode == SKNoteToolMode && hideNotes == NO && 
ANNOTATION_MODE_IS_MARKUP && [[self currentSelection] hasCharacters]) {
                     [self addAnnotationWithType:annotationMode];
                     [self setCurrentSelection:nil];
@@ -3333,7 +3329,7 @@
     if (([theEvent modifierFlags] & (NSShiftKeyMask | NSAlphaShiftKeyMask)) && 
[[activeAnnotation type] isEqualToString:SKNInkString] && [[activeAnnotation 
page] isEqual:page]) {
         pathColor = [[activeAnnotation color] retain];
         [bezierPath setLineWidth:[activeAnnotation lineWidth]];
-        if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5 && 
[activeAnnotation borderStyle] == kPDFBorderStyleDashed) {
+        if ([activeAnnotation borderStyle] == kPDFBorderStyleDashed) {
             [bezierPath setDashPattern:[activeAnnotation dashPattern]];
             [bezierPath setLineCapStyle:NSButtLineCapStyle];
         }
@@ -3342,7 +3338,7 @@
         NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
         pathColor = [[sud colorForKey:SKInkNoteColorKey] retain];
         [bezierPath setLineWidth:[sud floatForKey:SKInkNoteLineWidthKey]];
-        if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5 && 
(PDFBorderStyle)[sud integerForKey:SKInkNoteLineStyleKey] == 
kPDFBorderStyleDashed) {
+        if ((PDFBorderStyle)[sud integerForKey:SKInkNoteLineStyleKey] == 
kPDFBorderStyleDashed) {
             [bezierPath setDashPattern:[sud 
arrayForKey:SKInkNoteDashPatternKey]];
             [bezierPath setLineCapStyle:NSButtLineCapStyle];
         }

Modified: trunk/SKPreferenceController.m
===================================================================
--- trunk/SKPreferenceController.m      2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKPreferenceController.m      2012-09-02 21:32:31 UTC (rev 7718)
@@ -133,19 +133,9 @@
         if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisableAnimationsKey]) {
             [contentView replaceSubview:oldView with:view];
             [[self window] setFrame:frame display:YES];
-        } else if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_5) {
+        } else {
             [contentView replaceSubview:oldView with:view];
             [[self window] setFrame:frame display:YES animate:YES];
-        } else {
-            NSTimeInterval duration = [[self window] 
animationResizeTime:frame];
-            [contentView setWantsLayer:YES];
-            [contentView displayIfNeeded];
-            [NSAnimationContext beginGrouping];
-            [[NSAnimationContext currentContext] setDuration:duration];
-            [[contentView animator] replaceSubview:oldView with:view];
-            [[[self window] animator] setFrame:frame display:YES];
-            [NSAnimationContext endGrouping];
-            [self performSelector:@selector(endAnimation) withObject:nil 
afterDelay:duration];
         }
     }
 }

Modified: trunk/SKSideViewController.m
===================================================================
--- trunk/SKSideViewController.m        2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKSideViewController.m        2012-09-02 21:32:31 UTC (rev 7718)
@@ -124,7 +124,7 @@
             [[oldButton superview] replaceSubview:oldButton with:newButton];
         [[firstResponder window] makeFirstResponder:firstResponder];
         [[contentView window] recalculateKeyViewLoop];
-    } else if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5) {
+    } else {
         isAnimating = YES;
         
         [contentView setWantsLayer:YES];
@@ -148,47 +148,6 @@
         [info setValue:firstResponder forKey:FIRSTRESPONDER_KEY];
         
         [self performSelector:@selector(finishTableAnimation:) withObject:info 
afterDelay:0.7];
-    } else {
-        [newView setHidden:YES];
-        [[oldView superview] addSubview:newView];
-        if (changeButton) {
-            [newButton setHidden:YES];
-            [[oldButton superview] addSubview:newButton];
-        }
-        
-        NSArray *viewAnimations = [NSArray arrayWithObjects:
-            [NSDictionary dictionaryWithObjectsAndKeys:oldView, 
NSViewAnimationTargetKey, NSViewAnimationFadeOutEffect, 
NSViewAnimationEffectKey, nil],
-            [NSDictionary dictionaryWithObjectsAndKeys:newView, 
NSViewAnimationTargetKey, NSViewAnimationFadeInEffect, 
NSViewAnimationEffectKey, nil], nil];
-        
-        NSViewAnimation *animation = [[[NSViewAnimation alloc] 
initWithViewAnimations:viewAnimations] autorelease];
-        [animation setAnimationBlockingMode:NSAnimationBlocking];
-        [animation setDuration:0.7];
-        [animation setAnimationCurve:NSAnimationEaseIn];
-        isAnimating = YES;
-        [animation startAnimation];
-        isAnimating = NO;
-        
-        if (changeButton) {
-            viewAnimations = [NSArray arrayWithObjects:
-                [NSDictionary dictionaryWithObjectsAndKeys:oldButton, 
NSViewAnimationTargetKey, NSViewAnimationFadeOutEffect, 
NSViewAnimationEffectKey, nil],
-                [NSDictionary dictionaryWithObjectsAndKeys:newButton, 
NSViewAnimationTargetKey, NSViewAnimationFadeInEffect, 
NSViewAnimationEffectKey, nil], nil];
-            
-            animation = [[[NSViewAnimation alloc] 
initWithViewAnimations:viewAnimations] autorelease];
-            [animation setAnimationBlockingMode:NSAnimationBlocking];
-            [animation setDuration:0.3];
-            [animation setAnimationCurve:NSAnimationEaseIn];
-            [animation startAnimation];
-        }
-        
-        [[firstResponder window] makeFirstResponder:firstResponder];
-        [oldView removeFromSuperview];
-        [oldView setHidden:NO];
-        [[newView window] recalculateKeyViewLoop];
-        
-        if (changeButton) {
-            [oldButton removeFromSuperview];
-            [oldButton setHidden:NO];
-        }
     }
 }
 

Modified: trunk/SKSplitView.m
===================================================================
--- trunk/SKSplitView.m 2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKSplitView.m 2012-09-02 21:32:31 UTC (rev 7718)
@@ -44,44 +44,6 @@
 
 @implementation SKSplitView
 
-- (id)initWithCoder:(NSCoder *)coder{
-    self = [super initWithCoder:coder];
-    if (self) {
-        if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5 && [self 
dividerStyle] == NSSplitViewDividerStyleThick)
-            [self setDividerStyle:3]; // NSSplitViewDividerStylePaneSplitter
-    }
-    return self;
-}
-
-- (void)drawDividerInRect:(NSRect)aRect {
-       if ([self dividerStyle] == NSSplitViewDividerStyleThick) {
-        NSRect topRect, bottomRect, innerRect;
-        NSDivideRect(aRect, &topRect, &innerRect, 1.0, NSMaxYEdge);
-        NSDivideRect(innerRect, &bottomRect, &innerRect, 1.0, NSMinYEdge);
-        
-        [NSGraphicsContext saveGraphicsState];
-        NSGradient *gradient = [[[NSGradient alloc] 
initWithStartingColor:[NSColor colorWithDeviceWhite:0.98 alpha:1.0] 
endingColor:[NSColor colorWithDeviceWhite:0.91 alpha:1.0]] autorelease];
-        [gradient drawInRect:innerRect angle:90.0];
-        [[NSColor colorWithDeviceWhite:0.69 alpha:1.0] setFill];
-        NSRectFill(topRect);
-        NSRectFill(bottomRect);
-        [NSGraphicsContext restoreGraphicsState];
-    }
-    [super drawDividerInRect:aRect];
-}
-
-- (CGFloat)dividerThickness {
-       if ([self dividerStyle] == NSSplitViewDividerStyleThick)
-        return 10.0;
-    return [super dividerThickness];
-}
-
-- (void)adjustSubviews {
-    [super adjustSubviews];
-    if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_5)
-        [self resetCursorRects];
-}
-
 - (BOOL)isAnimating {
     return animating;
 }

Modified: trunk/SKTableView.h
===================================================================
--- trunk/SKTableView.h 2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKTableView.h 2012-09-02 21:32:31 UTC (rev 7718)
@@ -57,10 +57,8 @@
 - (void)scrollToBeginningOfDocument:(id)sender;
 - (void)scrollToEndOfDocument:(id)sender;
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKTableViewDelegate>)delegate;
 - (void)setDelegate:(id <SKTableViewDelegate>)newDelegate;
-#endif
 
 @end
 

Modified: trunk/SKTableView.m
===================================================================
--- trunk/SKTableView.m 2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKTableView.m 2012-09-02 21:32:31 UTC (rev 7718)
@@ -309,7 +309,6 @@
         [[self delegate] tableView:self typeSelectHelper:aTypeSelectHelper 
updateSearchString:searchString];
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKTableViewDelegate>)delegate {
     return (id <SKTableViewDelegate>)[super delegate];
 }
@@ -318,11 +317,5 @@
     [super setDelegate:newDelegate];
        [self rebuildTrackingAreas];
 }
-#else
-- (void)setDelegate:(id)newDelegate {
-    [super setDelegate:newDelegate];
-       [self rebuildTrackingAreas];
-}
-#endif
 
 @end

Modified: trunk/SKThumbnailTableView.h
===================================================================
--- trunk/SKThumbnailTableView.h        2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKThumbnailTableView.h        2012-09-02 21:32:31 UTC (rev 7718)
@@ -48,10 +48,8 @@
 
 @property (nonatomic, readonly) BOOL isScrolling;
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKThumbnailTableViewDelegate>)delegate;
 - (void)setDelegate:(id <SKThumbnailTableViewDelegate>)newDelegate;
-#endif
 
 @end
 

Modified: trunk/SKThumbnailTableView.m
===================================================================
--- trunk/SKThumbnailTableView.m        2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKThumbnailTableView.m        2012-09-02 21:32:31 UTC (rev 7718)
@@ -172,10 +172,8 @@
        return [super dragImageForRowsWithIndexes:dragRows tableColumns:[[self 
tableColumns] subarrayWithRange:NSMakeRange(0, 1)] event:dragEvent 
offset:dragImageOffset];
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKThumbnailTableViewDelegate>)delegate { return (id 
<SKThumbnailTableViewDelegate>)[super delegate]; }
 - (void)setDelegate:(id <SKThumbnailTableViewDelegate>)newDelegate { [super 
setDelegate:newDelegate]; }
-#endif
 
 @end
 

Modified: trunk/SKTocOutlineView.h
===================================================================
--- trunk/SKTocOutlineView.h    2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKTocOutlineView.h    2012-09-02 21:32:31 UTC (rev 7718)
@@ -46,10 +46,8 @@
 @interface SKTocOutlineView : SKOutlineView {
     NSMutableSet *trackingAreas;
 }
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKTocOutlineViewDelegate>)delegate;
 - (void)setDelegate:(id <SKTocOutlineViewDelegate>)newDelegate;
-#endif
 @end
 
 

Modified: trunk/SKTocOutlineView.m
===================================================================
--- trunk/SKTocOutlineView.m    2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKTocOutlineView.m    2012-09-02 21:32:31 UTC (rev 7718)
@@ -225,7 +225,6 @@
         [super keyDown:theEvent];
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKTocOutlineViewDelegate>)delegate {
     return (id <SKTocOutlineViewDelegate>)[super delegate];
 }
@@ -234,11 +233,5 @@
     [super setDelegate:newDelegate];
        [self rebuildTrackingAreas];
 }
-#else
-- (void)setDelegate:(id)newDelegate {
-    [super setDelegate:newDelegate];
-       [self rebuildTrackingAreas];
-}
-#endif
 
 @end

Modified: trunk/SKTransitionController.m
===================================================================
--- trunk/SKTransitionController.m      2012-09-02 21:06:47 UTC (rev 7717)
+++ trunk/SKTransitionController.m      2012-09-02 21:32:31 UTC (rev 7718)
@@ -127,10 +127,8 @@
 }
 @property (nonatomic, readonly) CIImage *currentImage;
 - (id)initWithFilter:(CIFilter *)aFilter duration:(NSTimeInterval)duration;
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKTransitionAnimationDelegate>)delegate;
 - (void)setDelegate:(id <SKTransitionAnimationDelegate>)newDelegate;
-#endif
 @end
 
 @protocol SKTransitionAnimationDelegate <NSAnimationDelegate>
@@ -545,10 +543,8 @@
     return [filter valueForKey:kCIOutputImageKey];
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
 - (id <SKTransitionAnimationDelegate>)delegate { return (id 
<SKTransitionAnimationDelegate>)[super delegate]; }
 - (void)setDelegate:(id <SKTransitionAnimationDelegate>)newDelegate { [super 
setDelegate:newDelegate]; }
-#endif
 
 @end
 

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


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to