You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(23) |
Apr
(254) |
May
(252) |
Jun
(209) |
Jul
(198) |
Aug
(192) |
Sep
(207) |
Oct
(120) |
Nov
(179) |
Dec
(52) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(48) |
Feb
(69) |
Mar
(129) |
Apr
(250) |
May
(113) |
Jun
(177) |
Jul
(228) |
Aug
(155) |
Sep
(218) |
Oct
(185) |
Nov
(109) |
Dec
(88) |
2009 |
Jan
(83) |
Feb
(39) |
Mar
(70) |
Apr
(47) |
May
(48) |
Jun
(67) |
Jul
(61) |
Aug
(97) |
Sep
(221) |
Oct
(141) |
Nov
(70) |
Dec
(61) |
2010 |
Jan
(45) |
Feb
(76) |
Mar
(178) |
Apr
(106) |
May
(57) |
Jun
(32) |
Jul
(64) |
Aug
(98) |
Sep
(96) |
Oct
(19) |
Nov
(34) |
Dec
(117) |
2011 |
Jan
(55) |
Feb
(48) |
Mar
(64) |
Apr
(21) |
May
(39) |
Jun
(53) |
Jul
(99) |
Aug
(56) |
Sep
(39) |
Oct
(26) |
Nov
(19) |
Dec
(69) |
2012 |
Jan
(17) |
Feb
(40) |
Mar
(17) |
Apr
|
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
(10) |
Sep
(10) |
Oct
(38) |
Nov
(48) |
Dec
(70) |
2013 |
Jan
(43) |
Feb
(47) |
Mar
(39) |
Apr
(37) |
May
(25) |
Jun
(6) |
Jul
(20) |
Aug
(49) |
Sep
(33) |
Oct
(34) |
Nov
(75) |
Dec
(6) |
2014 |
Jan
(32) |
Feb
(10) |
Mar
(17) |
Apr
|
May
|
Jun
(26) |
Jul
(5) |
Aug
|
Sep
(4) |
Oct
(23) |
Nov
(80) |
Dec
(48) |
2015 |
Jan
(80) |
Feb
(50) |
Mar
(58) |
Apr
(20) |
May
(11) |
Jun
(16) |
Jul
(24) |
Aug
(27) |
Sep
(56) |
Oct
(30) |
Nov
(16) |
Dec
(6) |
2016 |
Jan
(31) |
Feb
(14) |
Mar
(23) |
Apr
(17) |
May
(40) |
Jun
(12) |
Jul
(17) |
Aug
(9) |
Sep
(32) |
Oct
(36) |
Nov
(23) |
Dec
(9) |
2017 |
Jan
(37) |
Feb
(23) |
Mar
(65) |
Apr
(22) |
May
(6) |
Jun
(3) |
Jul
|
Aug
|
Sep
(3) |
Oct
(22) |
Nov
(63) |
Dec
(71) |
2018 |
Jan
(83) |
Feb
(21) |
Mar
(35) |
Apr
(44) |
May
(14) |
Jun
(12) |
Jul
(8) |
Aug
(18) |
Sep
(10) |
Oct
(145) |
Nov
(144) |
Dec
(76) |
2019 |
Jan
(18) |
Feb
(28) |
Mar
(5) |
Apr
(208) |
May
(291) |
Jun
(158) |
Jul
(27) |
Aug
(8) |
Sep
(10) |
Oct
(83) |
Nov
(41) |
Dec
(31) |
2020 |
Jan
(16) |
Feb
(46) |
Mar
(100) |
Apr
(78) |
May
(69) |
Jun
(71) |
Jul
(28) |
Aug
(131) |
Sep
(176) |
Oct
(89) |
Nov
(147) |
Dec
(19) |
2021 |
Jan
(19) |
Feb
(25) |
Mar
(91) |
Apr
(98) |
May
(14) |
Jun
(44) |
Jul
(8) |
Aug
(3) |
Sep
(38) |
Oct
(57) |
Nov
(97) |
Dec
(74) |
2022 |
Jan
(89) |
Feb
(47) |
Mar
(15) |
Apr
(50) |
May
(54) |
Jun
(56) |
Jul
(80) |
Aug
(12) |
Sep
(11) |
Oct
(60) |
Nov
(48) |
Dec
(4) |
2023 |
Jan
(75) |
Feb
(49) |
Mar
(84) |
Apr
(24) |
May
(13) |
Jun
(74) |
Jul
(32) |
Aug
(66) |
Sep
(50) |
Oct
(38) |
Nov
(105) |
Dec
(181) |
2024 |
Jan
(21) |
Feb
(49) |
Mar
(77) |
Apr
(84) |
May
(20) |
Jun
(71) |
Jul
(53) |
Aug
(33) |
Sep
(54) |
Oct
(124) |
Nov
(151) |
Dec
(73) |
2025 |
Jan
(61) |
Feb
(17) |
Mar
(136) |
Apr
(72) |
May
(200) |
Jun
(238) |
Jul
(91) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ho...@us...> - 2025-06-06 21:33:53
|
Revision: 15391 http://sourceforge.net/p/skim-app/code/15391 Author: hofman Date: 2025-06-06 21:33:50 +0000 (Fri, 06 Jun 2025) Log Message: ----------- check for widgets first Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-06 14:38:22 UTC (rev 15390) +++ trunk/SKMainWindowController.m 2025-06-06 21:33:50 UTC (rev 15391) @@ -1036,16 +1036,16 @@ [self addAnnotationsFromDictionaries:noteDicts toDocument:pdfDoc pageIndexes:pageIndexes autoUpdate:isConvert]; - if (isConvert) { + if (isConvert == NO) { + NSArray *widgetProperties = [noteDicts filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"type = \"Widget\""]]; + if ([widgetProperties count]) + [self changeWidgetsFromDictionaries:widgetProperties]; + } else if ([widgets count]) { NSMapTable *values = [NSMapTable strongToStrongObjectsMapTable]; for (PDFAnnotation *widget in widgets) [values setObject:[widget objectValue] forKey:widget]; if ([values count]) [self setWidgetValues:values]; - } else { - NSArray *widgetProperties = [noteDicts filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"type = \"Widget\""]]; - if ([widgetProperties count]) - [self changeWidgetsFromDictionaries:widgetProperties]; } // make sure we clear the undo handling This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-06 14:38:25
|
Revision: 15390 http://sourceforge.net/p/skim-app/code/15390 Author: hofman Date: 2025-06-06 14:38:22 +0000 (Fri, 06 Jun 2025) Log Message: ----------- update comment, check number of widgets first Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-06 14:20:56 UTC (rev 15389) +++ trunk/SKMainWindowController.m 2025-06-06 14:38:22 UTC (rev 15390) @@ -1008,7 +1008,7 @@ NSMutableIndexSet *pageIndexes = [NSMutableIndexSet indexSet]; if ([notesToRemove count]) { - // notesToRemove is either all notes, no notes, or non Skim notes + // notesToRemove is either [self notes], nil, or non Skim notes if (isConvert == NO) { [pdfView removePDFToolTipRects]; // remove the current annotations @@ -1026,7 +1026,7 @@ if (isConvert == NO) [self removeAllObjectsFromNotes]; } - if (notesToRemove && isConvert == NO) { + if (notesToRemove && isConvert == NO && [widgets count]) { for (PDFAnnotation *widget in widgets) { id origValue = [widgetValues objectForKey:widget]; if ([([widget objectValue] ?: @"") isEqual:(origValue ?: @"")] == NO) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-06 14:21:00
|
Revision: 15389 http://sourceforge.net/p/skim-app/code/15389 Author: hofman Date: 2025-06-06 14:20:56 +0000 (Fri, 06 Jun 2025) Log Message: ----------- initialize line rects for markup notes in class factory method Modified Paths: -------------- trunk/PDFAnnotation_SKExtensions.m trunk/SKMainWindowController.m Modified: trunk/PDFAnnotation_SKExtensions.m =================================================================== --- trunk/PDFAnnotation_SKExtensions.m 2025-06-06 14:14:13 UTC (rev 15388) +++ trunk/PDFAnnotation_SKExtensions.m 2025-06-06 14:20:56 UTC (rev 15389) @@ -139,7 +139,11 @@ } + (PDFAnnotation *)newSkimNoteWithProperties:(NSDictionary *)dict { - return [[SKAnnotationClassForType([dict objectForKey:SKNPDFAnnotationTypeKey]) alloc] initSkimNoteWithProperties:dict]; + PDFAnnotation *annotation = [[SKAnnotationClassForType([dict objectForKey:SKNPDFAnnotationTypeKey]) alloc] initSkimNoteWithProperties:dict]; + // this is only to make sure markup annotations generate the lineRects, for thread safety + if ([annotation isMarkup]) + [annotation boundsOrder]; + return annotation; } + (PDFAnnotation *)newSkimNoteWithSelection:(PDFSelection *)selection forType:(NSString *)type { Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-06 14:14:13 UTC (rev 15388) +++ trunk/SKMainWindowController.m 2025-06-06 14:20:56 UTC (rev 15389) @@ -980,9 +980,6 @@ @autoreleasepool{ PDFAnnotation *annotation = [PDFAnnotation newSkimNoteWithProperties:dict]; if (annotation) { - // this is only to make sure markup annotations generate the lineRects, for thread safety - if ([annotation isMarkup]) - [annotation boundsOrder]; NSUInteger pageIndex = [[dict objectForKey:SKNPDFAnnotationPageIndexKey] unsignedIntegerValue]; if (pageIndex == NSNotFound) pageIndex = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-06 14:14:15
|
Revision: 15388 http://sourceforge.net/p/skim-app/code/15388 Author: hofman Date: 2025-06-06 14:14:13 +0000 (Fri, 06 Jun 2025) Log Message: ----------- handle page navigation for revert during presentation correctly Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-06 09:31:00 UTC (rev 15387) +++ trunk/SKMainWindowController.m 2025-06-06 14:14:13 UTC (rev 15388) @@ -1180,13 +1180,15 @@ dest.pageIndex = [pdfDocument pageCount] - 1; dest.point = SKUnspecifiedPoint; } - if ([pdfDocument isLocked] && ([self interactionMode] == SKNormalMode || [self interactionMode] == SKFullScreenMode)) { + if ([pdfDocument isLocked]) { [savedNormalSetup setObject:[NSNumber numberWithUnsignedInteger:dest.pageIndex] forKey:PAGEINDEX_KEY]; + if ([self interactionMode] == SKPresentationMode) + [presentationView setPage:nil]; + } else if ([self interactionMode] == SKPresentationMode) { + [presentationView setPage:[pdfDocument pageAtIndex:dest.pageIndex]]; } else { [pdfView goToCurrentDestination:dest]; } - if ([self interactionMode] == SKPresentationMode) - [presentationView setPage:[pdfDocument isLocked] ? nil : [pdfDocument pageAtIndex:dest.pageIndex]]; } if (secondaryDest.pageIndex != NSNotFound) { if (secondaryDest.pageIndex >= [pdfDocument pageCount]) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-06 09:31:01
|
Revision: 15387 http://sourceforge.net/p/skim-app/code/15387 Author: hofman Date: 2025-06-06 09:31:00 +0000 (Fri, 06 Jun 2025) Log Message: ----------- update page in presentation view when reverting document Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-06 09:19:05 UTC (rev 15386) +++ trunk/SKMainWindowController.m 2025-06-06 09:31:00 UTC (rev 15387) @@ -1185,6 +1185,8 @@ } else { [pdfView goToCurrentDestination:dest]; } + if ([self interactionMode] == SKPresentationMode) + [presentationView setPage:[pdfDocument isLocked] ? nil : [pdfDocument pageAtIndex:dest.pageIndex]]; } if (secondaryDest.pageIndex != NSNotFound) { if (secondaryDest.pageIndex >= [pdfDocument pageCount]) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-06 09:19:08
|
Revision: 15386 http://sourceforge.net/p/skim-app/code/15386 Author: hofman Date: 2025-06-06 09:19:05 +0000 (Fri, 06 Jun 2025) Log Message: ----------- no need for condition Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-06 09:17:29 UTC (rev 15385) +++ trunk/SKMainWindowController.m 2025-06-06 09:19:05 UTC (rev 15386) @@ -1168,7 +1168,7 @@ [self updateNoteSelection]; if ([snapshotDicts count]) { - if ([pdfDocument isLocked] && ([self interactionMode] != SKPresentationMode)) + if ([pdfDocument isLocked]) [savedNormalSetup setObject:snapshotDicts forKey:SNAPSHOTS_KEY]; else [self showSnapshotsWithSetups:snapshotDicts]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-06 09:17:30
|
Revision: 15385 http://sourceforge.net/p/skim-app/code/15385 Author: hofman Date: 2025-06-06 09:17:29 +0000 (Fri, 06 Jun 2025) Log Message: ----------- SIMPLIFY CONDITION Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-06 08:56:53 UTC (rev 15384) +++ trunk/SKMainWindowController.m 2025-06-06 09:17:29 UTC (rev 15385) @@ -1168,7 +1168,7 @@ [self updateNoteSelection]; if ([snapshotDicts count]) { - if ([pdfDocument isLocked] && ([self interactionMode] == SKNormalMode || [self interactionMode] == SKFullScreenMode)) + if ([pdfDocument isLocked] && ([self interactionMode] != SKPresentationMode)) [savedNormalSetup setObject:snapshotDicts forKey:SNAPSHOTS_KEY]; else [self showSnapshotsWithSetups:snapshotDicts]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-06 08:56:55
|
Revision: 15384 http://sourceforge.net/p/skim-app/code/15384 Author: hofman Date: 2025-06-06 08:56:53 +0000 (Fri, 06 Jun 2025) Log Message: ----------- rearrange notes after adding or removing in bulk Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-06 08:46:58 UTC (rev 15383) +++ trunk/SKMainWindowController.m 2025-06-06 08:56:53 UTC (rev 15384) @@ -1053,6 +1053,7 @@ // make sure we clear the undo handling undoGroupOldPropertiesPerNote = nil; + [rightSideController.noteArrayController rearrangeObjects]; // doesn't seem to be done automatically [rightSideController.noteOutlineView reloadData]; [self updateThumbnailsAtPageIndexes:pageIndexes]; for (SKSnapshotWindowController *wc in snapshots) { @@ -1209,6 +1210,7 @@ // make sure we clear the undo handling undoGroupOldPropertiesPerNote = nil; + [rightSideController.noteArrayController rearrangeObjects]; // doesn't seem to be done automatically [rightSideController.noteOutlineView reloadData]; [pdfView resetPDFToolTipRects]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-06 08:47:00
|
Revision: 15383 http://sourceforge.net/p/skim-app/code/15383 Author: hofman Date: 2025-06-06 08:46:58 +0000 (Fri, 06 Jun 2025) Log Message: ----------- don't check twice Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 22:55:12 UTC (rev 15382) +++ trunk/SKMainWindowController.m 2025-06-06 08:46:58 UTC (rev 15383) @@ -2210,10 +2210,8 @@ if (mwcFlags.addOrRemoveNotesInBulk == 0) { if ([annotation isSkimNote]) { - if ([annotation isSkimNote]) { - [annotation setShouldDisplay:[pdfView hideNotes] == NO]; - [annotation setShouldPrint:[pdfView hideNotes] == NO]; - } + [annotation setShouldDisplay:[pdfView hideNotes] == NO]; + [annotation setShouldPrint:[pdfView hideNotes] == NO]; mwcFlags.updatingNoteSelection = 1; [self insertObject:annotation inNotesAtIndex:[notes count]]; [rightSideController.noteArrayController rearrangeObjects]; // doesn't seem to be done automatically This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 22:55:16
|
Revision: 15382 http://sourceforge.net/p/skim-app/code/15382 Author: hofman Date: 2025-06-05 22:55:12 +0000 (Thu, 05 Jun 2025) Log Message: ----------- No need to check forr page from notifications. Reorganise code to check for bulk once. Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 22:44:19 UTC (rev 15381) +++ trunk/SKMainWindowController.m 2025-06-05 22:55:12 UTC (rev 15382) @@ -2203,36 +2203,34 @@ if (presentationNotes == nil) presentationNotes = [[NSMutableArray alloc] init]; [presentationNotes addObject:annotation]; - if (page) { - [self updateThumbnailAtPageIndex:[page pageIndex]]; - [presentationView setNeedsDisplayForPage:page]; - } + [self updateThumbnailAtPageIndex:[page pageIndex]]; + [presentationView setNeedsDisplayForPage:page]; } else { [[undoManager prepareWithInvocationTarget:[notification object]] removeAnnotation:annotation]; - if ([annotation isSkimNote] && mwcFlags.addOrRemoveNotesInBulk == 0) { + if (mwcFlags.addOrRemoveNotesInBulk == 0) { if ([annotation isSkimNote]) { - [annotation setShouldDisplay:[pdfView hideNotes] == NO]; - [annotation setShouldPrint:[pdfView hideNotes] == NO]; - } - mwcFlags.updatingNoteSelection = 1; - [self insertObject:annotation inNotesAtIndex:[notes count]]; - [rightSideController.noteArrayController rearrangeObjects]; // doesn't seem to be done automatically - mwcFlags.updatingNoteSelection = 0; - [rightSideController.noteOutlineView reloadData]; - } - if (page) { - if (mwcFlags.addOrRemoveNotesInBulk == 0) { - [self updateThumbnailAtPageIndex:[page pageIndex]]; - for (SKSnapshotWindowController *wc in snapshots) { - if ([wc isPageVisible:page]) - [self snapshotNeedsUpdate:wc lowPriority:NO]; + if ([annotation isSkimNote]) { + [annotation setShouldDisplay:[pdfView hideNotes] == NO]; + [annotation setShouldPrint:[pdfView hideNotes] == NO]; } + mwcFlags.updatingNoteSelection = 1; + [self insertObject:annotation inNotesAtIndex:[notes count]]; + [rightSideController.noteArrayController rearrangeObjects]; // doesn't seem to be done automatically + mwcFlags.updatingNoteSelection = 0; + [rightSideController.noteOutlineView reloadData]; } - [secondaryPdfView addedAnnotation:annotation onPage:page]; - if ([self interactionMode] == SKPresentationMode) - [presentationView setNeedsDisplayForPage:page]; + + [self updateThumbnailAtPageIndex:[page pageIndex]]; + for (SKSnapshotWindowController *wc in snapshots) { + if ([wc isPageVisible:page]) + [self snapshotNeedsUpdate:wc lowPriority:NO]; + } } + + [secondaryPdfView addedAnnotation:annotation onPage:page]; + if ([self interactionMode] == SKPresentationMode) + [presentationView setNeedsDisplayForPage:page]; } } @@ -2247,42 +2245,40 @@ [[[self presentationUndoManager] prepareWithInvocationTarget:[notification object]] addAnnotation:annotation toPage:page]; [presentationNotes removeObject:annotation]; - if (page) { - [self updateThumbnailAtPageIndex:[page pageIndex]]; - [presentationView setNeedsDisplayForPage:page]; - } - } else if (page) { [self updateThumbnailAtPageIndex:[page pageIndex]]; + [presentationView setNeedsDisplayForPage:page]; + } else { + [self updateThumbnailAtPageIndex:[page pageIndex]]; } } else { [[undoManager prepareWithInvocationTarget:[notification object]] addAnnotation:annotation toPage:page]; - if ([annotation isSkimNote] && mwcFlags.addOrRemoveNotesInBulk == 0) { - if ([[self selectedNotes] containsObject:annotation]) - [rightSideController.noteOutlineView deselectAll:self]; + if (mwcFlags.addOrRemoveNotesInBulk == 0) { + if ([annotation isSkimNote]) { + if ([[self selectedNotes] containsObject:annotation]) + [rightSideController.noteOutlineView deselectAll:self]; + + [[self windowControllerForNote:annotation] close]; + + mwcFlags.updatingNoteSelection = 1; + NSUInteger i = [notes indexOfObject:annotation]; + if (i != NSNotFound) + [self removeObjectFromNotesAtIndex:i]; + [rightSideController.noteArrayController rearrangeObjects]; // doesn't seem to be done automatically + mwcFlags.updatingNoteSelection = 0; + [rightSideController.noteOutlineView reloadData]; + } - [[self windowControllerForNote:annotation] close]; - - mwcFlags.updatingNoteSelection = 1; - NSUInteger i = [notes indexOfObject:annotation]; - if (i != NSNotFound) - [self removeObjectFromNotesAtIndex:i]; - [rightSideController.noteArrayController rearrangeObjects]; // doesn't seem to be done automatically - mwcFlags.updatingNoteSelection = 0; - [rightSideController.noteOutlineView reloadData]; - } - if (page) { - if (mwcFlags.addOrRemoveNotesInBulk == 0) { - [self updateThumbnailAtPageIndex:[page pageIndex]]; - for (SKSnapshotWindowController *wc in snapshots) { - if ([wc isPageVisible:page]) - [self snapshotNeedsUpdate:wc lowPriority:NO]; - } + [self updateThumbnailAtPageIndex:[page pageIndex]]; + for (SKSnapshotWindowController *wc in snapshots) { + if ([wc isPageVisible:page]) + [self snapshotNeedsUpdate:wc lowPriority:NO]; } - [secondaryPdfView removedAnnotation:annotation onPage:page]; - if ([self interactionMode] == SKPresentationMode) - [presentationView setNeedsDisplayForPage:page]; } + + [secondaryPdfView removedAnnotation:annotation onPage:page]; + if ([self interactionMode] == SKPresentationMode) + [presentationView setNeedsDisplayForPage:page]; } } @@ -2294,23 +2290,20 @@ [[[[self document] undoManager] prepareWithInvocationTarget:[notification object]] moveAnnotation:annotation toPage:oldPage]; - if (oldPage || newPage) { - if (oldPage) - [self updateThumbnailAtPageIndex:[oldPage pageIndex]]; - if (newPage) - [self updateThumbnailAtPageIndex:[newPage pageIndex]]; - for (SKSnapshotWindowController *wc in snapshots) { - if ([wc isPageVisible:oldPage] || [wc isPageVisible:newPage]) - [self snapshotNeedsUpdate:wc lowPriority:NO]; - } - [secondaryPdfView removedAnnotation:annotation onPage:oldPage]; - [secondaryPdfView addedAnnotation:annotation onPage:newPage]; - if ([self interactionMode] == SKPresentationMode) { - [presentationView setNeedsDisplayForPage:oldPage]; - [presentationView setNeedsDisplayForPage:newPage]; - } + [self updateThumbnailAtPageIndex:[oldPage pageIndex]]; + [self updateThumbnailAtPageIndex:[newPage pageIndex]]; + for (SKSnapshotWindowController *wc in snapshots) { + if ([wc isPageVisible:oldPage] || [wc isPageVisible:newPage]) + [self snapshotNeedsUpdate:wc lowPriority:NO]; } + [secondaryPdfView removedAnnotation:annotation onPage:oldPage]; + [secondaryPdfView addedAnnotation:annotation onPage:newPage]; + if ([self interactionMode] == SKPresentationMode) { + [presentationView setNeedsDisplayForPage:oldPage]; + [presentationView setNeedsDisplayForPage:newPage]; + } + [rightSideController.noteArrayController rearrangeObjects]; [rightSideController.noteOutlineView reloadData]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 22:44:21
|
Revision: 15381 http://sourceforge.net/p/skim-app/code/15381 Author: hofman Date: 2025-06-05 22:44:19 +0000 (Thu, 05 Jun 2025) Log Message: ----------- update thumbnails and snapshots in bulk when adding or removing notes in bulk Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 22:28:30 UTC (rev 15380) +++ trunk/SKMainWindowController.m 2025-06-05 22:44:19 UTC (rev 15381) @@ -1055,6 +1055,15 @@ undoGroupOldPropertiesPerNote = nil; [rightSideController.noteOutlineView reloadData]; [self updateThumbnailsAtPageIndexes:pageIndexes]; + for (SKSnapshotWindowController *wc in snapshots) { + [pageIndexes enumerateIndexesUsingBlock:^(NSUInteger i, BOOL *stop){ + PDFPage *page = [pdfDoc pageAtIndex:i]; + if ([wc isPageVisible:page]) { + [self snapshotNeedsUpdate:wc lowPriority:NO]; + *stop = YES; + } + }]; + } [pdfView resetPDFToolTipRects]; } @@ -2213,10 +2222,12 @@ [rightSideController.noteOutlineView reloadData]; } if (page) { - [self updateThumbnailAtPageIndex:[page pageIndex]]; - for (SKSnapshotWindowController *wc in snapshots) { - if ([wc isPageVisible:page]) - [self snapshotNeedsUpdate:wc lowPriority:NO]; + if (mwcFlags.addOrRemoveNotesInBulk == 0) { + [self updateThumbnailAtPageIndex:[page pageIndex]]; + for (SKSnapshotWindowController *wc in snapshots) { + if ([wc isPageVisible:page]) + [self snapshotNeedsUpdate:wc lowPriority:NO]; + } } [secondaryPdfView addedAnnotation:annotation onPage:page]; if ([self interactionMode] == SKPresentationMode) @@ -2261,10 +2272,12 @@ [rightSideController.noteOutlineView reloadData]; } if (page) { - [self updateThumbnailAtPageIndex:[page pageIndex]]; - for (SKSnapshotWindowController *wc in snapshots) { - if ([wc isPageVisible:page]) - [self snapshotNeedsUpdate:wc lowPriority:NO]; + if (mwcFlags.addOrRemoveNotesInBulk == 0) { + [self updateThumbnailAtPageIndex:[page pageIndex]]; + for (SKSnapshotWindowController *wc in snapshots) { + if ([wc isPageVisible:page]) + [self snapshotNeedsUpdate:wc lowPriority:NO]; + } } [secondaryPdfView removedAnnotation:annotation onPage:page]; if ([self interactionMode] == SKPresentationMode) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 22:28:33
|
Revision: 15380 http://sourceforge.net/p/skim-app/code/15380 Author: hofman Date: 2025-06-05 22:28:30 +0000 (Thu, 05 Jun 2025) Log Message: ----------- no need to set shouldDisplay an dshouldPrint for notes added in bulk Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 21:37:13 UTC (rev 15379) +++ trunk/SKMainWindowController.m 2025-06-05 22:28:30 UTC (rev 15380) @@ -2201,11 +2201,11 @@ } else { [[undoManager prepareWithInvocationTarget:[notification object]] removeAnnotation:annotation]; - if ([annotation isSkimNote]) { - [annotation setShouldDisplay:[pdfView hideNotes] == NO]; - [annotation setShouldPrint:[pdfView hideNotes] == NO]; - } if ([annotation isSkimNote] && mwcFlags.addOrRemoveNotesInBulk == 0) { + if ([annotation isSkimNote]) { + [annotation setShouldDisplay:[pdfView hideNotes] == NO]; + [annotation setShouldPrint:[pdfView hideNotes] == NO]; + } mwcFlags.updatingNoteSelection = 1; [self insertObject:annotation inNotesAtIndex:[notes count]]; [rightSideController.noteArrayController rearrangeObjects]; // doesn't seem to be done automatically This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 21:37:19
|
Revision: 15379 http://sourceforge.net/p/skim-app/code/15379 Author: hofman Date: 2025-06-05 21:37:13 +0000 (Thu, 05 Jun 2025) Log Message: ----------- don't fdade out old window state Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-06-05 21:22:54 UTC (rev 15378) +++ trunk/SKMainWindowController_FullScreen.m 2025-06-05 21:37:13 UTC (rev 15379) @@ -635,7 +635,6 @@ [context setDuration:duration]; [context setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; [[window animator] setAlphaValue:1.0]; - [[displayWindow animator] setAlphaValue:0.0]; } completionHandler:^{ [displayWindow orderOut:nil]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 21:22:59
|
Revision: 15378 http://sourceforge.net/p/skim-app/code/15378 Author: hofman Date: 2025-06-05 21:22:54 +0000 (Thu, 05 Jun 2025) Log Message: ----------- only save normal setup when in normal mode Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 21:21:45 UTC (rev 15377) +++ trunk/SKMainWindowController.m 2025-06-05 21:22:54 UTC (rev 15378) @@ -1120,8 +1120,9 @@ [oldPdfDoc setContainingDocument:nil]; - if ([pdfDocument isLocked] && [oldPdfDoc isLocked] == NO && [self interactionMode] == SKNormalMode) { - [savedNormalSetup setDictionary:[pdfView displaySettings]]; + if ([pdfDocument isLocked] && [oldPdfDoc isLocked] == NO) { + if ([self interactionMode] == SKNormalMode) + [savedNormalSetup setDictionary:[pdfView displaySettings]]; [savedNormalSetup setObject:@YES forKey:LOCKED_KEY]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 21:21:51
|
Revision: 15377 http://sourceforge.net/p/skim-app/code/15377 Author: hofman Date: 2025-06-05 21:21:45 +0000 (Thu, 05 Jun 2025) Log Message: ----------- only save normal setup when in normal mode Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 16:18:23 UTC (rev 15376) +++ trunk/SKMainWindowController.m 2025-06-05 21:21:45 UTC (rev 15377) @@ -1120,7 +1120,7 @@ [oldPdfDoc setContainingDocument:nil]; - if ([pdfDocument isLocked] && [oldPdfDoc isLocked] == NO) { + if ([pdfDocument isLocked] && [oldPdfDoc isLocked] == NO && [self interactionMode] == SKNormalMode) { [savedNormalSetup setDictionary:[pdfView displaySettings]]; [savedNormalSetup setObject:@YES forKey:LOCKED_KEY]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 16:18:26
|
Revision: 15376 http://sourceforge.net/p/skim-app/code/15376 Author: hofman Date: 2025-06-05 16:18:23 +0000 (Thu, 05 Jun 2025) Log Message: ----------- Set savedNormalSetup and locked flag when reverting an unlocked PDFDocument to a locked one Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 16:09:30 UTC (rev 15375) +++ trunk/SKMainWindowController.m 2025-06-05 16:18:23 UTC (rev 15376) @@ -1119,6 +1119,11 @@ [oldPdfDoc setDelegate:nil]; [oldPdfDoc setContainingDocument:nil]; + + if ([pdfDocument isLocked] && [oldPdfDoc isLocked] == NO) { + [savedNormalSetup setDictionary:[pdfView displaySettings]]; + [savedNormalSetup setObject:@YES forKey:LOCKED_KEY]; + } } if ([pdfDocument isLocked] == NO) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 16:09:32
|
Revision: 15375 http://sourceforge.net/p/skim-app/code/15375 Author: hofman Date: 2025-06-05 16:09:30 +0000 (Thu, 05 Jun 2025) Log Message: ----------- only need to remove locked flag when not removing all Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 15:58:49 UTC (rev 15374) +++ trunk/SKMainWindowController.m 2025-06-05 16:09:30 UTC (rev 15375) @@ -2069,6 +2069,8 @@ if ([self interactionMode] == SKNormalMode) [savedNormalSetup removeAllObjects]; + else + [savedNormalSetup removeObjectForKey:LOCKED_KEY]; // somehow the password field remains first responder after it has been removed if ([[[self window] firstResponder] isKindOfClass:[NSTextView class]] && [[(NSTextView *)[[self window] firstResponder] delegate] isKindOfClass:[NSSecureTextField class]] ) @@ -2076,6 +2078,8 @@ } - (void)documentDidUnlock:(NSNotification *)notification { + BOOL wasLocked = [[savedNormalSetup objectForKey:LOCKED_KEY] boolValue]; + if (placeholderPdfDocument && [[self pdfDocument] allowsNotes]) { PDFDocument *pdfDoc = [self pdfDocument]; NSMutableIndexSet *pageIndexes = [NSMutableIndexSet indexSet]; @@ -2091,7 +2095,7 @@ placeholderPdfDocument = nil; [pdfView setNeedsDisplay:YES]; [rightSideController.noteArrayController rearrangeObjects]; - if ([[savedNormalSetup objectForKey:LOCKED_KEY] boolValue] == NO) { + if (wasLocked == NO) { [rightSideController.noteOutlineView reloadData]; [self updateThumbnailsAtPageIndexes:pageIndexes]; } @@ -2106,11 +2110,9 @@ placeholderWidgetProperties = nil; } - if ([[savedNormalSetup objectForKey:LOCKED_KEY] boolValue]) { + if (wasLocked) { [self updatePageLabelsAndOutlineForExpansionState:nil]; - [savedNormalSetup removeObjectForKey:LOCKED_KEY]; - // when the PDF was locked, PDFView resets the display settings, so we need to reapply them, however if we don't delay it's reset again immediately [self performSelector:@selector(documentDidUnlockDelayed) withObject:nil afterDelay:0.0]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 15:58:51
|
Revision: 15374 http://sourceforge.net/p/skim-app/code/15374 Author: hofman Date: 2025-06-05 15:58:49 +0000 (Thu, 05 Jun 2025) Log Message: ----------- remove locked setting in normal setup when unlocking. Noo need to check interactionMode, as unlocking can never happen in presentation mode. Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 15:42:42 UTC (rev 15373) +++ trunk/SKMainWindowController.m 2025-06-05 15:58:49 UTC (rev 15374) @@ -2109,9 +2109,10 @@ if ([[savedNormalSetup objectForKey:LOCKED_KEY] boolValue]) { [self updatePageLabelsAndOutlineForExpansionState:nil]; + [savedNormalSetup removeObjectForKey:LOCKED_KEY]; + // when the PDF was locked, PDFView resets the display settings, so we need to reapply them, however if we don't delay it's reset again immediately - if ([self interactionMode] == SKNormalMode || [self interactionMode] == SKFullScreenMode) - [self performSelector:@selector(documentDidUnlockDelayed) withObject:nil afterDelay:0.0]; + [self performSelector:@selector(documentDidUnlockDelayed) withObject:nil afterDelay:0.0]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 15:42:45
|
Revision: 15373 http://sourceforge.net/p/skim-app/code/15373 Author: hofman Date: 2025-06-05 15:42:42 +0000 (Thu, 05 Jun 2025) Log Message: ----------- Fade out old window screenshot when going into full screen Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-06-05 15:34:23 UTC (rev 15372) +++ trunk/SKMainWindowController_FullScreen.m 2025-06-05 15:42:42 UTC (rev 15373) @@ -635,6 +635,7 @@ [context setDuration:duration]; [context setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; [[window animator] setAlphaValue:1.0]; + [[displayWindow animator] setAlphaValue:0.0]; } completionHandler:^{ [displayWindow orderOut:nil]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 15:34:26
|
Revision: 15372 http://sourceforge.net/p/skim-app/code/15372 Author: hofman Date: 2025-06-05 15:34:23 +0000 (Thu, 05 Jun 2025) Log Message: ----------- Zoom window when using maximized window option. Zoom later, so we can override option by setting from PDF. Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 14:41:23 UTC (rev 15371) +++ trunk/SKMainWindowController.m 2025-06-05 15:34:23 UTC (rev 15372) @@ -398,8 +398,6 @@ NSString *rectString = [savedNormalSetup objectForKey:MAINWINDOWFRAME_KEY]; if (rectString) [window setFrame:NSRectFromString(rectString) display:NO]; - } else if (windowSizeOption == SKWindowOptionMaximize) { - [window setFrame:[[NSScreen mainScreen] visibleFrame] display:NO]; } // Set up the PDF @@ -442,11 +440,15 @@ NSDictionary *initialSettings = [[self pdfDocument] initialSettings]; if (initialSettings) { [pdfView setDisplaySettings:initialSettings]; - if ([initialSettings objectForKey:@"fitWindow"]) - windowSizeOption = [[initialSettings objectForKey:@"fitWindow"] boolValue] ? SKWindowOptionFit : SKWindowOptionDefault; + if ([initialSettings objectForKey:@"fitWindow"] && [[initialSettings objectForKey:@"fitWindow"] boolValue]) + windowSizeOption = SKWindowOptionFit; } } + if (windowSizeOption == SKWindowOptionMaximize && hasWindowSetup == NO) { + [window zoom:self]; + } + // Go to page? NSNumber *pageNumber = [savedNormalSetup objectForKey:PAGEINDEX_KEY]; NSUInteger pageIndex = NSNotFound; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 14:41:26
|
Revision: 15371 http://sourceforge.net/p/skim-app/code/15371 Author: hofman Date: 2025-06-05 14:41:23 +0000 (Thu, 05 Jun 2025) Log Message: ----------- compare snapshots only by page and rect Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 14:20:02 UTC (rev 15370) +++ trunk/SKMainWindowController.m 2025-06-05 14:41:23 UTC (rev 15371) @@ -291,7 +291,7 @@ return [setups2 count] ? setups2 : nil; else if ([setups2 count] == 0) return setups1; - NSArray *keys = @[@"pageIndex", @"rect", @"scaleFactor", @"autoFits"]; + NSArray *keys = @[@"page", @"rect"]; NSMutableSet *set = [NSMutableSet set]; NSMutableArray *setups = [NSMutableArray arrayWithArray:setups1]; for (NSDictionary *setup in setups1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 14:20:05
|
Revision: 15370 http://sourceforge.net/p/skim-app/code/15370 Author: hofman Date: 2025-06-05 14:20:02 +0000 (Thu, 05 Jun 2025) Log Message: ----------- Add non-duplicate snapshot setups when opening with both setup bookmark and last open snapshots, compare using only relevant properties. Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-05 09:20:15 UTC (rev 15369) +++ trunk/SKMainWindowController.m 2025-06-05 14:20:02 UTC (rev 15370) @@ -286,6 +286,24 @@ [self setPresentationNotesDocument:nil]; } +static NSArray *mergedSnapshotSetups(NSArray *setups1, NSArray *setups2) { + if ([setups1 count] == 0) + return [setups2 count] ? setups2 : nil; + else if ([setups2 count] == 0) + return setups1; + NSArray *keys = @[@"pageIndex", @"rect", @"scaleFactor", @"autoFits"]; + NSMutableSet *set = [NSMutableSet set]; + NSMutableArray *setups = [NSMutableArray arrayWithArray:setups1]; + for (NSDictionary *setup in setups1) + [set addObject:[setup dictionaryWithValuesForKeys:keys]]; + for (NSDictionary *setup in setups2) { + if ([set containsObject:[setup dictionaryWithValuesForKeys:keys]] == NO) + [setups addObject:setup]; + } + return setups; + +} + - (void)windowDidLoad{ // savedNormalSetup can contain pageIndex and snapshots from non-setup bnookmarks BOOL hasWindowSetup = [savedNormalSetup count] > 2; @@ -468,8 +486,8 @@ // Open snapshots? NSArray *snapshotSetups = [savedNormalSetup objectForKey:SNAPSHOTS_KEY]; - if (snapshotSetups == nil && [sud boolForKey:SKRememberSnapshotsKey]) - snapshotSetups = [[SKBookmarkController sharedBookmarkController] snapshotsForRecentDocumentAtURL:[doc fileURL]]; + if ([sud boolForKey:SKRememberSnapshotsKey]) + snapshotSetups = mergedSnapshotSetups(snapshotSetups, [[SKBookmarkController sharedBookmarkController] snapshotsForRecentDocumentAtURL:[doc fileURL]]); if ([snapshotSetups count]) { if ([[pdfView document] isLocked]) [savedNormalSetup setObject:snapshotSetups forKey:SNAPSHOTS_KEY]; @@ -571,8 +589,8 @@ if ([[pdfView document] isLocked]) { NSArray *snapshotSetups = [savedNormalSetup objectForKey:SNAPSHOTS_KEY]; [savedNormalSetup addEntriesFromDictionary:setup]; - if ([snapshotSetups count] && [snapshotSetups isEqualToArray:[setup objectForKey:SNAPSHOTS_KEY]] == NO) - [savedNormalSetup setObject:[snapshotSetups arrayByAddingObjectsFromArray:[setup objectForKey:SNAPSHOTS_KEY]] forKey:SNAPSHOTS_KEY]; + if ([snapshotSetups count]) + [savedNormalSetup setObject:mergedSnapshotSetups(snapshotSetups, [setup objectForKey:SNAPSHOTS_KEY]) forKey:SNAPSHOTS_KEY]; } else { if ([self interactionMode] != SKNormalMode) { [savedNormalSetup addEntriesFromDictionary:setup]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 09:20:16
|
Revision: 15369 http://sourceforge.net/p/skim-app/code/15369 Author: hofman Date: 2025-06-05 09:20:15 +0000 (Thu, 05 Jun 2025) Log Message: ----------- Do not show docked snapshot windows when reopening an open document Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-05 09:14:44 UTC (rev 15368) +++ trunk/SKMainDocument.m 2025-06-05 09:20:15 UTC (rev 15369) @@ -220,12 +220,15 @@ } - (void)showWindows{ - BOOL wasVisible = [[self mainWindowController] isWindowLoaded] && [[[self mainWindowController] window] isVisible]; - - [super showWindows]; - - if (wasVisible == NO) + if ([[self mainWindowController] isWindowLoaded] && [[[self mainWindowController] window] isVisible]) { + for (NSWindowController *wc in [self windowControllers]) { + if ([[wc window] isVisible]) + [wc showWindow:nil]; + } + } else { + [super showWindows]; [[NSNotificationCenter defaultCenter] postNotificationName:SKDocumentDidShowNotification object:self]; + } } - (void)removeWindowController:(NSWindowController *)windowController { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-05 09:14:47
|
Revision: 15368 http://sourceforge.net/p/skim-app/code/15368 Author: hofman Date: 2025-06-05 09:14:44 +0000 (Thu, 05 Jun 2025) Log Message: ----------- Set pageindex and snapshots from non-setup bookmarks, if available, before opening document, so it can be applied on opening Modified Paths: -------------- trunk/SKDocumentController.m trunk/SKMainWindowController.m Modified: trunk/SKDocumentController.m =================================================================== --- trunk/SKDocumentController.m 2025-06-04 14:52:15 UTC (rev 15367) +++ trunk/SKDocumentController.m 2025-06-05 09:14:44 UTC (rev 15368) @@ -415,22 +415,17 @@ NSURL *fileURL = [bookmark fileURLToOpen]; if (fileURL && [fileURL checkResourceIsReachableAndReturnError:NULL] && NO == [fileURL isTrashedFileURL]) { - BOOL hasSetup = [bookmark hasSetup]; NSDictionary *setup = nil; - if (hasSetup) + if ([bookmark hasSetup]) setup = [bookmark properties]; else if ([bookmark pageIndex] != NSNotFound) setup = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:[bookmark pageIndex]], @"pageIndex", [bookmark snapshots], @"snapshots", nil]; - [self openDocumentWithContentsOfURL:fileURL display:hasSetup == NO completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error){ + [self openDocumentWithContentsOfURL:fileURL display:setup == nil completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error){ if (document && setup) { - if (hasSetup) { - if (documentWasAlreadyOpen == NO) - [document makeWindowControllers]; - [document applySetup:setup]; - [document showWindows]; - } else { - [document applySetup:setup]; - } + if (documentWasAlreadyOpen == NO) + [document makeWindowControllers]; + [document applySetup:setup]; + [document showWindows]; } if (completionHandler) completionHandler(document, documentWasAlreadyOpen, error); Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-04 14:52:15 UTC (rev 15367) +++ trunk/SKMainWindowController.m 2025-06-05 09:14:44 UTC (rev 15368) @@ -287,10 +287,11 @@ } - (void)windowDidLoad{ - NSUserDefaults *sud = [NSUserDefaults standardUserDefaults]; - BOOL hasWindowSetup = [savedNormalSetup count] > 0; + // savedNormalSetup can contain pageIndex and snapshots from non-setup bnookmarks + BOOL hasWindowSetup = [savedNormalSetup count] > 2; NSWindow *window = [self window]; NSDocument *doc = [self document]; + NSUserDefaults *sud = [NSUserDefaults standardUserDefaults]; mwcFlags.needsCleanup = 0; @@ -429,10 +430,11 @@ } // Go to page? + NSNumber *pageNumber = [savedNormalSetup objectForKey:PAGEINDEX_KEY]; NSUInteger pageIndex = NSNotFound; NSString *pointString = nil; - if (hasWindowSetup) { - pageIndex = [[savedNormalSetup objectForKey:PAGEINDEX_KEY] unsignedIntegerValue]; + if (pageNumber) { + pageIndex = [pageNumber unsignedIntegerValue]; pointString = [savedNormalSetup objectForKey:SCROLLPOINT_KEY]; } else if ([sud boolForKey:SKRememberLastPageViewedKey]) { pageIndex = [[SKBookmarkController sharedBookmarkController] pageIndexForRecentDocumentAtURL:[doc fileURL]]; @@ -465,10 +467,8 @@ } // Open snapshots? - NSArray *snapshotSetups = nil; - if (hasWindowSetup) - snapshotSetups = [savedNormalSetup objectForKey:SNAPSHOTS_KEY]; - else if ([sud boolForKey:SKRememberSnapshotsKey]) + NSArray *snapshotSetups = [savedNormalSetup objectForKey:SNAPSHOTS_KEY]; + if (snapshotSetups == nil && [sud boolForKey:SKRememberSnapshotsKey]) snapshotSetups = [[SKBookmarkController sharedBookmarkController] snapshotsForRecentDocumentAtURL:[doc fileURL]]; if ([snapshotSetups count]) { if ([[pdfView document] isLocked]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-04 14:52:18
|
Revision: 15367 http://sourceforge.net/p/skim-app/code/15367 Author: hofman Date: 2025-06-04 14:52:15 +0000 (Wed, 04 Jun 2025) Log Message: ----------- remove keys at once, make variable more local Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-04 14:35:45 UTC (rev 15366) +++ trunk/SKMainDocument.m 2025-06-04 14:52:15 UTC (rev 15367) @@ -251,14 +251,12 @@ } - (void)applyOptions:(NSDictionary *)options { - SKPDFView *pdfView = [self pdfView]; NSInteger page = [[options objectForKey:@"page"] integerValue]; NSString *searchString = [options objectForKey:@"search"]; NSMutableDictionary *settings = [options mutableCopy]; - [settings removeObjectForKey:@"page"]; - [settings removeObjectForKey:@"point"]; - [settings removeObjectForKey:@"search"]; + [settings removeObjectsForKeys:@[@"page", @"point", @"search"]]; if ([settings count]) { + SKPDFView *pdfView = [self pdfView]; if (page == 0 && [[pdfView currentPage] pageIndex] > 0) [pdfView setDisplaySettingsAndRewind:settings]; else @@ -265,6 +263,7 @@ [pdfView setDisplaySettings:settings]; } if (page > 0) { + SKPDFView *pdfView = [self pdfView]; page = MIN(page, (NSInteger)[[pdfView document] pageCount]); NSString *pointString = [options objectForKey:@"point"]; if ([pointString length] > 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |