Revision: 14086
http://sourceforge.net/p/skim-app/code/14086
Author: hofman
Date: 2024-03-02 15:58:40 +0000 (Sat, 02 Mar 2024)
Log Message:
-----------
use a custom struct for our destination as pageIndex and point
Modified Paths:
--------------
trunk/PDFView_SKExtensions.h
trunk/PDFView_SKExtensions.m
trunk/SKBasePDFView.h
trunk/SKBasePDFView.m
trunk/SKMainDocument.m
trunk/SKMainWindowController.h
trunk/SKMainWindowController.m
trunk/SKMainWindowController_Actions.m
trunk/SKMainWindowController_UI.m
Modified: trunk/PDFView_SKExtensions.h
===================================================================
--- trunk/PDFView_SKExtensions.h 2024-03-01 15:43:31 UTC (rev 14085)
+++ trunk/PDFView_SKExtensions.h 2024-03-02 15:58:40 UTC (rev 14086)
@@ -40,6 +40,11 @@
extern const NSPoint SKUnspecifiedPoint;
+typedef struct _SKDestination {
+ NSUInteger pageIndex;
+ NSPoint point;
+} SKDestination;
+
@interface PDFView (SKExtensions) <NSDraggingSource>
@property (nonatomic) CGFloat physicalScaleFactor;
@@ -62,8 +67,8 @@
- (PDFPage *)pageAndPoint:(NSPoint *)point forEvent:(NSEvent *)event
nearest:(BOOL)nearest;
-- (NSUInteger)currentPageIndexAndPoint:(NSPoint *)point rotated:(BOOL
*)rotated;
-- (void)goToPageAtIndex:(NSUInteger)pageIndex point:(NSPoint)point;
+- (SKDestination)currentDestinationRotated:(BOOL *)rotated;
+- (void)goToCurrentDestination:(SKDestination)destination;
- (void)goToCurrentPage:(PDFPage *)page;
Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m 2024-03-01 15:43:31 UTC (rev 14085)
+++ trunk/PDFView_SKExtensions.m 2024-03-02 15:58:40 UTC (rev 14086)
@@ -227,33 +227,31 @@
return page;
}
-- (NSUInteger)currentPageIndexAndPoint:(NSPoint *)point rotated:(BOOL
*)rotated {
+- (SKDestination)currentDestinationRotated:(BOOL *)rotated {
PDFPage *page = [self currentPage];
// don't use currentDestination, as that always gives the top-left of the
page in non-continuous mode, rather than the visible area
- if (point) {
- NSPoint p = SKTopLeftPoint([self bounds]);
- p.y -= [[self scrollView] contentInsets].top;
- *point = [self convertPoint:p toPage:page];
- }
+ NSPoint point = SKTopLeftPoint([self bounds]);
+ point.y -= [[self scrollView] contentInsets].top;
+ point = [self convertPoint:point toPage:page];
if (rotated)
*rotated = [page rotation] != [page intrinsicRotation];
- return [page pageIndex];
+ return (SKDestination){[page pageIndex], point};
}
-- (void)goToPageAtIndex:(NSUInteger)pageIndex point:(NSPoint)point {
- PDFPage *page = [[self document] pageAtIndex:pageIndex];
- if (NSEqualPoints(point, SKUnspecifiedPoint)) {
+- (void)goToCurrentDestination:(SKDestination)dest {
+ PDFPage *page = [[self document] pageAtIndex:dest.pageIndex];
+ if (NSEqualPoints(dest.point, SKUnspecifiedPoint)) {
[self goToCurrentPage:page];
} else {
- PDFDestination *destination = [[PDFDestination alloc]
initWithPage:page atPoint:point];
+ PDFDestination *destination = [[PDFDestination alloc]
initWithPage:page atPoint:dest.point];
[self goToDestination:destination];
if (@available(macOS 12.0, *)) {
NSScrollView *scrollView = [self scrollView];
NSClipView *clipView = [scrollView contentView];
- point = [self convertPoint:[self convertPoint:point fromPage:page]
toView:clipView];
+ dest.point = [self convertPoint:[self convertPoint:dest.point
fromPage:page] toView:clipView];
if ([clipView isFlipped] == NO)
- point.y -= NSHeight([clipView visibleRect]) - [clipView
contentInsets].top;
- [clipView scrollToPoint:point];
+ dest.point.y -= NSHeight([clipView visibleRect]) - [clipView
contentInsets].top;
+ [clipView scrollToPoint:dest.point];
[scrollView reflectScrolledClipView:clipView];
}
}
Modified: trunk/SKBasePDFView.h
===================================================================
--- trunk/SKBasePDFView.h 2024-03-01 15:43:31 UTC (rev 14085)
+++ trunk/SKBasePDFView.h 2024-03-02 15:58:40 UTC (rev 14086)
@@ -38,6 +38,7 @@
#import <Cocoa/Cocoa.h>
#import <Quartz/Quartz.h>
+#import "PDFView_SKExtensions.h"
NS_ASSUME_NONNULL_BEGIN
@@ -47,7 +48,7 @@
- (void)drawPagesInRect:(NSRect)rect toContext:(CGContextRef)context;
-- (void)scrollToPageAtIndex:(NSUInteger)pageIndex point:(NSPoint)point;
+- (void)scrollToDestination:(SKDestination)destination;
@end
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2024-03-01 15:43:31 UTC (rev 14085)
+++ trunk/SKBasePDFView.m 2024-03-02 15:58:40 UTC (rev 14086)
@@ -38,7 +38,6 @@
#import "SKBasePDFView.h"
#import "SKStringConstants.h"
-#import "PDFView_SKExtensions.h"
#import "NSGeometry_SKExtensions.h"
#import "NSGraphics_SKExtensions.h"
#import "NSUserDefaultsController_SKExtensions.h"
@@ -289,15 +288,15 @@
}
}
-- (void)scrollToPageAtIndex:(NSUInteger)pageIndex point:(NSPoint)point {
- PDFPage *page = [[self document] pageAtIndex:pageIndex];
- if (NSEqualPoints(point, SKUnspecifiedPoint) == NO) {
+- (void)scrollToDestination:(SKDestination)dest {
+ PDFPage *page = [[self document] pageAtIndex:dest.pageIndex];
+ if (NSEqualPoints(dest.point, SKUnspecifiedPoint) == NO) {
NSScrollView *scrollView = [self scrollView];
NSClipView *clipView = [scrollView contentView];
- point = [self convertPoint:[self convertPoint:point fromPage:page]
toView:clipView];
+ dest.point = [self convertPoint:[self convertPoint:dest.point
fromPage:page] toView:clipView];
if ([clipView isFlipped] == NO)
- point.y -= NSHeight([clipView visibleRect]) - [clipView
contentInsets].top;
- [clipView scrollToPoint:point];
+ dest.point.y -= NSHeight([clipView visibleRect]) - [clipView
contentInsets].top;
+ [clipView scrollToPoint:dest.point];
[scrollView reflectScrolledClipView:clipView];
} else if (hasVerticalLayout(self)) {
[self verticallyScrollToPage:page];
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2024-03-01 15:43:31 UTC (rev 14085)
+++ trunk/SKMainDocument.m 2024-03-02 15:58:40 UTC (rev 14086)
@@ -1695,9 +1695,8 @@
}
- (NSData *)currentQDPoint {
- NSPoint point;
- [[self pdfView] currentPageIndexAndPoint:&point rotated:NULL];
- Point qdPoint = SKQDPointFromNSPoint(point);
+ SKDestination dest = [[self pdfView] currentDestinationRotated:NULL];
+ Point qdPoint = SKQDPointFromNSPoint(dest.point);
return [NSData dataWithBytes:&qdPoint length:sizeof(Point)];
}
Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h 2024-03-01 15:43:31 UTC (rev 14085)
+++ trunk/SKMainWindowController.h 2024-03-02 15:58:40 UTC (rev 14086)
@@ -42,6 +42,7 @@
#import "SKFindController.h"
#import "NSDocument_SKExtensions.h"
#import "SKPDFView.h"
+#import "PDFView_SKExtensions.h"
#import "SKPDFDocument.h"
NS_ASSUME_NONNULL_BEGIN
@@ -149,10 +150,8 @@
NSString *pageLabel;
- NSUInteger markedPageIndex;
- NSPoint markedPagePoint;
- NSUInteger beforeMarkedPageIndex;
- NSPoint beforeMarkedPagePoint;
+ SKDestination markedPage;
+ SKDestination beforeMarkedPage;
NSPointerArray *lastViewedPages;
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2024-03-01 15:43:31 UTC (rev 14085)
+++ trunk/SKMainWindowController.m 2024-03-02 15:58:40 UTC (rev 14086)
@@ -253,10 +253,10 @@
mwcFlags.rightSidePaneState = SKSidePaneStateNote;
mwcFlags.findPaneState = SKFindPaneStateSingular;
pageLabel = nil;
- markedPageIndex = NSNotFound;
- markedPagePoint = NSZeroPoint;
- beforeMarkedPageIndex = NSNotFound;
- beforeMarkedPagePoint = NSZeroPoint;
+ markedPage.pageIndex = NSNotFound;
+ markedPage.point = NSZeroPoint;
+ beforeMarkedPage.pageIndex = NSNotFound;
+ beforeMarkedPage.point = NSZeroPoint;
activity = nil;
presentationNotesDocument = nil;
presentationNotesOffset = 0;
@@ -431,8 +431,10 @@
if ([[pdfView document] isLocked]) {
[savedNormalSetup setObject:[NSNumber
numberWithUnsignedInteger:pageIndex] forKey:PAGEINDEX_KEY];
} else if ([[pdfView currentPage] pageIndex] != pageIndex ||
pointString) {
- NSPoint point = pointString ? NSPointFromString(pointString) :
SKUnspecifiedPoint;
- [pdfView goToPageAtIndex:pageIndex point:point];
+ SKDestination dest = {pageIndex, SKUnspecifiedPoint};
+ if (pointString)
+ dest.point = NSPointFromString(pointString);
+ [pdfView goToCurrentDestination:dest];
[lastViewedPages setCount:0];
[lastViewedPages addPointer:(void *)pageIndex];
[pdfView resetHistory];
@@ -439,7 +441,7 @@
if (@available(macOS 12.0, *)) {
if (([pdfView displayMode] & kPDFDisplaySinglePageContinuous))
{
dispatch_async(dispatch_get_main_queue(), ^{
- [pdfView scrollToPageAtIndex:pageIndex point:point];
+ [pdfView scrollToDestination:dest];
});
}
}
@@ -562,10 +564,12 @@
[savedNormalSetup addEntriesFromDictionary:setup];
NSNumber *pageIndexNumber = [setup objectForKey:PAGEINDEX_KEY];
- NSUInteger pageIndex = [pageIndexNumber unsignedIntegerValue];
- if (pageIndexNumber && pageIndex != NSNotFound && pageIndex !=
[[pdfView currentPage] pageIndex]) {
+ SKDestination dest = {[pageIndexNumber unsignedIntegerValue],
SKUnspecifiedPoint};
+ if (pageIndexNumber && dest.pageIndex != NSNotFound && dest.pageIndex
!= [[pdfView currentPage] pageIndex]) {
NSString *pointString = [setup objectForKey:SCROLLPOINT_KEY];
- [pdfView goToPageAtIndex:pageIndex point:pointString ?
NSPointFromString(pointString) : SKUnspecifiedPoint];
+ if (pointString)
+ dest.point = NSPointFromString(pointString);
+ [pdfView goToCurrentDestination:dest];
}
}
}
@@ -572,17 +576,16 @@
- (NSDictionary *)currentSetup {
NSMutableDictionary *setup = [NSMutableDictionary dictionary];
- NSPoint point = NSZeroPoint;
BOOL rotated = NO;
- NSUInteger pageIndex = [pdfView currentPageIndexAndPoint:&point
rotated:&rotated];
+ SKDestination dest = [pdfView currentDestinationRotated:&rotated];
NSArray *cropBoxes = [self changedCropBoxes];
[setup setObject:NSStringFromRect([mainWindow frame])
forKey:MAINWINDOWFRAME_KEY];
[setup setObject:[NSNumber numberWithDouble:[self leftSideWidth]]
forKey:LEFTSIDEPANEWIDTH_KEY];
[setup setObject:[NSNumber numberWithDouble:[self rightSideWidth]]
forKey:RIGHTSIDEPANEWIDTH_KEY];
- [setup setObject:[NSNumber numberWithUnsignedInteger:pageIndex]
forKey:PAGEINDEX_KEY];
+ [setup setObject:[NSNumber numberWithUnsignedInteger:dest.pageIndex]
forKey:PAGEINDEX_KEY];
if (rotated == NO)
- [setup setObject:NSStringFromPoint(point) forKey:SCROLLPOINT_KEY];
+ [setup setObject:NSStringFromPoint(dest.point) forKey:SCROLLPOINT_KEY];
if (cropBoxes)
[setup setObject:cropBoxes forKey:CROPBOXES_KEY];
if ([snapshots count])
@@ -647,9 +650,12 @@
page = MIN(page, (NSInteger)[[pdfView document] pageCount]);
NSString *pointString = [options objectForKey:@"point"];
if ([pointString length] > 0) {
+ SKDestination dest;
if ([pointString hasPrefix:@"{"] == NO)
pointString = [NSString stringWithFormat:@"{%@}", pointString];
- [pdfView goToPageAtIndex:page - 1
point:NSPointFromString(pointString)];
+ dest.pageIndex = page - 1;
+ dest.point = NSPointFromString(pointString);
+ [pdfView goToCurrentDestination:dest];
} else if ((NSInteger)[[pdfView currentPage] pageIndex] != page) {
[pdfView goToCurrentPage:[[pdfView document] pageAtIndex:page -
1]];
}
@@ -1038,8 +1044,7 @@
PDFDocument *pdfDoc = pdfDocument;
NSArray *widgetProperties = [noteDicts
filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"type =
\"Widget\""]];
PDFDocument *oldPdfDoc = [pdfView document];
- NSUInteger pageIndex = NSNotFound, secondaryPageIndex = NSNotFound;
- NSPoint point = NSZeroPoint, secondaryPoint = NSZeroPoint;
+ SKDestination dest = {NSNotFound, NSZeroPoint}, secondaryDest =
{NSNotFound, NSZeroPoint};
BOOL rotated = NO;
NSArray *snapshotDicts = nil;
NSDictionary *openState = nil;
@@ -1059,13 +1064,13 @@
if (oldPdfDoc) {
// this is a revert
// need to clean up data and actions, and remember settings to restore
- pageIndex = [pdfView currentPageIndexAndPoint:&point rotated:&rotated];
+ dest = [pdfView currentDestinationRotated:&rotated];
if (rotated)
- point = SKUnspecifiedPoint;
+ dest.point = SKUnspecifiedPoint;
if (secondaryPdfView) {
- secondaryPageIndex = [secondaryPdfView
currentPageIndexAndPoint:&secondaryPoint rotated:&rotated];
+ secondaryDest = [secondaryPdfView
currentDestinationRotated:&rotated];
if (rotated)
- secondaryPoint = SKUnspecifiedPoint;
+ secondaryDest.point = SKUnspecifiedPoint;
}
openState = [self expansionStateForOutline:[[pdfView document]
outlineRoot]];
@@ -1133,32 +1138,32 @@
[self showSnapshotsWithSetups:snapshotDicts];
}
- if ([pdfDocument pageCount] && (pageIndex != NSNotFound ||
secondaryPageIndex != NSNotFound)) {
- if (pageIndex != NSNotFound) {
- if (pageIndex >= [pdfDocument pageCount]) {
- pageIndex = [pdfDocument pageCount] - 1;
- point = SKUnspecifiedPoint;
+ if ([pdfDocument pageCount] && (dest.pageIndex != NSNotFound ||
secondaryDest.pageIndex != NSNotFound)) {
+ if (dest.pageIndex != NSNotFound) {
+ if (dest.pageIndex >= [pdfDocument pageCount]) {
+ dest.pageIndex = [pdfDocument pageCount] - 1;
+ dest.point = SKUnspecifiedPoint;
}
if ([pdfDocument isLocked] && ([self interactionMode] ==
SKNormalMode || [self interactionMode] == SKFullScreenMode)) {
- [savedNormalSetup setObject:[NSNumber
numberWithUnsignedInteger:pageIndex] forKey:PAGEINDEX_KEY];
+ [savedNormalSetup setObject:[NSNumber
numberWithUnsignedInteger:dest.pageIndex] forKey:PAGEINDEX_KEY];
} else {
- [pdfView goToPageAtIndex:pageIndex point:point];
+ [pdfView goToCurrentDestination:dest];
}
}
- if (secondaryPageIndex != NSNotFound) {
- if (secondaryPageIndex >= [pdfDocument pageCount]) {
- secondaryPageIndex = [pdfDocument pageCount] - 1;
- secondaryPoint = SKUnspecifiedPoint;
+ if (secondaryDest.pageIndex != NSNotFound) {
+ if (secondaryDest.pageIndex >= [pdfDocument pageCount]) {
+ secondaryDest.pageIndex = [pdfDocument pageCount] - 1;
+ secondaryDest.point = SKUnspecifiedPoint;
}
- [secondaryPdfView goToPageAtIndex:secondaryPageIndex
point:secondaryPoint];
+ [secondaryPdfView goToCurrentDestination:secondaryDest];
}
[pdfView resetHistory];
}
- if (markedPageIndex >= [pdfDocument pageCount])
- markedPageIndex = beforeMarkedPageIndex = NSNotFound;
- else if (beforeMarkedPageIndex >= [pdfDocument pageCount])
- beforeMarkedPageIndex = NSNotFound;
+ if (markedPage.pageIndex >= [pdfDocument pageCount])
+ markedPage.pageIndex = beforeMarkedPage.pageIndex = NSNotFound;
+ else if (beforeMarkedPage.pageIndex >= [pdfDocument pageCount])
+ beforeMarkedPage.pageIndex = NSNotFound;
// the number of pages may have changed
[toolbarController handleChangedHistoryNotification:nil];
@@ -1659,7 +1664,7 @@
NSUInteger i = [indexPath item];
[item setRepresentedObject:[[self thumbnails] objectAtIndex:i]];
[item setHighlightLevel:[self thumbnailHighlightLevelForRow:i]];
- if (markedPageIndex == i)
+ if (markedPage.pageIndex == i)
[item setMarked:YES];
if (@available(macOS 10.14, *)) {} else if ([self interactionMode] ==
SKPresentationMode)
[item setBackgroundStyle:NSBackgroundStyleEmphasized];
@@ -1997,8 +2002,11 @@
NSNumber *pageIndexNumber = [savedNormalSetup objectForKey:PAGEINDEX_KEY];
NSUInteger pageIndex = pageIndexNumber ? [pageIndexNumber
unsignedIntegerValue] : NSNotFound;
if (pageIndex != NSNotFound) {
+ SKDestination dest = {pageIndex, SKUnspecifiedPoint};
NSString *pointString = [savedNormalSetup
objectForKey:SCROLLPOINT_KEY];
- [pdfView goToPageAtIndex:pageIndex point:pointString ?
NSPointFromString(pointString) : SKUnspecifiedPoint];
+ if (pointString)
+ dest.point = NSPointFromString(pointString);
+ [pdfView goToCurrentDestination:dest];
[lastViewedPages setCount:0];
[lastViewedPages addPointer:(void *)pageIndex];
[pdfView resetHistory];
Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m 2024-03-01 15:43:31 UTC (rev
14085)
+++ trunk/SKMainWindowController_Actions.m 2024-03-02 15:58:40 UTC (rev
14086)
@@ -393,26 +393,27 @@
- (IBAction)goToMarkedPage:(id)sender {
PDFDocument *pdfDoc = [pdfView document];
NSUInteger currentPageIndex = [[pdfView currentPage] pageIndex];
- if (markedPageIndex == NSNotFound || [pdfDoc isLocked] || [pdfDoc
pageCount] == 0) {
+ if (markedPage.pageIndex == NSNotFound || [pdfDoc isLocked] || [pdfDoc
pageCount] == 0) {
NSBeep();
- } else if (beforeMarkedPageIndex != NSNotFound) {
- [pdfView goToPageAtIndex:MIN(beforeMarkedPageIndex, [pdfDoc pageCount]
- 1) point:beforeMarkedPagePoint];
- } else if (currentPageIndex != markedPageIndex) {
- NSUInteger lastPageIndex = [pdfView
currentPageIndexAndPoint:&beforeMarkedPagePoint rotated:NULL];
- [pdfView goToPageAtIndex:MIN(markedPageIndex, [pdfDoc pageCount] - 1)
point:markedPagePoint];
- beforeMarkedPageIndex = lastPageIndex;
+ } else if (beforeMarkedPage.pageIndex != NSNotFound) {
+ beforeMarkedPage.pageIndex = MIN(beforeMarkedPage.pageIndex, [pdfDoc
pageCount] - 1);
+ [pdfView goToCurrentDestination:beforeMarkedPage];
+ } else if (currentPageIndex != markedPage.pageIndex) {
+ beforeMarkedPage = [pdfView currentDestinationRotated:NULL];
+ markedPage.pageIndex = MIN(markedPage.pageIndex, [pdfDoc pageCount] -
1);
+ [pdfView goToCurrentDestination:markedPage];
}
}
- (IBAction)markPage:(id)sender {
- if (markedPageIndex != NSNotFound) {
- [(SKThumbnailItem *)[overviewView itemAtIndexPath:[NSIndexPath
indexPathForItem:markedPageIndex inSection:0]] setMarked:NO];
- [[(NSTableCellView *)[leftSideController.thumbnailTableView
viewAtColumn:1 row:markedPageIndex makeIfNecessary:NO] imageView]
setObjectValue:nil];
+ if (markedPage.pageIndex != NSNotFound) {
+ [(SKThumbnailItem *)[overviewView itemAtIndexPath:[NSIndexPath
indexPathForItem:markedPage.pageIndex inSection:0]] setMarked:NO];
+ [[(NSTableCellView *)[leftSideController.thumbnailTableView
viewAtColumn:1 row:markedPage.pageIndex makeIfNecessary:NO] imageView]
setObjectValue:nil];
}
- markedPageIndex = [pdfView currentPageIndexAndPoint:&markedPagePoint
rotated:NULL];
- beforeMarkedPageIndex = NSNotFound;
- [(SKThumbnailItem *)[overviewView itemAtIndexPath:[NSIndexPath
indexPathForItem:markedPageIndex inSection:0]] setMarked:YES];
- [[(NSTableCellView *)[leftSideController.thumbnailTableView viewAtColumn:1
row:markedPageIndex makeIfNecessary:NO] imageView] setObjectValue:[NSImage
markImage]];
+ markedPage = [pdfView currentDestinationRotated:NULL];
+ beforeMarkedPage.pageIndex = NSNotFound;
+ [(SKThumbnailItem *)[overviewView itemAtIndexPath:[NSIndexPath
indexPathForItem:markedPage.pageIndex inSection:0]] setMarked:YES];
+ [[(NSTableCellView *)[leftSideController.thumbnailTableView viewAtColumn:1
row:markedPage.pageIndex makeIfNecessary:NO] imageView] setObjectValue:[NSImage
markImage]];
}
- (IBAction)doZoomIn:(id)sender {
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2024-03-01 15:43:31 UTC (rev 14085)
+++ trunk/SKMainWindowController_UI.m 2024-03-02 15:58:40 UTC (rev 14086)
@@ -441,7 +441,7 @@
if ([tv isEqual:leftSideController.thumbnailTableView]) {
NSTableCellView *view = [tv makeViewWithIdentifier:[tableColumn
identifier] owner:self];
if ([[tableColumn identifier] isEqualToString:PAGE_COLUMNID])
- [[view imageView] setObjectValue:(NSUInteger)row ==
markedPageIndex ? [NSImage markImage] : nil];
+ [[view imageView] setObjectValue:(NSUInteger)row ==
markedPage.pageIndex ? [NSImage markImage] : nil];
return view;
} else if ([tv isEqual:rightSideController.snapshotTableView]) {
return [tv makeViewWithIdentifier:[tableColumn identifier] owner:self];
@@ -1735,12 +1735,12 @@
} else if (action == @selector(doGoForward:)) {
return [pdfView canGoForward];
} else if (action == @selector(goToMarkedPage:)) {
- if (beforeMarkedPageIndex != NSNotFound) {
+ if (beforeMarkedPage.pageIndex != NSNotFound) {
[menuItem setTitle:NSLocalizedString(@"Jump Back From Marked
Page", @"Menu item title")];
return YES;
} else {
[menuItem setTitle:NSLocalizedString(@"Go To Marked Page", @"Menu
item title")];
- return markedPageIndex != NSNotFound && markedPageIndex !=
[[pdfView currentPage] pageIndex];
+ return markedPage.pageIndex != NSNotFound && markedPage.pageIndex
!= [[pdfView currentPage] pageIndex];
}
} else if (action == @selector(markPage:)) {
return [[self pdfDocument] isLocked] == NO;
@@ -1931,8 +1931,8 @@
if ([self hasOverview])
[overviewView scrollRectToVisible:[overviewView
frameForItemAtIndex:pageIndex]];
- if (beforeMarkedPageIndex != NSNotFound && [[pdfView currentPage]
pageIndex] != markedPageIndex)
- beforeMarkedPageIndex = NSNotFound;
+ if (beforeMarkedPage.pageIndex != NSNotFound && [[pdfView currentPage]
pageIndex] != markedPage.pageIndex)
+ beforeMarkedPage.pageIndex = NSNotFound;
[self synchronizeWindowTitleWithDocumentName];
[self updateLeftStatus];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit