Revision: 4763
http://skim-app.svn.sourceforge.net/skim-app/?rev=4763&view=rev
Author: hofman
Date: 2008-10-08 14:54:38 +0000 (Wed, 08 Oct 2008)
Log Message:
-----------
small changes to reopening snapshots
Modified Paths:
--------------
trunk/SKMainWindowController.h
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h 2008-10-08 14:47:54 UTC (rev 4762)
+++ trunk/SKMainWindowController.h 2008-10-08 14:54:38 UTC (rev 4763)
@@ -338,7 +338,7 @@
- (IBAction)toggleWholeWordSearch:(id)sender;
- (void)showSnapshotAtPageNumber:(int)pageNum forRect:(NSRect)rect
scaleFactor:(float)scaleFactor autoFits:(BOOL)autoFits;
-- (void)showSnapshotWithSetups:(NSArray *)setups;
+- (void)showSnapshotsWithSetups:(NSArray *)setups;
- (void)showNote:(PDFAnnotation *)annotation;
- (SKPDFView *)pdfView;
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2008-10-08 14:47:54 UTC (rev 4762)
+++ trunk/SKMainWindowController.m 2008-10-08 14:54:38 UTC (rev 4763)
@@ -508,10 +508,13 @@
[self performFit:self];
// Open snapshots?
- if (hasWindowSetup && [savedNormalSetup
objectForKey:SKMainWindowSnapshotsKey])
- [self showSnapshotWithSetups:[savedNormalSetup
objectForKey:SKMainWindowSnapshotsKey]];
+ NSArray *snapshotSetups = nil;
+ if (hasWindowSetup)
+ snapshotSetups = [savedNormalSetup
objectForKey:SKMainWindowSnapshotsKey];
else if ([sud boolForKey:SKRememberSnapshotsKey])
- [self showSnapshotWithSetups:[[SKBookmarkController
sharedBookmarkController] snapshotsAtPath:[[[self document] fileURL] path]]];
+ snapshotSetups = [[SKBookmarkController sharedBookmarkController]
snapshotsAtPath:[[[self document] fileURL] path]];
+ if ([snapshotSetups count])
+ [self showSnapshotWithSetups:snapshotSetups];
// typeSelectHelpers
SKTypeSelectHelper *typeSelectHelper = [[[SKTypeSelectHelper alloc] init]
autorelease];
@@ -565,7 +568,8 @@
[setup setObject:[NSNumber numberWithFloat:[self leftSidePaneIsOpen] ?
NSWidth([leftSideContentView frame]) : 0.0]
forKey:SKMainWindowLeftSidePaneWidthKey];
[setup setObject:[NSNumber numberWithFloat:[self rightSidePaneIsOpen] ?
NSWidth([rightSideContentView frame]) : 0.0]
forKey:SKMainWindowRightSidePaneWidthKey];
[setup setObject:[NSNumber numberWithUnsignedInt:[[pdfView currentPage]
pageIndex]] forKey:SKMainWindowPageIndexKey];
- [setup setObject:[NSNumber numberWithUnsignedInt:[snapshots
valueForKey:SKSnapshotCurrentSetupKey] forKey:SKMainWindowSnapshotsKey];
+ if ([snapshots count])
+ [setup setObject:[snapshots valueForKey:SKSnapshotCurrentSetupKey]
forKey:SKMainWindowSnapshotsKey];
if ([self isFullScreen] || [self isPresentation]) {
[setup addEntriesFromDictionary:savedNormalSetup];
[setup removeObjectsForKeys:[NSArray
arrayWithObjects:SKMainWindowHasHorizontalScrollerKey,
SKMainWindowHasVerticalScrollerKey, SKMainWindowAutoHidesScrollersKey, nil]];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit