Revision: 5726
http://skim-app.svn.sourceforge.net/skim-app/?rev=5726&view=rev
Author: hofman
Date: 2009-09-09 12:44:19 +0000 (Wed, 09 Sep 2009)
Log Message:
-----------
Declare empty delegate/datasource formal protocols for 10.5 SDK and declare
protocols in interface for the classes that use them. Also define formal
protocols for our own defined delegate and datasource extensions. This way we
can compile using the 10.6 SDK with a lot less warnings.
Modified Paths:
--------------
trunk/BDSKDragImageView.h
trunk/SKApplication.h
trunk/SKApplication.m
trunk/SKApplicationController.h
trunk/SKBookmarkController.h
trunk/SKBookmarkOutlineView.h
trunk/SKBookmarkOutlineView.m
trunk/SKDownloadController.h
trunk/SKFindController.h
trunk/SKFullScreenWindow.h
trunk/SKMainDocument.h
trunk/SKMainDocument.m
trunk/SKMainWindowController.h
trunk/SKNPDFAnnotationNote_SKExtensions.h
trunk/SKNoteOutlineView.h
trunk/SKNoteOutlineView.m
trunk/SKNoteWindowController.h
trunk/SKNotesDocument.h
trunk/SKNotesPanelController.h
trunk/SKOutlineView.h
trunk/SKOutlineView.m
trunk/SKPDFSynchronizer.h
trunk/SKPDFView.h
trunk/SKPDFView.m
trunk/SKPreferenceController.h
trunk/SKPresentationOptionsSheetController.h
trunk/SKSnapshotWindowController.h
trunk/SKSnapshotWindowController.m
trunk/SKSplitView.h
trunk/SKSplitView.m
trunk/SKTableView.h
trunk/SKTableView.m
trunk/SKThumbnailTableView.h
trunk/SKThumbnailTableView.m
trunk/SKTocOutlineView.h
trunk/SKTocOutlineView.m
trunk/SKToolbarItem.m
trunk/SKTransitionController.m
trunk/SKTypeSelectHelper.h
trunk/Skim.xcodeproj/project.pbxproj
trunk/Skim_Prefix.pch
Added Paths:
-----------
trunk/SKCompatibility.h
Modified: trunk/BDSKDragImageView.h
===================================================================
--- trunk/BDSKDragImageView.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/BDSKDragImageView.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -38,7 +38,23 @@
#import <Cocoa/Cocoa.h>
+...@class BDSKDragImageView;
+...@protocol BDSKDragImageViewDelegate <NSObject>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
+...@end
+...@interface NSObject (BDSKDragImageViewDelegate)
+#else
+...@optional
+#endif
+
+- (BOOL)dragImageView:(BDSKDragImageView *)view
writeDataToPasteboard:(NSPasteboard *)pasteboard;
+- (NSArray *)dragImageView:(BDSKDragImageView *)view
namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination;
+- (NSImage *)dragImageForDragImageView:(BDSKDragImageView *)view;
+
+...@end
+
+
@interface BDSKDragImageView : NSImageView {
id delegate;
}
@@ -49,9 +65,3 @@
- (IBAction)show:(id)sender;
@end
-
-...@interface NSObject (BDSKDragImageViewDelegate)
-- (BOOL)dragImageView:(BDSKDragImageView *)view
writeDataToPasteboard:(NSPasteboard *)pasteboard;
-- (NSArray *)dragImageView:(BDSKDragImageView *)view
namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination;
-- (NSImage *)dragImageForDragImageView:(BDSKDragImageView *)view;
-...@end
Modified: trunk/SKApplication.h
===================================================================
--- trunk/SKApplication.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKApplication.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -40,6 +40,17 @@
extern NSString *SKApplicationStartsTerminatingNotification;
+...@protocol SKApplicationDelegate <NSApplicationDelegate>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
+...@end
+...@interface NSObject (SKApplicationDelegate)
+#else
+...@optional
+#endif
+- (void)applicationStartsTerminating:(NSNotification *)aNotification;
+...@end
+
+
@interface SKApplication : NSApplication {
BOOL userAttentionDisabled;
}
@@ -49,11 +60,9 @@
- (NSArray *)allOrderedDocuments;
-...@end
+- (id)delegate;
+- (void)setDelegate:(id)newDelegate;
-
-...@interface NSObject (SKApplicationDelegate)
-- (void)applicationStartsTerminating:(NSNotification *)aNotification;
@end
Modified: trunk/SKApplication.m
===================================================================
--- trunk/SKApplication.m 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKApplication.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -245,4 +245,12 @@
return orderedDocuments;
}
+- (id)delegate {
+ return (id)[super delegate];
+}
+
+- (void)setDelegate:(id)newDelegate {
+ [super setDelegate:newDelegate];
+}
+
@end
Modified: trunk/SKApplicationController.h
===================================================================
--- trunk/SKApplicationController.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKApplicationController.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -37,12 +37,13 @@
*/
#import <Cocoa/Cocoa.h>
+#import "SKApplication.h"
@class SUUpdater, SKLine, SKDownloadController;
@class RemoteControlContainer;
-...@interface SKApplicationController : NSObject {
+...@interface SKApplicationController : NSObject <SKApplicationDelegate,
NSMenuDelegate> {
RemoteControlContainer *remoteControl;
BOOL remoteScrolling;
}
Modified: trunk/SKBookmarkController.h
===================================================================
--- trunk/SKBookmarkController.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKBookmarkController.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -40,7 +40,7 @@
@class SKBookmark, SKBookmarkOutlineView, SKStatusBar;
-...@interface SKBookmarkController : NSWindowController {
+...@interface SKBookmarkController : NSWindowController <NSWindowDelegate,
NSToolbarDelegate, NSOutlineViewDelegate, NSOutlineViewDataSource> {
IBOutlet SKBookmarkOutlineView *outlineView;
IBOutlet SKStatusBar *statusBar;
SKBookmark *bookmarkRoot;
Modified: trunk/SKBookmarkOutlineView.h
===================================================================
--- trunk/SKBookmarkOutlineView.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKBookmarkOutlineView.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -40,10 +40,24 @@
#import "SKOutlineView.h"
-...@interface SKBookmarkOutlineView : SKOutlineView
+...@protocol SKBookmarkOutlineViewDelegate <SKOutlineViewDelegate>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
@end
+...@interface NSObject (SKBookmarkOutlineViewDelegate)
+#else
+...@optional
+#endif
+- (BOOL)outlineView:(NSOutlineView *)anOutlineView
drawSeparatorRowForItem:(id)item;
-...@interface NSObject (SKBookmarkOutlineViewDelegate)
-- (BOOL)outlineView:(NSOutlineView *)anOutlineView
drawSeparatorRowForItem:(id)item;
@end
+
+
+...@interface SKBookmarkOutlineView : SKOutlineView
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+- (id <SKBookmarkOutlineViewDelegate>)delegate;
+- (void)setDelegate:(id <SKBookmarkOutlineViewDelegate>)newDelegate;
+#endif
+
+...@end
Modified: trunk/SKBookmarkOutlineView.m
===================================================================
--- trunk/SKBookmarkOutlineView.m 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKBookmarkOutlineView.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -59,4 +59,15 @@
}
}
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+- (id <SKBookmarkOutlineViewDelegate>)delegate {
+ return (id <SKBookmarkOutlineViewDelegate>)[super delegate];
+}
+
+- (void)setDelegate:(id <SKBookmarkOutlineViewDelegate>)newDelegate {
+ [super setDelegate:newDelegate];
+}
+#endif
+
@end
Added: trunk/SKCompatibility.h
===================================================================
--- trunk/SKCompatibility.h (rev 0)
+++ trunk/SKCompatibility.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -0,0 +1,65 @@
+//
+// SKCompatibility.h
+// Skim
+//
+// Created by Christiaan on 9/9/09.
+/*
+ This software is Copyright (c) 2009
+ 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>
+
+#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
+
+#ifndef NSAppKitVersionNumber10_5
+ #define NSAppKitVersionNumber10_5 949
+#endif
Modified: trunk/SKDownloadController.h
===================================================================
--- trunk/SKDownloadController.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKDownloadController.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -37,10 +37,12 @@
*/
#import <Cocoa/Cocoa.h>
+#import "SKTableView.h"
+
@class SKTableView, SKDownload;
-...@interface SKDownloadController : NSWindowController {
+...@interface SKDownloadController : NSWindowController <SKTableViewDelegate,
NSTableViewDataSource> {
IBOutlet NSArrayController *arrayController;
IBOutlet SKTableView *tableView;
IBOutlet NSButton *clearButton;
Modified: trunk/SKFindController.h
===================================================================
--- trunk/SKFindController.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKFindController.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -40,7 +40,7 @@
@class BDSKFindFieldEditor;
-...@interface SKFindController : NSWindowController {
+...@interface SKFindController : NSWindowController <NSWindowDelegate> {
IBOutlet NSTextField *findField;
IBOutlet NSButton *ignoreCaseCheckbox;
IBOutlet NSObjectController *ownerController;
Modified: trunk/SKFullScreenWindow.h
===================================================================
--- trunk/SKFullScreenWindow.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKFullScreenWindow.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -40,7 +40,7 @@
#import "SKMainWindow.h"
-...@interface SKFullScreenWindow : SKMainWindow {
+...@interface SKFullScreenWindow : SKMainWindow <NSAnimationDelegate> {
NSViewAnimation *animation;
}
Modified: trunk/SKMainDocument.h
===================================================================
--- trunk/SKMainDocument.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKMainDocument.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -37,6 +37,7 @@
*/
#import <Cocoa/Cocoa.h>
+#import "SKPDFSynchronizer.h"
extern NSString *SKSkimFileDidSaveNotification;
@@ -57,9 +58,9 @@
extern NSDictionary
*SKPDFViewSettingsFromScriptingPDFViewSettings(NSDictionary *settings);
-...@class PDFDocument, SKMainWindowController, SKPDFView, SKPDFSynchronizer,
SKLine, SKProgressController, SKTemporaryData;
+...@class PDFDocument, SKMainWindowController, SKPDFView, SKLine,
SKProgressController, SKTemporaryData;
-...@interface SKMainDocument : NSDocument
+...@interface SKMainDocument : NSDocument <SKPDFSynchronizerDelegate>
{
IBOutlet NSView *readNotesAccessoryView;
IBOutlet NSButton *replaceNotesCheckButton;
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKMainDocument.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -385,7 +385,7 @@
if (NO == [[NSFileManager defaultManager] writeSkimNotes:[[self
notes] valueForKey:@"SkimNoteProperties"] textNotes:[self notesString]
richTextNotes:[self notesRTFData] toExtendedAttributesAtURL:absoluteURL
error:NULL]) {
NSString *message = saveNotesOK ? NSLocalizedString(@"The
notes could not be saved with the PDF at \"%...@\". However a companion .skim
file was successfully updated.", @"Informative text in alert dialog") :
NSLocalizedString(@"The
notes could not be saved with the PDF at \"%...@\"", @"Informative text in
alert dialog");
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString
stringWithFormat:NSLocalizedString(@"Unable to save notes", @"Message in alert
dialog")]
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString
stringWithFormat:NSLocalizedString(@"Unable to save notes", @"Message in alert
dialog"), nil]
defaultButton:NSLocalizedString(@"OK", @"Button title")
alternateButton:nil
otherButton:nil
@@ -1766,7 +1766,7 @@
const char *serviceName = [self keychainServiceName];
if (serviceName != NULL) {
if (saveOption == NSAlertOtherReturn) {
- NSAlert *alert = [NSAlert alertWithMessageText:[NSString
stringWithFormat:NSLocalizedString(@"Remember Password?", @"Message in alert
dialog")]
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString
stringWithFormat:NSLocalizedString(@"Remember Password?", @"Message in alert
dialog"), nil]
defaultButton:NSLocalizedString(@"Yes", @"Button title")
alternateButton:NSLocalizedString(@"No", @"Button title")
otherButton:nil
Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKMainWindowController.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -38,6 +38,11 @@
#import <Cocoa/Cocoa.h>
#import <IOKit/pwr_mgt/IOPMLib.h>
+#import "SKSplitView.h"
+#import "SKThumbnailTableView.h"
+#import "SKTocOutlineView.h"
+#import "SKNoteOutlineView.h"
+#import "SKSnapshotWindowController.h"
enum {
SKThumbnailSidePaneState,
@@ -66,10 +71,10 @@
extern NSString *SKUnarchiveFromDataArrayTransformerName;
@class PDFAnnotation, PDFSelection, SKThumbnail, SKGroupedSearchResult;
-...@class SKPDFView, SKSecondaryPDFView, SKTocOutlineView, SKNoteOutlineView,
SKThumbnailTableView, SKSplitView, BDSKCollapsibleView, BDSKEdgeView,
BDSKGradientView, SKColorSwatch, SKStatusBar;
-...@class SKMainDocument, SKFullScreenWindow, SKNavigationWindow,
SKSideWindow, SKSnapshotWindowController, SKProgressController,
SKPageSheetController, SKScaleSheetController, SKPasswordSheetController,
SKBookmarkSheetController, SKPresentationOptionsSheetController;
+...@class SKPDFView, SKSecondaryPDFView, BDSKCollapsibleView, BDSKEdgeView,
BDSKGradientView, SKColorSwatch, SKStatusBar;
+...@class SKMainDocument, SKFullScreenWindow, SKNavigationWindow,
SKSideWindow, SKProgressController, SKPageSheetController,
SKScaleSheetController, SKPasswordSheetController, SKBookmarkSheetController,
SKPresentationOptionsSheetController;
-...@interface SKMainWindowController : NSWindowController {
+...@interface SKMainWindowController : NSWindowController <NSWindowDelegate,
NSToolbarDelegate, NSDrawerDelegate, SKThumbnailTableViewDelegate,
NSTableViewDataSource, SKTocOutlineViewDelegate, SKNoteOutlineViewDelegate,
SKOutlineViewDataSource, SKSplitViewDelegate,
SKSnapshotWindowControllerDelegate> {
IBOutlet SKSplitView *splitView;
IBOutlet NSView *pdfContentView;
Modified: trunk/SKNPDFAnnotationNote_SKExtensions.h
===================================================================
--- trunk/SKNPDFAnnotationNote_SKExtensions.h 2009-09-09 10:11:53 UTC (rev
5725)
+++ trunk/SKNPDFAnnotationNote_SKExtensions.h 2009-09-09 12:44:19 UTC (rev
5726)
@@ -52,7 +52,7 @@
#pragma mark -
-...@interface SKNPDFAnnotationNote (SKExtensions)
+...@interface SKNPDFAnnotationNote (SKExtensions) <NSTextStorageDelegate>
+ (NSDictionary *)textToNoteSkimNoteProperties:(NSDictionary *)properties;
- (void)setRichText:(id)newText;
@end
Modified: trunk/SKNoteOutlineView.h
===================================================================
--- trunk/SKNoteOutlineView.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKNoteOutlineView.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -40,6 +40,23 @@
#import "SKOutlineView.h";
+...@protocol SKNoteOutlineViewDelegate <SKOutlineViewDelegate>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
+...@end
+...@interface NSObject (SKNoteOutlineViewDelegate)
+#else
+...@optional
+#endif
+
+- (BOOL)outlineView:(NSOutlineView *)anOutlineView canResizeRowByItem:(id)item;
+- (void)outlineView:(NSOutlineView *)anOutlineView
setHeightOfRow:(CGFloat)newHeight byItem:(id)item;
+- (void)outlineViewNoteTypesDidChange:(NSOutlineView *)anOutlineView;
+- (void)outlineViewCommandKeyPressedDuringNavigation:(NSOutlineView
*)anOutlineView;
+- (void)outlineViewInsertNewline:(NSOutlineView *)anOutlineView;
+
+...@end
+
+
@interface SKNoteOutlineView : SKOutlineView {
IBOutlet NSWindow *noteTypeSheet;
IBOutlet NSMatrix *noteTypeMatrix;
@@ -56,13 +73,9 @@
- (IBAction)selectNoteTypes:(id)sender;
- (IBAction)dismissNoteTypeSheet:(id)sender;
-...@end
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+- (id <SKNoteOutlineViewDelegate>)delegate;
+- (void)setDelegate:(id <SKNoteOutlineViewDelegate>)newDelegate;
+#endif
-
-...@interface NSObject (SKNoteOutlineViewDelegate)
-- (BOOL)outlineView:(NSOutlineView *)anOutlineView canResizeRowByItem:(id)item;
-- (void)outlineView:(NSOutlineView *)anOutlineView
setHeightOfRow:(CGFloat)newHeight byItem:(id)item;
-- (void)outlineViewNoteTypesDidChange:(NSOutlineView *)anOutlineView;
-- (void)outlineViewCommandKeyPressedDuringNavigation:(NSOutlineView
*)anOutlineView;
-- (void)outlineViewInsertNewline:(NSOutlineView *)anOutlineView;
@end
Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKNoteOutlineView.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -346,7 +346,7 @@
[[noteTypeMatrix cellWithTag:i] setState:[[menu itemAtIndex:i] state]];
[NSApp beginSheet:noteTypeSheet
- modalForWindow:[[self delegate] respondsToSelector:@selector(window)] ?
[[self delegate] window] : [self window]
+ modalForWindow:[[self delegate] respondsToSelector:@selector(window)] ?
[(id)[self delegate] window] : [self window]
modalDelegate:self
didEndSelector:@selector(noteTypeSheetDidEnd:returnCode:contextInfo:)
contextInfo:NULL];
@@ -357,4 +357,15 @@
[noteTypeSheet orderOut:self];
}
+
+#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/SKNoteWindowController.h
===================================================================
--- trunk/SKNoteWindowController.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKNoteWindowController.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -37,11 +37,12 @@
*/
#import <Cocoa/Cocoa.h>
+#import "BDSKDragImageView.h"
-...@class PDFAnnotation, BDSKDragImageView, SKStatusBar;
+...@class PDFAnnotation, SKStatusBar;
-...@interface SKNoteWindowController : NSWindowController {
+...@interface SKNoteWindowController : NSWindowController <NSWindowDelegate,
BDSKDragImageViewDelegate> {
IBOutlet NSTextView *textView;
IBOutlet BDSKDragImageView *imageView;
IBOutlet SKStatusBar *statusBar;
Modified: trunk/SKNotesDocument.h
===================================================================
--- trunk/SKNotesDocument.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKNotesDocument.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -37,10 +37,11 @@
*/
#import <Cocoa/Cocoa.h>
+#import "SKNoteOutlineView.h"
@class SKNoteOutlineView, SKStatusBar;
-...@interface SKNotesDocument : NSDocument {
+...@interface SKNotesDocument : NSDocument <NSWindowDelegate,
NSToolbarDelegate, SKNoteOutlineViewDelegate, NSOutlineViewDataSource> {
IBOutlet SKNoteOutlineView *outlineView;
IBOutlet NSArrayController *arrayController;
IBOutlet SKStatusBar *statusBar;
Modified: trunk/SKNotesPanelController.h
===================================================================
--- trunk/SKNotesPanelController.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKNotesPanelController.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -39,7 +39,7 @@
#import <Cocoa/Cocoa.h>
-...@interface SKNotesPanelController : NSWindowController
+...@interface SKNotesPanelController : NSWindowController <NSWindowDelegate>
+ (id)sharedController;
+ (BOOL)sharedControllerExists;
- (IBAction)addNote:(id)sender;
Modified: trunk/SKOutlineView.h
===================================================================
--- trunk/SKOutlineView.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKOutlineView.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -40,30 +40,13 @@
@class SKTypeSelectHelper;
-...@interface SKOutlineView : NSOutlineView {
- SKTypeSelectHelper *typeSelectHelper;
-}
-
-+ (BOOL)usesDefaultFontSize;
-
-- (NSArray *)selectedItems;
-
-- (SKTypeSelectHelper *)typeSelectHelper;
-- (void)setTypeSelectHelper:(SKTypeSelectHelper *)newTypeSelectHelper;
-
-- (BOOL)canDelete;
-- (void)delete:(id)sender;
-
-- (BOOL)canCopy;
-- (void)copy:(id)sender;
-
-- (void)scrollToBeginningOfDocument:(id)sender;
-- (void)scrollToEndOfDocument:(id)sender;
-
+...@protocol SKOutlineViewDelegate <NSOutlineViewDelegate>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
@end
-
-
@interface NSObject (SKOutlineViewDelegate)
+#else
+...@optional
+#endif
- (void)outlineView:(NSOutlineView *)anOutlineView deleteItems:(NSArray
*)items;
- (BOOL)outlineView:(NSOutlineView *)anOutlineView canDeleteItems:(NSArray
*)items;
@@ -79,9 +62,44 @@
@end
+...@protocol SKOutlineViewDataSource <NSOutlineViewDataSource>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
+...@end
@interface NSObject (SKOutlineViewDataSource)
+#else
+...@optional
+#endif
- (void)outlineView:(NSOutlineView *)anOutlineView
dragEndedWithOperation:(NSDragOperation)operation;
@end
+
+...@interface SKOutlineView : NSOutlineView {
+ SKTypeSelectHelper *typeSelectHelper;
+}
+
++ (BOOL)usesDefaultFontSize;
+
+- (NSArray *)selectedItems;
+
+- (SKTypeSelectHelper *)typeSelectHelper;
+- (void)setTypeSelectHelper:(SKTypeSelectHelper *)newTypeSelectHelper;
+
+- (BOOL)canDelete;
+- (void)delete:(id)sender;
+
+- (BOOL)canCopy;
+- (void)copy:(id)sender;
+
+- (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 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKOutlineView.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -275,4 +275,22 @@
[[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/SKPDFSynchronizer.h
===================================================================
--- trunk/SKPDFSynchronizer.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKPDFSynchronizer.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -44,6 +44,22 @@
SKPDFSynchronizerFlippedMask = 1 << 1,
};
+...@class SKPDFSynchronizer;
+
+...@protocol SKPDFSynchronizerDelegate <NSObject>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
+...@end
+...@interface NSObject (SKPDFSynchronizerDelegate)
+#else
+...@optional
+#endif
+
+- (void)synchronizer:(SKPDFSynchronizer *)synchronizer
foundLine:(NSInteger)line inFile:(NSString *)file;
+- (void)synchronizer:(SKPDFSynchronizer *)synchronizer
foundLocation:(NSPoint)point atPageIndex:(NSUInteger)pageIndex
options:(NSInteger)options;
+
+...@end
+
+
@interface SKPDFSynchronizer : NSObject {
id delegate;
@@ -65,9 +81,3 @@
- (void)terminate;
@end
-
-
-...@interface NSObject (SKPDFSynchronizerDelegate)
-- (void)synchronizer:(SKPDFSynchronizer *)synchronizer
foundLine:(NSInteger)line inFile:(NSString *)file;
-- (void)synchronizer:(SKPDFSynchronizer *)synchronizer
foundLocation:(NSPoint)point atPageIndex:(NSUInteger)pageIndex
options:(NSInteger)options;
-...@end
Modified: trunk/SKPDFView.h
===================================================================
--- trunk/SKPDFView.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKPDFView.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -92,7 +92,7 @@
@class SKReadingBar, SKTransitionController, SKTypeSelectHelper;
-...@interface SKPDFView : PDFView {
+...@interface SKPDFView : PDFView <NSTextFieldDelegate> {
SKToolMode toolMode;
SKNoteType annotationMode;
SKInteractionMode interactionMode;
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKPDFView.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -2122,7 +2122,7 @@
rv = YES;
}
} else if ([[SKPDFView superclass] instancesRespondToSelector:_cmd]) {
- rv = [super control:control textView:textView
doCommandBySelector:command];
+ rv = [(id)super control:control textView:textView
doCommandBySelector:command];
}
return rv;
}
Modified: trunk/SKPreferenceController.h
===================================================================
--- trunk/SKPreferenceController.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKPreferenceController.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -40,7 +40,7 @@
@class SKLineWell, SKFontWell;
-...@interface SKPreferenceController : NSWindowController {
+...@interface SKPreferenceController : NSWindowController <NSWindowDelegate,
NSTabViewDelegate> {
IBOutlet NSTabView *tabView;
IBOutlet NSPopUpButton *updateIntervalPopUpButton;
IBOutlet NSSlider *thumbnailSizeSlider;
Modified: trunk/SKPresentationOptionsSheetController.h
===================================================================
--- trunk/SKPresentationOptionsSheetController.h 2009-09-09 10:11:53 UTC
(rev 5725)
+++ trunk/SKPresentationOptionsSheetController.h 2009-09-09 12:44:19 UTC
(rev 5726)
@@ -39,10 +39,11 @@
#import <Cocoa/Cocoa.h>
#import "SKSheetController.h"
#import "SKTransitionController.h"
+#import "SKThumbnailTableView.h"
-...@class SKMainWindowController, SKMainDocument, SKThumbnail,
SKTransitionInfo, SKThumbnailTableView;
+...@class SKMainWindowController, SKMainDocument, SKThumbnail,
SKTransitionInfo;
-...@interface SKPresentationOptionsSheetController : SKSheetController {
+...@interface SKPresentationOptionsSheetController : SKSheetController
<NSWindowDelegate, SKThumbnailTableViewDelegate, NSTableViewDataSource> {
IBOutlet NSPopUpButton *transitionStylePopUpButton;
IBOutlet NSTextField *transitionDurationField;
IBOutlet NSSlider *transitionDurationSlider;
Modified: trunk/SKSnapshotWindowController.h
===================================================================
--- trunk/SKSnapshotWindowController.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKSnapshotWindowController.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -40,9 +40,27 @@
extern NSString *SKSnapshotCurrentSetupKey;
+...@class SKSnapshotWindowController;
+
+...@protocol SKSnapshotWindowControllerDelegate <NSObject>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
+...@end
+...@interface NSObject (SKSnapshotWindowControllerDelegate)
+#else
+...@optional
+#endif
+
+- (void)snapshotControllerDidFinishSetup:(SKSnapshotWindowController
*)controller;
+- (void)snapshotControllerWindowWillClose:(SKSnapshotWindowController
*)controller;
+- (void)snapshotControllerViewDidChange:(SKSnapshotWindowController
*)controller;
+-
(NSRect)snapshotControllerTargetRectForMiniaturize:(SKSnapshotWindowController
*)controller;
+-
(NSRect)snapshotControllerSourceRectForDeminiaturize:(SKSnapshotWindowController
*)controller;
+
+...@end
+
@class SKSnapshotPDFView, PDFDocument, PDFPage;
-...@interface SKSnapshotWindowController : NSWindowController {
+...@interface SKSnapshotWindowController : NSWindowController
<NSWindowDelegate> {
IBOutlet SKSnapshotPDFView* pdfView;
NSImage *thumbnail;
id delegate;
@@ -107,12 +125,3 @@
IBOutlet SKSnapshotPDFView *pdfView;
}
@end
-
-
-...@interface NSObject (SKSnapshotWindowControllerDelegate)
-- (void)snapshotControllerDidFinishSetup:(SKSnapshotWindowController
*)controller;
-- (void)snapshotControllerWindowWillClose:(SKSnapshotWindowController
*)controller;
-- (void)snapshotControllerViewDidChange:(SKSnapshotWindowController
*)controller;
--
(NSRect)snapshotControllerTargetRectForMiniaturize:(SKSnapshotWindowController
*)controller;
--
(NSRect)snapshotControllerSourceRectForDeminiaturize:(SKSnapshotWindowController
*)controller;
-...@end
Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKSnapshotWindowController.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -177,6 +177,9 @@
[[[[self document] mainWindowController] window] makeMainWindow];
}
+- (void)notifiyDidFinishSetup {
+ [[self delegate] snapshotControllerDidFinishSetup:self];
+}
- (void)goToDestination:(PDFDestination *)destination {
[pdfView goToDestination:destination];
@@ -204,7 +207,7 @@
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleDidMoveAnnotationNotification:)
name:SKPDFViewDidMoveAnnotationNotification object:nil];
if ([[self delegate]
respondsToSelector:@selector(snapshotControllerDidFinishSetup:)])
- [[self delegate]
performSelector:@selector(snapshotControllerDidFinishSetup:) withObject:self
afterDelay:0.1];
+ [self performSelector:@selector(notifiyDidFinishSetup) withObject:nil
afterDelay:0.1];
}
- (void)setPdfDocument:(PDFDocument *)pdfDocument scaleFactor:(CGFloat)factor
goToPageNumber:(NSInteger)pageNum rect:(NSRect)rect autoFits:(BOOL)autoFits {
Modified: trunk/SKSplitView.h
===================================================================
--- trunk/SKSplitView.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKSplitView.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -38,8 +38,20 @@
#import <Cocoa/Cocoa.h>
-...@class CIColor;
+...@class CIColor, SKSplitView;
+
+...@protocol SKSplitViewDelegate <NSSplitViewDelegate>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
+...@end
+...@interface NSObject (SKSplitViewDelegate)
+#else
+...@optional
+#endif
+- (void)splitView:(SKSplitView *)sender
doubleClickedDividerAt:(NSInteger)offset;
+...@end
+
+
@interface SKSplitView : NSSplitView {
BOOL blendEnds;
}
@@ -47,8 +59,8 @@
+ (NSColor *)endColor;
- (BOOL)blendEnds;
- (void)setBlendEnds:(BOOL)flag;
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+- (id <SKSplitViewDelegate>)delegate;
+- (void)setDelegate:(id <SKSplitViewDelegate>)newDelegate;
+#endif
@end
-
-...@interface NSObject (SKSplitViewExtendedDelegate)
-- (void)splitView:(SKSplitView *)sender
doubleClickedDividerAt:(NSInteger)offset;
-...@end
Modified: trunk/SKSplitView.m
===================================================================
--- trunk/SKSplitView.m 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKSplitView.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -164,4 +164,14 @@
}
}
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+- (id <SKSplitViewDelegate>)delegate {
+ return (id <SKSplitViewDelegate>)[super delegate];
+}
+
+- (void)setDelegate:(id <SKSplitViewDelegate>)newDelegate {
+ [super setDelegate:newDelegate];
+}
+#endif
+
@end
Modified: trunk/SKTableView.h
===================================================================
--- trunk/SKTableView.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKTableView.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -40,6 +40,36 @@
@class SKTypeSelectHelper;
+...@protocol SKTableViewDelegate <NSTableViewDelegate>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
+...@end
+...@interface NSObject (SKTableViewDelegate)
+#else
+...@optional
+#endif
+
+- (void)tableView:(NSTableView *)aTableView deleteRowsWithIndexes:(NSIndexSet
*)rowIndexes;
+- (BOOL)tableView:(NSTableView *)aTableView
canDeleteRowsWithIndexes:(NSIndexSet *)rowIndexes;
+
+- (void)tableView:(NSTableView *)aTableView copyRowsWithIndexes:(NSIndexSet
*)rowIndexes;
+- (BOOL)tableView:(NSTableView *)aTableView canCopyRowsWithIndexes:(NSIndexSet
*)rowIndexes;
+
+- (void)tableViewPaste:(NSTableView *)aTableView;
+- (BOOL)tableViewCanPaste:(NSTableView *)aTableView;
+
+- (NSMenu *)tableView:(NSTableView *)aTableView
menuForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex;
+
+- (BOOL)tableView:(NSTableView *)aTableView
shouldTrackTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex;
+- (void)tableView:(NSTableView *)aTableView
mouseEnteredTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex;
+- (void)tableView:(NSTableView *)aTableView
mouseExitedTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex;
+
+- (NSArray *)tableView:(NSTableView *)aTableView
typeSelectHelperSelectionItems:(SKTypeSelectHelper *)aTypeSelectHelper;
+- (void)tableView:(NSTableView *)aTableView
typeSelectHelper:(SKTypeSelectHelper *)aTypeSelectHelper
didFailToFindMatchForSearchString:(NSString *)searchString;
+- (void)tableView:(NSTableView *)aTableView
typeSelectHelper:(SKTypeSelectHelper *)aTypeSelectHelper
updateSearchString:(NSString *)searchString;
+
+...@end
+
+
@interface SKTableView : NSTableView {
CFMutableArrayRef trackingRects;
SKTypeSelectHelper *typeSelectHelper;
@@ -62,28 +92,9 @@
- (void)scrollToBeginningOfDocument:(id)sender;
- (void)scrollToEndOfDocument:(id)sender;
-...@end
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+- (id <SKTableViewDelegate>)delegate;
+- (void)setDelegate:(id <SKTableViewDelegate>)newDelegate;
+#endif
-
-...@interface NSObject (SKTableViewDelegate)
-
-- (void)tableView:(NSTableView *)aTableView deleteRowsWithIndexes:(NSIndexSet
*)rowIndexes;
-- (BOOL)tableView:(NSTableView *)aTableView
canDeleteRowsWithIndexes:(NSIndexSet *)rowIndexes;
-
-- (void)tableView:(NSTableView *)aTableView copyRowsWithIndexes:(NSIndexSet
*)rowIndexes;
-- (BOOL)tableView:(NSTableView *)aTableView canCopyRowsWithIndexes:(NSIndexSet
*)rowIndexes;
-
-- (void)tableViewPaste:(NSTableView *)aTableView;
-- (BOOL)tableViewCanPaste:(NSTableView *)aTableView;
-
-- (NSMenu *)tableView:(NSTableView *)aTableView
menuForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex;
-
-- (BOOL)tableView:(NSTableView *)aTableView
shouldTrackTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex;
-- (void)tableView:(NSTableView *)aTableView
mouseEnteredTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex;
-- (void)tableView:(NSTableView *)aTableView
mouseExitedTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex;
-
-- (NSArray *)tableView:(NSTableView *)aTableView
typeSelectHelperSelectionItems:(SKTypeSelectHelper *)aTypeSelectHelper;
-- (void)tableView:(NSTableView *)aTableView
typeSelectHelper:(SKTypeSelectHelper *)aTypeSelectHelper
didFailToFindMatchForSearchString:(NSString *)searchString;
-- (void)tableView:(NSTableView *)aTableView
typeSelectHelper:(SKTypeSelectHelper *)aTypeSelectHelper
updateSearchString:(NSString *)searchString;
-
@end
Modified: trunk/SKTableView.m
===================================================================
--- trunk/SKTableView.m 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKTableView.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -359,4 +359,14 @@
[[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];
+}
+
+- (void)setDelegate:(id <SKTableViewDelegate>)newDelegate {
+ [super setDelegate:newDelegate];
+}
+#endif
+
@end
Modified: trunk/SKThumbnailTableView.h
===================================================================
--- trunk/SKThumbnailTableView.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKThumbnailTableView.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -40,6 +40,20 @@
#import "SKTableView.h"
+...@protocol SKThumbnailTableViewDelegate <SKTableViewDelegate>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
+...@end
+...@interface NSObject (SKThumbnailTableViewDelegate)
+#else
+...@optional
+#endif
+
+- (NSArray *)tableViewHighlightedRows:(NSTableView *)tableView;
+- (BOOL)tableView:(NSTableView *)tableView
commandSelectRow:(NSInteger)rowIndex;
+
+...@end
+
+
@class SKTypeSelectHelper;
@interface SKThumbnailTableView : SKTableView
@@ -49,10 +63,9 @@
- (BOOL)isScrolling;
-...@end
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+- (id <SKThumbnailTableViewDelegate>)delegate;
+- (void)setDelegate:(id <SKThumbnailTableViewDelegate>)newDelegate;
+#endif
-
-...@interface NSObject (SKThumbnailTableViewDelegate)
-- (NSArray *)tableViewHighlightedRows:(NSTableView *)tableView;
-- (BOOL)tableView:(NSTableView *)tableView
commandSelectRow:(NSInteger)rowIndex;
@end
Modified: trunk/SKThumbnailTableView.m
===================================================================
--- trunk/SKThumbnailTableView.m 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKThumbnailTableView.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -171,4 +171,14 @@
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 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKTocOutlineView.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -41,15 +41,27 @@
#import "SKOutlineView.h"
-...@interface SKTocOutlineView : SKOutlineView {
- CFMutableArrayRef trackingRects;
-}
+
+...@protocol SKTocOutlineViewDelegate <SKOutlineViewDelegate>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
@end
+...@interface NSObject (SKTocOutlineViewDelegate)
+#else
+...@optional
+#endif
-
-...@interface NSObject (SKTocOutlineViewDelegate)
- (NSArray *)outlineViewHighlightedRows:(NSOutlineView *)anOutlineView;
- (BOOL)outlineView:(NSOutlineView *)anOutlineView
shouldTrackTableColumn:(NSTableColumn *)aTableColumn item:(id)item;
- (void)outlineView:(NSOutlineView *)anOutlineView
mouseEnteredTableColumn:(NSTableColumn *)aTableColumn item:(id)item;
- (void)outlineView:(NSOutlineView *)anOutlineView
mouseExitedTableColumn:(NSTableColumn *)aTableColumn item:(id)item;
+
@end
+
+...@interface SKTocOutlineView : SKOutlineView {
+ CFMutableArrayRef trackingRects;
+}
+#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 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKTocOutlineView.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -213,4 +213,14 @@
}
}
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+- (id <SKTocOutlineViewDelegate>)delegate {
+ return (id <SKTocOutlineViewDelegate>)[super delegate];
+}
+
+- (void)setDelegate:(id <SKTocOutlineViewDelegate>)newDelegate {
+ [super setDelegate:newDelegate];
+}
+#endif
+
@end
Modified: trunk/SKToolbarItem.m
===================================================================
--- trunk/SKToolbarItem.m 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKToolbarItem.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -43,7 +43,7 @@
- (void)validate {
if ([self view] && [[[self toolbar] delegate]
respondsToSelector:@selector(validateToolbarItem:)]) {
- BOOL enabled = [[[self toolbar] delegate] validateToolbarItem:self];
+ BOOL enabled = [(id)[[self toolbar] delegate]
validateToolbarItem:self];
[self setEnabled:enabled];
}
[super validate];
Modified: trunk/SKTransitionController.m
===================================================================
--- trunk/SKTransitionController.m 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKTransitionController.m 2009-09-09 12:44:19 UTC (rev 5726)
@@ -120,7 +120,7 @@
#pragma mark -
-...@interface SKTransitionView : NSOpenGLView {
+...@interface SKTransitionView : NSOpenGLView <NSAnimationDelegate> {
SKTransitionAnimation *animation;
CIImage *image;
CIContext *context;
@@ -568,7 +568,7 @@
- (void)setCurrentProgress:(NSAnimationProgress)progress {
[super setCurrentProgress:progress];
[filter setValue:[NSNumber numberWithDouble:[self currentValue]]
forKey:@"inputTime"];
- [[self delegate] display];
+ [(id)[self delegate] display];
}
- (CIImage *)currentImage {
Modified: trunk/SKTypeSelectHelper.h
===================================================================
--- trunk/SKTypeSelectHelper.h 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/SKTypeSelectHelper.h 2009-09-09 12:44:19 UTC (rev 5726)
@@ -46,7 +46,7 @@
};
typedef NSInteger SKTypeSelectMatchOption;
-...@interface SKTypeSelectHelper : NSObject {
+...@interface SKTypeSelectHelper : NSObject <NSTextViewDelegate> {
id dataSource;
BOOL cycleResults;
SKTypeSelectMatchOption matchOption;
Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj 2009-09-09 10:11:53 UTC (rev
5725)
+++ trunk/Skim.xcodeproj/project.pbxproj 2009-09-09 12:44:19 UTC (rev
5726)
@@ -671,6 +671,7 @@
CE5BF7FF0C7CBF6300EBDCF7 /* SKTableView.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= SKTableView.m; sourceTree = "<group>"; };
CE5BF8400C7CC24A00EBDCF7 /* SKOutlineView.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SKOutlineView.h; sourceTree = "<group>"; };
CE5BF8410C7CC24A00EBDCF7 /* SKOutlineView.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= SKOutlineView.m; sourceTree = "<group>"; };
+ CE5F23571057B75000B5A7B9 /* SKCompatibility.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SKCompatibility.h; sourceTree = "<group>"; };
CE5F42D30BF8A3400069D89C /* IOKit.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree
= "<absolute>"; };
CE5FA1650C909886008BE480 /* SKFDFParser.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SKFDFParser.h; sourceTree = "<group>"; };
CE5FA1660C909886008BE480 /* SKFDFParser.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= SKFDFParser.m; sourceTree = "<group>"; };
@@ -1056,6 +1057,7 @@
children = (
32DBCF750370BD2300C91783 /* Skim_Prefix.pch */,
2A37F4B0FDCFA73011CA2CEA /* main.m */,
+ CE5F23571057B75000B5A7B9 /* SKCompatibility.h
*/,
);
name = "Other Sources";
sourceTree = "<group>";
Modified: trunk/Skim_Prefix.pch
===================================================================
--- trunk/Skim_Prefix.pch 2009-09-09 10:11:53 UTC (rev 5725)
+++ trunk/Skim_Prefix.pch 2009-09-09 12:44:19 UTC (rev 5726)
@@ -6,11 +6,8 @@
#import <Cocoa/Cocoa.h>
#import <Quartz/Quartz.h>
+ #import "SKCompatibility.h"
- #ifndef NSAppKitVersionNumber10_5
- #define NSAppKitVersionNumber10_5 949
- #endif
-
#define __SKFILENAMEASNSSTRING \
[[(id)CFStringCreateWithFileSystemRepresentation(NULL, __FILE__)
autorelease] lastPathComponent]
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit