Revision: 5657
http://skim-app.svn.sourceforge.net/skim-app/?rev=5657&view=rev
Author: hofman
Date: 2009-09-04 10:03:11 +0000 (Fri, 04 Sep 2009)
Log Message:
-----------
no need for PDFOutline wrapper anymore, just add a category to define the
missing methods
Modified Paths:
--------------
trunk/SKMainWindowController.h
trunk/SKMainWindowController.m
trunk/SKMainWindowController_Actions.m
trunk/SKMainWindowController_UI.m
trunk/Skim.xcodeproj/project.pbxproj
Added Paths:
-----------
trunk/PDFOutline_SKExtensions.h
trunk/PDFOutline_SKExtensions.m
Removed Paths:
-------------
trunk/SKPDFOutline.h
trunk/SKPDFOutline.m
Added: trunk/PDFOutline_SKExtensions.h
===================================================================
--- trunk/PDFOutline_SKExtensions.h (rev 0)
+++ trunk/PDFOutline_SKExtensions.h 2009-09-04 10:03:11 UTC (rev 5657)
@@ -0,0 +1,48 @@
+//
+// PDFOutline_SKExtensions.h
+// Skim
+//
+// Created by Christiaan on 9/4/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>
+#import <Quartz/Quartz.h>
+
+
+...@interface PDFOutline (SKExtensions)
+
+- (PDFPage *)page;
+- (NSString *)pageLabel;
+
+...@end
Added: trunk/PDFOutline_SKExtensions.m
===================================================================
--- trunk/PDFOutline_SKExtensions.m (rev 0)
+++ trunk/PDFOutline_SKExtensions.m 2009-09-04 10:03:11 UTC (rev 5657)
@@ -0,0 +1,62 @@
+//
+// PDFOutline_SKExtensions.m
+// Skim
+//
+// Created by Christiaan on 9/4/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 "PDFOutline_SKExtensions.h"
+#import "PDFPage_SKExtensions.h"
+
+
+...@implementation PDFOutline (SKExtensions)
+
+- (PDFPage *)page {
+ PDFDestination *dest = [self destination];
+ if (dest == nil && [[self action]
respondsToSelector:@selector(destination)])
+ dest = [(PDFActionGoTo *)[self action] destination];
+ return [dest page];
+}
+
+- (NSString *)pageLabel {
+ PDFPage *page = [self page];
+ if (page)
+ return [page displayLabel];
+ else if ([[self action] respondsToSelector:@selector(pageIndex)])
+ return [NSString stringWithFormat:@"%lu", (unsigned
long)([(PDFActionRemoteGoTo *)[self action] pageIndex] + 1)];
+ else
+ return nil;
+}
+
+...@end
Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h 2009-09-04 09:38:16 UTC (rev 5656)
+++ trunk/SKMainWindowController.h 2009-09-04 10:03:11 UTC (rev 5657)
@@ -65,7 +65,7 @@
extern NSString *SKUnarchiveFromDataArrayTransformerName;
-...@class PDFAnnotation, SKPDFOutline, PDFSelection, SKThumbnail,
SKGroupedSearchResult;
+...@class PDFAnnotation, PDFSelection, SKThumbnail, SKGroupedSearchResult;
@class SKPDFView, SKSecondaryPDFView, SKTocOutlineView, SKNoteOutlineView,
SKThumbnailTableView, SKSplitView, BDSKCollapsibleView, BDSKEdgeView,
BDSKGradientView, SKColorSwatch, SKStatusBar;
@class SKPDFDocument, SKFullScreenWindow, SKNavigationWindow, SKSideWindow,
SKSnapshotWindowController, SKProgressController, SKPageSheetController,
SKScaleSheetController, SKPasswordSheetController, SKBookmarkSheetController,
SKPresentationOptionsSheetController;
@@ -103,7 +103,6 @@
IBOutlet SKTocOutlineView *outlineView;
IBOutlet NSView *tocView;
- SKPDFOutline *pdfOutline;
IBOutlet NSObjectController *ownerController;
IBOutlet NSArrayController *thumbnailArrayController;
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2009-09-04 09:38:16 UTC (rev 5656)
+++ trunk/SKMainWindowController.m 2009-09-04 10:03:11 UTC (rev 5657)
@@ -100,7 +100,7 @@
#import "RemoteControl.h"
#import "NSView_SKExtensions.h"
#import "NSResponder_SKExtensions.h"
-#import "SKPDFOutline.h"
+#import "PDFOutline_SKExtensions.h"
#define MULTIPLICATION_SIGN_CHARACTER 0x00d7
@@ -253,7 +253,6 @@
[dirtySnapshots release];
[searchResults release];
[groupedSearchResults release];
- [pdfOutline release];
[thumbnails release];
[notes release];
[snapshots release];
@@ -428,9 +427,10 @@
[[self document] windowControllerDidLoadNib:self];
// Show/hide left side pane if necessary
- if ([sud boolForKey:SKOpenContentsPaneOnlyForTOCKey] && [self
leftSidePaneIsOpen] == (pdfOutline == nil))
+ BOOL hasOutline = ([[pdfView document] outlineRoot] != nil);
+ if ([sud boolForKey:SKOpenContentsPaneOnlyForTOCKey] && [self
leftSidePaneIsOpen] == hasOutline)
[self toggleLeftSidePane:self];
- if (pdfOutline)
+ if (hasOutline)
[self setLeftSidePaneState:SKOutlineSidePaneState];
else
[leftSideButton setEnabled:NO forSegment:SKOutlineSidePaneState];
@@ -686,15 +686,11 @@
[self allSnapshotsNeedUpdate];
[noteOutlineView reloadData];
- // update the outline
- [pdfOutline release];
- pdfOutline = [[SKPDFOutline alloc] initWithOutline:[pdfDoc outlineRoot]
parent:nil];
-
mwcFlags.updatingOutlineSelection = 1;
// If this is a reload following a TeX run and the user just killed the
outline for some reason, we get a crash if the outlineView isn't reloaded, so
no longer make it conditional on pdfOutline != nil
[outlineView reloadData];
for (i = 0; i < (NSUInteger)[outlineView numberOfRows]; i++) {
- SKPDFOutline *item = [outlineView itemAtRow:i];
+ PDFOutline *item = [outlineView itemAtRow:i];
if ([item isOpen])
[outlineView expandItem:item];
}
@@ -702,12 +698,12 @@
[self updateOutlineSelection];
// handle the case as above where the outline has disappeared in a reload
situation
- if (nil == pdfOutline && currentLeftSideView == tocView) {
+ if (nil == [[pdfView document] outlineRoot] && currentLeftSideView ==
tocView) {
[self fadeInThumbnailView];
[leftSideButton setSelectedSegment:SKThumbnailSidePaneState];
}
- [leftSideButton setEnabled:pdfOutline != nil
forSegment:SKOutlineSidePaneState];
+ [leftSideButton setEnabled:[[pdfView document] outlineRoot] != nil
forSegment:SKOutlineSidePaneState];
}
- (SKProgressController *)progressController {
@@ -758,9 +754,6 @@
[snapshots makeObjectsPerformSelector:@selector(close)];
[self removeAllObjectsFromSnapshots];
- [pdfOutline release];
- pdfOutline = nil;
-
[lastViewedPages removeAllObjects];
[self unregisterForDocumentNotifications];
@@ -2501,13 +2494,13 @@
#pragma mark Outline
- (NSInteger)outlineRowForPageIndex:(NSUInteger)pageIndex {
- if (pdfOutline == nil)
+ if ([[pdfView document] outlineRoot] == nil)
return -1;
NSInteger i, numRows = [outlineView numberOfRows];
for (i = 0; i < numRows; i++) {
// Get the destination of the given row....
- SKPDFOutline *outlineItem = [outlineView itemAtRow:i];
+ PDFOutline *outlineItem = [outlineView itemAtRow:i];
PDFPage *page = [outlineItem page];
if (page == nil) {
@@ -2527,7 +2520,7 @@
- (void)updateOutlineSelection{
// Skip out if this PDF has no outline.
- if (pdfOutline == nil || mwcFlags.updatingOutlineSelection)
+ if ([[pdfView document] outlineRoot] == nil ||
mwcFlags.updatingOutlineSelection)
return;
// Get index of current page.
Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m 2009-09-04 09:38:16 UTC (rev
5656)
+++ trunk/SKMainWindowController_Actions.m 2009-09-04 10:03:11 UTC (rev
5657)
@@ -60,7 +60,6 @@
#import "BDSKCollapsibleView.h"
#import "BDSKEdgeView.h"
#import "SKSplitView.h"
-#import "SKPDFOutline.h"
#import "SKLineInspector.h"
#import "NSEvent_SKExtensions.h"
@@ -219,17 +218,13 @@
}
- (void)goToSelectedOutlineItem:(id)sender {
- SKPDFOutline *outlineItem = [outlineView itemAtRow:[outlineView
selectedRow]];
+ PDFOutline *outlineItem = [outlineView itemAtRow:[outlineView
selectedRow]];
if ([outlineItem destination])
[pdfView goToDestination:[outlineItem destination]];
else if ([outlineItem action])
[pdfView performAction:[outlineItem action]];
}
-- (IBAction):(id)sender {
-
-}
-
- (IBAction)editNote:(id)sender{
if ([pdfView hideNotes] == NO) {
[pdfView editActiveAnnotation:sender];
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2009-09-04 09:38:16 UTC (rev 5656)
+++ trunk/SKMainWindowController_UI.m 2009-09-04 10:03:11 UTC (rev 5657)
@@ -64,7 +64,7 @@
#import "SKApplication.h"
#import "NSMenu_SKExtensions.h"
#import "SKLineInspector.h"
-#import "SKPDFOutline.h"
+#import "PDFOutline_SKExtensions.h"
#import "SKDocumentController.h"
#define NOTES_KEY @"notes"
@@ -598,8 +598,8 @@
- (NSInteger)outlineView:(NSOutlineView *)ov numberOfChildrenOfItem:(id)item{
if ([ov isEqual:outlineView]) {
if (item == nil && [[pdfView document] isLocked] == NO)
- item = pdfOutline;
- return [(SKPDFOutline *)item numberOfChildren];
+ item = [[pdfView document] outlineRoot];
+ return [(PDFOutline *)item numberOfChildren];
} else if ([ov isEqual:noteOutlineView]) {
if (item == nil)
return [[noteArrayController arrangedObjects] count];
@@ -612,8 +612,8 @@
- (id)outlineView:(NSOutlineView *)ov child:(NSInteger)anIndex ofItem:(id)item{
if ([ov isEqual:outlineView]) {
if (item == nil && [[pdfView document] isLocked] == NO)
- item = pdfOutline;
- id obj = [(SKPDFOutline *)item childAtIndex:anIndex];
+ item = [[pdfView document] outlineRoot];
+ id obj = [(PDFOutline *)item childAtIndex:anIndex];
return obj;
} else if ([ov isEqual:noteOutlineView]) {
if (item == nil)
@@ -627,8 +627,8 @@
- (BOOL)outlineView:(NSOutlineView *)ov isItemExpandable:(id)item{
if ([ov isEqual:outlineView]) {
if (item == nil && [[pdfView document] isLocked] == NO)
- item = pdfOutline;
- return ([(SKPDFOutline *)item numberOfChildren] > 0);
+ item = [[pdfView document] outlineRoot];
+ return ([(PDFOutline *)item numberOfChildren] > 0);
} else if ([ov isEqual:noteOutlineView]) {
return [[item texts] count] > 0;
}
@@ -639,9 +639,9 @@
if ([ov isEqual:outlineView]) {
NSString *tcID = [tableColumn identifier];
if([tcID isEqualToString:LABEL_COLUMNID]) {
- return [(SKPDFOutline *)item label];
+ return [(PDFOutline *)item label];
} else if([tcID isEqualToString:PAGE_COLUMNID]) {
- return [(SKPDFOutline *)item pageLabel];
+ return [(PDFOutline *)item pageLabel];
}
} else if ([ov isEqual:noteOutlineView]) {
NSString *tcID = [tableColumn identifier];
@@ -1042,7 +1042,7 @@
NSInteger i, count = [outlineView numberOfRows];
NSMutableArray *array = [NSMutableArray arrayWithCapacity:count];
for (i = 0; i < count; i++)
- [array addObject:[[(SKPDFOutline *)[outlineView itemAtRow:i]
label] lossyASCIIString]];
+ [array addObject:[[(PDFOutline *)[outlineView itemAtRow:i] label]
lossyASCIIString]];
return array;
}
return nil;
@@ -1417,7 +1417,7 @@
return [self isPresentation] == NO;
} else if (action == @selector(changeLeftSidePaneState:)) {
[menuItem setState:mwcFlags.leftSidePaneState ==
(SKLeftSidePaneState)[menuItem tag] ? (([findTableView window] ||
[groupedFindTableView window]) ? NSMixedState : NSOnState) : NSOffState];
- return (SKLeftSidePaneState)[menuItem tag] == SKThumbnailSidePaneState
|| pdfOutline;
+ return (SKLeftSidePaneState)[menuItem tag] == SKThumbnailSidePaneState
|| [[pdfView document] outlineRoot];
} else if (action == @selector(changeRightSidePaneState:)) {
[menuItem setState:mwcFlags.rightSidePaneState ==
(SKRightSidePaneState)[menuItem tag] ? NSOnState : NSOffState];
return [self isPresentation] == NO;
Deleted: trunk/SKPDFOutline.h
===================================================================
--- trunk/SKPDFOutline.h 2009-09-04 09:38:16 UTC (rev 5656)
+++ trunk/SKPDFOutline.h 2009-09-04 10:03:11 UTC (rev 5657)
@@ -1,70 +0,0 @@
-//
-// SKPDFOutline.h
-// Skim
-//
-// Created by Christiaan Hofman on 9/11/08.
-/*
- This software is Copyright (c) 2008-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>
-#import <Quartz/Quartz.h>
-
-
-...@interface SKPDFOutline : NSObject {
- PDFOutline *outline;
- SKPDFOutline *parent;
- NSMutableArray *children;
-}
-
-- (id)initWithOutline:(PDFOutline *)anOutline parent:(SKPDFOutline *)aParent;
-
-- (PDFDocument *)document;
-
-- (SKPDFOutline *)parent;
-
-- (NSUInteger)numberOfChildren;
-- (SKPDFOutline *)childAtIndex:(NSUInteger)anIndex;
-
-- (NSString *)label;
-
-- (PDFDestination *)destination;
-
-- (PDFAction *)action;
-
-- (PDFPage *)page;
-
-- (NSString *)pageLabel;
-
-- (BOOL)isOpen;
-
-...@end
Deleted: trunk/SKPDFOutline.m
===================================================================
--- trunk/SKPDFOutline.m 2009-09-04 09:38:16 UTC (rev 5656)
+++ trunk/SKPDFOutline.m 2009-09-04 10:03:11 UTC (rev 5657)
@@ -1,125 +0,0 @@
-//
-// SKPDFOutline.m
-// Skim
-//
-// Created by Christiaan Hofman on 11/9/08.
-// Created by Christiaan Hofman on 9/11/08.
-/*
- This software is Copyright (c) 2008-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 "SKPDFOutline.h"
-#import "PDFPage_SKExtensions.h"
-
-
-...@implementation SKPDFOutline
-
-
-- (id)initWithOutline:(PDFOutline *)anOutline parent:(SKPDFOutline *)aParent {
- if (self = [super init]) {
- if (anOutline) {
- outline = [anOutline retain];
- parent = aParent;
- children = nil;
- } else {
- [self release];
- self = nil;
- }
- }
- return self;
-}
-
-- (void)dealloc {
- [outline release];
- [children release];
- [super dealloc];
-}
-
-- (PDFDocument *)document {
- return [outline document];
-}
-
-- (SKPDFOutline *)parent {
- return parent;
-}
-
-- (NSUInteger)numberOfChildren {
- return [outline numberOfChildren];
-}
-
-- (SKPDFOutline *)childAtIndex:(NSUInteger)anIndex {
- if (children == nil) {
- NSInteger i, count = [outline numberOfChildren];
- children = [[NSMutableArray alloc] initWithCapacity:count];
- for (i = 0; i < count; i++) {
- SKPDFOutline *child = [[[self class] alloc]
initWithOutline:[outline childAtIndex:i] parent:self];
- [children addObject:child];
- [child release];
- }
- }
- return [children objectAtIndex:anIndex];
-}
-
-- (NSString *)label {
- return [outline label];
-}
-
-- (PDFDestination *)destination {
- return [outline destination];
-}
-
-- (PDFAction *)action {
- return [outline action];
-}
-
-- (PDFPage *)page {
- PDFDestination *dest = [outline destination];
- if (dest == nil && [[outline action]
respondsToSelector:@selector(destination)])
- dest = [(PDFActionGoTo *)[outline action] destination];
- return [dest page];
-}
-
-- (NSString *)pageLabel {
- PDFPage *page = [self page];
- if (page)
- return [page displayLabel];
- else if ([[outline action] respondsToSelector:@selector(pageIndex)])
- return [NSString stringWithFormat:@"%lu", (unsigned
long)([(PDFActionRemoteGoTo *)[outline action] pageIndex] + 1)];
- else
- return nil;
-}
-
-- (BOOL)isOpen {
- return [outline isOpen];
-}
-
-...@end
Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj 2009-09-04 09:38:16 UTC (rev
5656)
+++ trunk/Skim.xcodeproj/project.pbxproj 2009-09-04 10:03:11 UTC (rev
5657)
@@ -65,7 +65,6 @@
CE2093910C5F9A8D009D3EFB /* BDSKGradientView.m in Sources */ =
{isa = PBXBuildFile; fileRef = CE20938F0C5F9A8D009D3EFB /* BDSKGradientView.m
*/; };
CE209FAA0C9D38C6007C72F9 /* SKProgressController.m in Sources
*/ = {isa = PBXBuildFile; fileRef = CE209FA80C9D38C6007C72F9 /*
SKProgressController.m */; };
CE20B1950C9F23CC007C72F9 /* NSView_SKExtensions.m in Sources */
= {isa = PBXBuildFile; fileRef = CE20B1930C9F23CC007C72F9 /*
NSView_SKExtensions.m */; };
- CE2896DA0E78948200031EEA /* SKPDFOutline.m in Sources */ = {isa
= PBXBuildFile; fileRef = CE2896D90E78948200031EEA /* SKPDFOutline.m */; };
CE2A1E630CE513E400A0499B /* RemoteControl.m in Sources */ =
{isa = PBXBuildFile; fileRef = CE2A1E610CE513E300A0499B /* RemoteControl.m */;
};
CE2DE4920B85D48F00D0DA12 /* SKThumbnail.m in Sources */ = {isa
= PBXBuildFile; fileRef = CE2DE4910B85D48F00D0DA12 /* SKThumbnail.m */; };
CE2DE49D0B85D4F400D0DA12 /* SKFullScreenWindow.m in Sources */
= {isa = PBXBuildFile; fileRef = CE2DE49C0B85D4F400D0DA12 /*
SKFullScreenWindow.m */; };
@@ -127,6 +126,7 @@
CE5470030B32D96500F8AFB6 /* NoteWindow.nib in Resources */ =
{isa = PBXBuildFile; fileRef = CE5470010B32D96500F8AFB6 /* NoteWindow.nib */; };
CE54898C0B35D4EF00F8AFB6 /* InfoWindow.nib in Resources */ =
{isa = PBXBuildFile; fileRef = CE54898A0B35D4EF00F8AFB6 /* InfoWindow.nib */; };
CE54898F0B35D50E00F8AFB6 /* SKInfoWindowController.m in Sources
*/ = {isa = PBXBuildFile; fileRef = CE54898E0B35D50E00F8AFB6 /*
SKInfoWindowController.m */; };
+ CE5BAF4410511A0F00161B87 /* PDFOutline_SKExtensions.m in
Sources */ = {isa = PBXBuildFile; fileRef = CE5BAF4310511A0F00161B87 /*
PDFOutline_SKExtensions.m */; };
CE5BD6740C7ADF1500EBDCF7 /* SKTypeSelectHelper.m in Sources */
= {isa = PBXBuildFile; fileRef = CE5BD6720C7ADF1500EBDCF7 /*
SKTypeSelectHelper.m */; };
CE5BEA190C7C635400EBDCF7 /* NSGeometry_SKExtensions.m in
Sources */ = {isa = PBXBuildFile; fileRef = CE5BEA170C7C635400EBDCF7 /*
NSGeometry_SKExtensions.m */; };
CE5BF8010C7CBF6300EBDCF7 /* SKTableView.m in Sources */ = {isa
= PBXBuildFile; fileRef = CE5BF7FF0C7CBF6300EBDCF7 /* SKTableView.m */; };
@@ -503,8 +503,6 @@
CE209FA80C9D38C6007C72F9 /* SKProgressController.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= SKProgressController.m; sourceTree = "<group>"; };
CE20B1920C9F23CC007C72F9 /* NSView_SKExtensions.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
NSView_SKExtensions.h; sourceTree = "<group>"; };
CE20B1930C9F23CC007C72F9 /* NSView_SKExtensions.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= NSView_SKExtensions.m; sourceTree = "<group>"; };
- CE2896D80E78948200031EEA /* SKPDFOutline.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SKPDFOutline.h; sourceTree = "<group>"; };
- CE2896D90E78948200031EEA /* SKPDFOutline.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= SKPDFOutline.m; sourceTree = "<group>"; };
CE2A1E600CE513E300A0499B /* RemoteControl.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
RemoteControl.h; sourceTree = "<group>"; };
CE2A1E610CE513E300A0499B /* RemoteControl.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= RemoteControl.m; sourceTree = "<group>"; };
CE2BD8170BD4127A00A5F4DB /* Sparkle.xcodeproj */ = {isa =
PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name =
Sparkle.xcodeproj; path = vendorsrc/andymatuschak/Sparkle/Sparkle.xcodeproj;
sourceTree = "<group>"; };
@@ -669,6 +667,8 @@
CE5A822F0E6C42A7008C0AA9 /* Italian */ = {isa =
PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings;
name = Italian; path = Italian.lproj/InfoPlist.strings; sourceTree = "<group>";
};
CE5A82300E6C42B1008C0AA9 /* Italian */ = {isa =
PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings;
name = Italian; path = Italian.lproj/Localizable.strings; sourceTree =
"<group>"; };
CE5A82310E6C42BF008C0AA9 /* Italian */ = {isa =
PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings;
name = Italian; path = Italian.lproj/ZoomValues.strings; sourceTree =
"<group>"; };
+ CE5BAF4210511A0F00161B87 /* PDFOutline_SKExtensions.h */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path
= PDFOutline_SKExtensions.h; sourceTree = "<group>"; };
+ CE5BAF4310511A0F00161B87 /* PDFOutline_SKExtensions.m */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc;
path = PDFOutline_SKExtensions.m; sourceTree = "<group>"; };
CE5BD6710C7ADF1500EBDCF7 /* SKTypeSelectHelper.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SKTypeSelectHelper.h; sourceTree = "<group>"; };
CE5BD6720C7ADF1500EBDCF7 /* SKTypeSelectHelper.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= SKTypeSelectHelper.m; sourceTree = "<group>"; };
CE5BEA160C7C635400EBDCF7 /* NSGeometry_SKExtensions.h */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path
= NSGeometry_SKExtensions.h; sourceTree = "<group>"; };
@@ -1384,8 +1384,6 @@
CEE54DF00DA2EF0E0037169F /*
SKPDFAnnotationTemporary.m */,
CE3366DD0E28BCFA005F99E6 /* SKPDFSyncRecord.h
*/,
CE3366DE0E28BCFA005F99E6 /* SKPDFSyncRecord.m
*/,
- CE2896D80E78948200031EEA /* SKPDFOutline.h */,
- CE2896D90E78948200031EEA /* SKPDFOutline.m */,
CE4294A10BBD29120016FDC2 /* SKReadingBar.h */,
CE4294A20BBD29120016FDC2 /* SKReadingBar.m */,
CEC3154D0F24AC02008D2C75 /* SKRichTextFormat.h
*/,
@@ -1633,18 +1631,20 @@
CEE54D870DA2E37B0037169F /*
PDFAnnotation_SKExtensions.m */,
CEE54D910DA2E5E10037169F /*
PDFAnnotationCircle_SKExtensions.h */,
CEE54D920DA2E5E10037169F /*
PDFAnnotationCircle_SKExtensions.m */,
- CEE54D960DA2E6FC0037169F /*
PDFAnnotationSquare_SKExtensions.h */,
- CEE54D970DA2E6FC0037169F /*
PDFAnnotationSquare_SKExtensions.m */,
+ CEE54DAC0DA2E8CD0037169F /*
PDFAnnotationFreeText_SKExtensions.h */,
+ CEE54DAD0DA2E8CD0037169F /*
PDFAnnotationFreeText_SKExtensions.m */,
+ CEEE7C500E7D3F2000B7B208 /*
PDFAnnotationInk_SKExtensions.h */,
+ CEEE7C510E7D3F2000B7B208 /*
PDFAnnotationInk_SKExtensions.m */,
CEE54D9A0DA2E7B30037169F /*
PDFAnnotationLine_SKExtensions.h */,
CEE54D9B0DA2E7B30037169F /*
PDFAnnotationLine_SKExtensions.m */,
- CEE54DAC0DA2E8CD0037169F /*
PDFAnnotationFreeText_SKExtensions.h */,
- CEE54DAD0DA2E8CD0037169F /*
PDFAnnotationFreeText_SKExtensions.m */,
+ CEC3AD220E23EC0300F40B0B /*
PDFAnnotationLink_SKExtensions.h */,
+ CEC3AD230E23EC0300F40B0B /*
PDFAnnotationLink_SKExtensions.m */,
CEE54DB20DA2E99D0037169F /*
PDFAnnotationMarkup_SKExtensions.h */,
CEE54DB30DA2E99D0037169F /*
PDFAnnotationMarkup_SKExtensions.m */,
+ CEE54D960DA2E6FC0037169F /*
PDFAnnotationSquare_SKExtensions.h */,
+ CEE54D970DA2E6FC0037169F /*
PDFAnnotationSquare_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 */,
@@ -1653,12 +1653,12 @@
CEE176E30DBD5B0C00E6C317 /*
PDFDisplayView_SKExtensions.m */,
CE6DC7B90D689138003A072F /*
PDFDocument_SKExtensions.h */,
CE6DC7BA0D689138003A072F /*
PDFDocument_SKExtensions.m */,
+ CE5BAF4210511A0F00161B87 /*
PDFOutline_SKExtensions.h */,
+ CE5BAF4310511A0F00161B87 /*
PDFOutline_SKExtensions.m */,
CE2DE50B0B85DC4000D0DA12 /*
PDFPage_SKExtensions.h */,
CE2DE50C0B85DC4000D0DA12 /*
PDFPage_SKExtensions.m */,
CE49726A0BDE8A7400D7F1D2 /*
PDFSelection_SKExtensions.h */,
CE49726B0BDE8A7400D7F1D2 /*
PDFSelection_SKExtensions.m */,
- CEEE7C500E7D3F2000B7B208 /*
PDFAnnotationInk_SKExtensions.h */,
- CEEE7C510E7D3F2000B7B208 /*
PDFAnnotationInk_SKExtensions.m */,
);
name = "PDFKit Categories";
sourceTree = "<group>";
@@ -2142,7 +2142,6 @@
CE3366DF0E28BCFA005F99E6 /* SKPDFSyncRecord.m
in Sources */,
CE09FC3C0E3886C100BDF413 /* SKRuntime.m in
Sources */,
CEA450F40E47A87500D161AD /*
NSLayoutManager_SKExtensions.m in Sources */,
- CE2896DA0E78948200031EEA /* SKPDFOutline.m in
Sources */,
CEEE7C520E7D3F2000B7B208 /*
PDFAnnotationInk_SKExtensions.m in Sources */,
CE05A7380E9024ED0060BB07 /*
SKPresentationOptionsSheetController.m in Sources */,
CE05A86F0E90ED950060BB07 /*
SKTextFieldSheetController.m in Sources */,
@@ -2159,6 +2158,7 @@
CE9B804A1030642400EA8774 /* SKTransitionInfo.m
in Sources */,
CEFBC96A103C5CBF00535C74 /* SKFormatCommand.m
in Sources */,
CEA2045F1050233E008E082B /*
SKPrintAccessoryController.m in Sources */,
+ CE5BAF4410511A0F00161B87 /*
PDFOutline_SKExtensions.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
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