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-11 16:04:26
|
Revision: 15441 http://sourceforge.net/p/skim-app/code/15441 Author: hofman Date: 2025-06-11 16:04:25 +0000 (Wed, 11 Jun 2025) Log Message: ----------- make sure document is not in presentation mode when reverting Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-11 15:54:26 UTC (rev 15440) +++ trunk/SKMainDocument.m 2025-06-11 16:04:25 UTC (rev 15441) @@ -1009,6 +1009,9 @@ NSWindow *modalwindow = nil; NSModalSession session; + if ([[self mainWindowController] canExitPresentation]) + [[self mainWindowController] exitPresentation]; + if ([mainWindow attachedSheet] == nil && [mainWindow isMainWindow]) { modalwindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:NSZeroRect]; [(SKApplication *)NSApp setUserAttentionDisabled:YES]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-11 15:54:29
|
Revision: 15440 http://sourceforge.net/p/skim-app/code/15440 Author: hofman Date: 2025-06-11 15:54:26 +0000 (Wed, 11 Jun 2025) Log Message: ----------- delay exiting presentation when reverting to a locked document to allow blocking sheet to be removed Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-11 15:35:55 UTC (rev 15439) +++ trunk/SKMainWindowController.m 2025-06-11 15:54:26 UTC (rev 15440) @@ -1119,6 +1119,8 @@ if ([pdfDocument isLocked]) { if ([self interactionMode] == SKNormalMode) [savedNormalSetup setDictionary:[pdfView displaySettings]]; + else if ([self canExitPresentation]) + [self performSelector:@selector(exitPresentation) withObject:nil afterDelay:0.0]; [savedNormalSetup setObject:@YES forKey:LOCKED_KEY]; } else [self performSelector:@selector(documentDidUnlockDelayed) withObject:nil afterDelay:0.0]; @@ -1233,9 +1235,6 @@ undoGroupOldPropertiesPerNote = nil; [rightSideController.noteOutlineView reloadData]; [pdfView resetPDFToolTipRects]; - - if ([self canExitPresentation] && [pdfDocument isLocked]) - [self exitPresentation]; } #pragma mark Accessors This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-11 15:35:56
|
Revision: 15439 http://sourceforge.net/p/skim-app/code/15439 Author: hofman Date: 2025-06-11 15:35:55 +0000 (Wed, 11 Jun 2025) Log Message: ----------- check whether we can exit presentation before doing so Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-11 15:32:41 UTC (rev 15438) +++ trunk/SKMainWindowController.m 2025-06-11 15:35:55 UTC (rev 15439) @@ -1234,7 +1234,7 @@ [rightSideController.noteOutlineView reloadData]; [pdfView resetPDFToolTipRects]; - if ([self interactionMode] == SKPresentationMode && [pdfDocument isLocked]) + if ([self canExitPresentation] && [pdfDocument isLocked]) [self exitPresentation]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-11 15:32:44
|
Revision: 15438 http://sourceforge.net/p/skim-app/code/15438 Author: hofman Date: 2025-06-11 15:32:41 +0000 (Wed, 11 Jun 2025) Log Message: ----------- check for changed of isLocked first Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-11 14:59:33 UTC (rev 15437) +++ trunk/SKMainWindowController.m 2025-06-11 15:32:41 UTC (rev 15438) @@ -1115,12 +1115,13 @@ [oldPdfDoc setContainingDocument:nil]; - if ([pdfDocument isLocked] && [oldPdfDoc isLocked] == NO) { - if ([self interactionMode] == SKNormalMode) - [savedNormalSetup setDictionary:[pdfView displaySettings]]; - [savedNormalSetup setObject:@YES forKey:LOCKED_KEY]; - } else if ([pdfDocument isLocked] == NO && [oldPdfDoc isLocked]) { - [self performSelector:@selector(documentDidUnlockDelayed) withObject:nil afterDelay:0.0]; + if ([pdfDocument isLocked] != [oldPdfDoc isLocked]) { + if ([pdfDocument isLocked]) { + if ([self interactionMode] == SKNormalMode) + [savedNormalSetup setDictionary:[pdfView displaySettings]]; + [savedNormalSetup setObject:@YES forKey:LOCKED_KEY]; + } else + [self performSelector:@selector(documentDidUnlockDelayed) withObject:nil afterDelay:0.0]; } 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-11 14:59:36
|
Revision: 15437 http://sourceforge.net/p/skim-app/code/15437 Author: hofman Date: 2025-06-11 14:59:33 +0000 (Wed, 11 Jun 2025) Log Message: ----------- declare method, add braces Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-11 14:56:31 UTC (rev 15436) +++ trunk/SKMainWindowController.m 2025-06-11 14:59:33 UTC (rev 15437) @@ -206,6 +206,8 @@ - (void)clearWidgets; +- (void)documentDidUnlockDelayed; + @end @@ -1117,8 +1119,9 @@ if ([self interactionMode] == SKNormalMode) [savedNormalSetup setDictionary:[pdfView displaySettings]]; [savedNormalSetup setObject:@YES forKey:LOCKED_KEY]; - } else if ([pdfDocument isLocked] == NO && [oldPdfDoc isLocked]) + } else if ([pdfDocument isLocked] == NO && [oldPdfDoc isLocked]) { [self performSelector:@selector(documentDidUnlockDelayed) withObject:nil afterDelay:0.0]; + } if ([self interactionMode] == SKPresentationMode) [presentationView setPage:nil]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-11 14:56:35
|
Revision: 15436 http://sourceforge.net/p/skim-app/code/15436 Author: hofman Date: 2025-06-11 14:56:31 +0000 (Wed, 11 Jun 2025) Log Message: ----------- apply saved settings when reverting a locked pdf document to an unlocked one Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-11 14:47:33 UTC (rev 15435) +++ trunk/SKMainWindowController.m 2025-06-11 14:56:31 UTC (rev 15436) @@ -1117,7 +1117,8 @@ if ([self interactionMode] == SKNormalMode) [savedNormalSetup setDictionary:[pdfView displaySettings]]; [savedNormalSetup setObject:@YES forKey:LOCKED_KEY]; - } + } else if ([pdfDocument isLocked] == NO && [oldPdfDoc isLocked]) + [self performSelector:@selector(documentDidUnlockDelayed) withObject:nil afterDelay:0.0]; if ([self interactionMode] == SKPresentationMode) [presentationView setPage:nil]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-11 14:47:35
|
Revision: 15435 http://sourceforge.net/p/skim-app/code/15435 Author: hofman Date: 2025-06-11 14:47:33 +0000 (Wed, 11 Jun 2025) Log Message: ----------- Set page to nil when reloading doucment during presentation to clear predrawn images. Save scroll point when new document is locked. Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-11 14:27:36 UTC (rev 15434) +++ trunk/SKMainWindowController.m 2025-06-11 14:47:33 UTC (rev 15435) @@ -1096,6 +1096,7 @@ [self removeAllObjectsFromNotes]; [self setThumbnails:@[]]; [self clearWidgets]; + placeholderPdfDocument = nil; // remember snapshots and close them, without animation snapshotDicts = [snapshots valueForKey:SKSnapshotCurrentSetupKey]; @@ -1118,7 +1119,8 @@ [savedNormalSetup setObject:@YES forKey:LOCKED_KEY]; } - placeholderPdfDocument = nil; + if ([self interactionMode] == SKPresentationMode) + [presentationView setPage:nil]; } if ([pdfDocument isLocked] == NO) { @@ -1192,8 +1194,8 @@ } if ([pdfDocument isLocked]) { [savedNormalSetup setObject:[NSNumber numberWithUnsignedInteger:dest.pageIndex] forKey:PAGEINDEX_KEY]; - if ([self interactionMode] == SKPresentationMode) - [presentationView setPage:nil]; + if (NSEqualPoints(dest.point, SKUnspecifiedPoint) == NO) + [savedNormalSetup setObject:NSStringFromPoint(dest.point) forKey:SCROLLPOINT_KEY]; } else if ([self interactionMode] == SKPresentationMode) { [presentationView setPage:[pdfDocument pageAtIndex:dest.pageIndex]]; } else { @@ -1226,6 +1228,9 @@ undoGroupOldPropertiesPerNote = nil; [rightSideController.noteOutlineView reloadData]; [pdfView resetPDFToolTipRects]; + + if ([self interactionMode] == SKPresentationMode && [pdfDocument isLocked]) + [self exitPresentation]; } #pragma mark Accessors This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-11 14:27:39
|
Revision: 15434 http://sourceforge.net/p/skim-app/code/15434 Author: hofman Date: 2025-06-11 14:27:36 +0000 (Wed, 11 Jun 2025) Log Message: ----------- return unspecified point for destination when document is locked Modified Paths: -------------- trunk/PDFView_SKExtensions.h trunk/PDFView_SKExtensions.m Modified: trunk/PDFView_SKExtensions.h =================================================================== --- trunk/PDFView_SKExtensions.h 2025-06-11 09:33:29 UTC (rev 15433) +++ trunk/PDFView_SKExtensions.h 2025-06-11 14:27:36 UTC (rev 15434) @@ -67,7 +67,7 @@ - (PDFPage *)pageAndPoint:(NSPoint * _Nullable)point forEvent:(NSEvent *)event nearest:(BOOL)nearest; -- (SKDestination)currentDestination:(BOOL)invalidatePointWwhenRotated; +- (SKDestination)currentDestination:(BOOL)invalidatePointWhenRotated; - (void)goToCurrentDestination:(SKDestination)destination; - (void)goToCurrentPage:(PDFPage *)page; Modified: trunk/PDFView_SKExtensions.m =================================================================== --- trunk/PDFView_SKExtensions.m 2025-06-11 09:33:29 UTC (rev 15433) +++ trunk/PDFView_SKExtensions.m 2025-06-11 14:27:36 UTC (rev 15434) @@ -198,10 +198,10 @@ return page; } -- (SKDestination)currentDestination:(BOOL)invalidatePointWwhenRotated { +- (SKDestination)currentDestination:(BOOL)invalidatePointWhenRotated { PDFPage *page = [self currentPage]; NSPoint point = SKUnspecifiedPoint; - if (invalidatePointWwhenRotated == NO || [page rotation] == [page intrinsicRotation]) { + if ([[page document] isLocked] == NO && (invalidatePointWhenRotated == NO || [page rotation] == [page intrinsicRotation])) { // don't use currentDestination, as that always gives the top-left of the page in non-continuous mode, rather than the visible area point = SKTopLeftPoint([self bounds]); point.y -= [[self scrollView] contentInsets].top; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-11 09:33:32
|
Revision: 15433 http://sourceforge.net/p/skim-app/code/15433 Author: hofman Date: 2025-06-11 09:33:29 +0000 (Wed, 11 Jun 2025) Log Message: ----------- return unspecified point in destination when we want to ignore it for user rotated pages Modified Paths: -------------- trunk/PDFView_SKExtensions.h trunk/PDFView_SKExtensions.m trunk/SKMainDocument.m trunk/SKMainWindowController.m trunk/SKMainWindowController_Actions.m Modified: trunk/PDFView_SKExtensions.h =================================================================== --- trunk/PDFView_SKExtensions.h 2025-06-11 09:07:22 UTC (rev 15432) +++ trunk/PDFView_SKExtensions.h 2025-06-11 09:33:29 UTC (rev 15433) @@ -67,7 +67,7 @@ - (PDFPage *)pageAndPoint:(NSPoint * _Nullable)point forEvent:(NSEvent *)event nearest:(BOOL)nearest; -- (SKDestination)currentDestinationRotated:(BOOL * _Nullable)rotated; +- (SKDestination)currentDestination:(BOOL)invalidatePointWwhenRotated; - (void)goToCurrentDestination:(SKDestination)destination; - (void)goToCurrentPage:(PDFPage *)page; Modified: trunk/PDFView_SKExtensions.m =================================================================== --- trunk/PDFView_SKExtensions.m 2025-06-11 09:07:22 UTC (rev 15432) +++ trunk/PDFView_SKExtensions.m 2025-06-11 09:33:29 UTC (rev 15433) @@ -198,14 +198,15 @@ return page; } -- (SKDestination)currentDestinationRotated:(BOOL *)rotated { +- (SKDestination)currentDestination:(BOOL)invalidatePointWwhenRotated { 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 - NSPoint point = SKTopLeftPoint([self bounds]); - point.y -= [[self scrollView] contentInsets].top; - point = [self convertPoint:point toPage:page]; - if (rotated) - *rotated = [page rotation] != [page intrinsicRotation]; + NSPoint point = SKUnspecifiedPoint; + if (invalidatePointWwhenRotated == NO || [page rotation] == [page intrinsicRotation]) { + // don't use currentDestination, as that always gives the top-left of the page in non-continuous mode, rather than the visible area + point = SKTopLeftPoint([self bounds]); + point.y -= [[self scrollView] contentInsets].top; + point = [self convertPoint:point toPage:page]; + } return (SKDestination){[page pageIndex], point}; } Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-11 09:07:22 UTC (rev 15432) +++ trunk/SKMainDocument.m 2025-06-11 09:33:29 UTC (rev 15433) @@ -1777,7 +1777,7 @@ } - (NSData *)currentQDPoint { - SKDestination dest = [[self pdfView] currentDestinationRotated:NULL]; + SKDestination dest = [[self pdfView] currentDestination:NO]; Point qdPoint = SKQDPointFromNSPoint(dest.point); return [NSData dataWithBytes:&qdPoint length:sizeof(Point)]; } Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-11 09:07:22 UTC (rev 15432) +++ trunk/SKMainWindowController.m 2025-06-11 09:33:29 UTC (rev 15433) @@ -629,8 +629,7 @@ - (NSDictionary *)currentSetup { NSMutableDictionary *setup = [NSMutableDictionary dictionary]; - BOOL rotated = NO; - SKDestination dest = [pdfView currentDestinationRotated:&rotated]; + SKDestination dest = [pdfView currentDestination:YES]; NSArray *cropBoxes = [self changedCropBoxes]; if ([self interactionMode] == SKPresentationMode) @@ -640,7 +639,7 @@ [setup setObject:[NSNumber numberWithDouble:[self leftSideWidth]] forKey:LEFTSIDEPANEWIDTH_KEY]; [setup setObject:[NSNumber numberWithDouble:[self rightSideWidth]] forKey:RIGHTSIDEPANEWIDTH_KEY]; [setup setObject:[NSNumber numberWithUnsignedInteger:dest.pageIndex] forKey:PAGEINDEX_KEY]; - if (rotated == NO) + if (NSEqualPoints(dest.point, SKUnspecifiedPoint) == NO) [setup setObject:NSStringFromPoint(dest.point) forKey:SCROLLPOINT_KEY]; if (cropBoxes) [setup setObject:cropBoxes forKey:CROPBOXES_KEY]; @@ -1074,7 +1073,6 @@ NSMutableArray *widgetProperties = nil; PDFDocument *oldPdfDoc = [pdfView document]; SKDestination dest = {NSNotFound, NSZeroPoint}, secondaryDest = {NSNotFound, NSZeroPoint}; - BOOL rotated = NO; NSArray *snapshotDicts = nil; NSDictionary *openState = nil; @@ -1081,14 +1079,9 @@ if (oldPdfDoc) { // this is a revert // need to clean up data and actions, and remember settings to restore - dest = [pdfView currentDestinationRotated:&rotated]; - if (rotated) - dest.point = SKUnspecifiedPoint; - if (secondaryPdfView) { - secondaryDest = [secondaryPdfView currentDestinationRotated:&rotated]; - if (rotated) - secondaryDest.point = SKUnspecifiedPoint; - } + dest = [pdfView currentDestination:YES]; + if (secondaryPdfView) + secondaryDest = [secondaryPdfView currentDestination:YES]; openState = [self expansionStateForOutline:[[pdfView document] outlineRoot]]; [oldPdfDoc cancelFindString]; Modified: trunk/SKMainWindowController_Actions.m =================================================================== --- trunk/SKMainWindowController_Actions.m 2025-06-11 09:07:22 UTC (rev 15432) +++ trunk/SKMainWindowController_Actions.m 2025-06-11 09:33:29 UTC (rev 15433) @@ -399,7 +399,7 @@ beforeMarkedPage.pageIndex = MIN(beforeMarkedPage.pageIndex, [pdfDoc pageCount] - 1); [pdfView goToCurrentDestination:beforeMarkedPage]; } else if (currentPageIndex != markedPage.pageIndex) { - beforeMarkedPage = [pdfView currentDestinationRotated:NULL]; + beforeMarkedPage = [pdfView currentDestination:NO]; markedPage.pageIndex = MIN(markedPage.pageIndex, [pdfDoc pageCount] - 1); [pdfView goToCurrentDestination:markedPage]; } @@ -412,7 +412,7 @@ [(SKThumbnailItem *)[overviewView itemAtIndexPath:[NSIndexPath indexPathForItem:markedPage.pageIndex inSection:0]] setMarked:NO]; [[(NSTableCellView *)[leftSideController.thumbnailTableView viewAtColumn:1 row:markedPage.pageIndex makeIfNecessary:NO] imageView] setObjectValue:nil]; } - markedPage = [pdfView currentDestinationRotated:NULL]; + markedPage = [pdfView currentDestination:NO]; 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]]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-11 09:07:25
|
Revision: 15432 http://sourceforge.net/p/skim-app/code/15432 Author: hofman Date: 2025-06-11 09:07:22 +0000 (Wed, 11 Jun 2025) Log Message: ----------- don't bbother setting placeholder pdf document to nil at first run Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-11 09:06:09 UTC (rev 15431) +++ trunk/SKMainWindowController.m 2025-06-11 09:07:22 UTC (rev 15432) @@ -1078,8 +1078,6 @@ NSArray *snapshotDicts = nil; NSDictionary *openState = nil; - placeholderPdfDocument = nil; - if (oldPdfDoc) { // this is a revert // need to clean up data and actions, and remember settings to restore @@ -1126,6 +1124,8 @@ [savedNormalSetup setDictionary:[pdfView displaySettings]]; [savedNormalSetup setObject:@YES forKey:LOCKED_KEY]; } + + placeholderPdfDocument = nil; } 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-11 09:06:11
|
Revision: 15431 http://sourceforge.net/p/skim-app/code/15431 Author: hofman Date: 2025-06-11 09:06:09 +0000 (Wed, 11 Jun 2025) Log Message: ----------- create placeholder pdf document only later when adding notes Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-11 08:44:44 UTC (rev 15430) +++ trunk/SKMainWindowController.m 2025-06-11 09:06:09 UTC (rev 15431) @@ -1071,7 +1071,6 @@ } - (void)setPdfDocument:(PDFDocument *)pdfDocument addAnnotationsWithProperties:(NSArray *)noteDicts { - PDFDocument *pdfDoc = pdfDocument; NSMutableArray *widgetProperties = nil; PDFDocument *oldPdfDoc = [pdfView document]; SKDestination dest = {NSNotFound, NSZeroPoint}, secondaryDest = {NSNotFound, NSZeroPoint}; @@ -1080,16 +1079,6 @@ NSDictionary *openState = nil; placeholderPdfDocument = nil; - if ([pdfDoc allowsNotes] == NO && [noteDicts count] > 0) { - // there should not be any notesToRemove at this point - NSUInteger i, pageCount = MIN([pdfDoc pageCount], [[noteDicts valueForKeyPath:@"@max.pageIndex"] unsignedIntegerValue] + 1); - pdfDoc = placeholderPdfDocument = [[SKPDFDocument alloc] init]; - [placeholderPdfDocument setContainingDocument:[self document]]; - for (i = 0; i < pageCount; i++) { - PDFPage *page = [[SKPDFPage alloc] init]; - [placeholderPdfDocument insertPage:page atIndex:i]; - } - } if (oldPdfDoc) { // this is a revert @@ -1146,7 +1135,17 @@ } if ([noteDicts count]) { + PDFDocument *pdfDoc = pdfDocument; + if ([pdfDoc allowsNotes] == NO) { + NSUInteger i, pageCount = MIN([pdfDoc pageCount], [[noteDicts valueForKeyPath:@"@max.pageIndex"] unsignedIntegerValue] + 1); + pdfDoc = placeholderPdfDocument = [[SKPDFDocument alloc] init]; + [placeholderPdfDocument setContainingDocument:[self document]]; + for (i = 0; i < pageCount; i++) + [placeholderPdfDocument insertPage:[[SKPDFPage alloc] init] atIndex:i]; + } + widgetProperties = [NSMutableArray array]; + NSArray *notesAndPagesToAdd = [self annotationsAndPagesWithProperties:noteDicts forDocument:pdfDoc autoUpdate:NO widgetProperties:widgetProperties]; if ([notesAndPagesToAdd count]) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-11 08:44:46
|
Revision: 15430 http://sourceforge.net/p/skim-app/code/15430 Author: hofman Date: 2025-06-11 08:44:44 +0000 (Wed, 11 Jun 2025) Log Message: ----------- simply add new annotations to new PDFDocument, as nothing observes notifcations Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-10 16:45:03 UTC (rev 15429) +++ trunk/SKMainWindowController.m 2025-06-11 08:44:44 UTC (rev 15430) @@ -1153,18 +1153,15 @@ NSMutableArray *addedNotes = [NSMutableArray array]; BOOL shouldDisplay = [pdfView hideNotes] == NO; - mwcFlags.addOrRemoveNotesInBulk = 1; - for (NSArray *annotationAndPage in notesAndPagesToAdd) { PDFAnnotation *annotation = [annotationAndPage firstObject]; [annotation setShouldDisplay:shouldDisplay]; [annotation setShouldPrint:shouldDisplay]; - [pdfDoc addAnnotation:annotation toPage:[annotationAndPage lastObject]]; + // there is nothing to observe PDFDocument notifications at this point + [[annotationAndPage lastObject] addAnnotation:annotation]; [addedNotes addObject:annotation]; } - mwcFlags.addOrRemoveNotesInBulk = 0; - [self insertNotes:addedNotes atIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [addedNotes count])]]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-10 16:45:05
|
Revision: 15429 http://sourceforge.net/p/skim-app/code/15429 Author: hofman Date: 2025-06-10 16:45:03 +0000 (Tue, 10 Jun 2025) Log Message: ----------- rearrangeObjects should be called implicitly when adding or removing notes Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-10 16:26:32 UTC (rev 15428) +++ trunk/SKMainWindowController.m 2025-06-10 16:45:03 UTC (rev 15429) @@ -1011,7 +1011,6 @@ // 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) { @@ -1236,7 +1235,6 @@ // make sure we clear the undo handling undoGroupOldPropertiesPerNote = nil; - [rightSideController.noteArrayController rearrangeObjects]; // doesn't seem to be done automatically [rightSideController.noteOutlineView reloadData]; [pdfView resetPDFToolTipRects]; } @@ -2257,7 +2255,6 @@ [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]; } @@ -2305,7 +2302,6 @@ 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]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-10 16:26:33
|
Revision: 15428 http://sourceforge.net/p/skim-app/code/15428 Author: hofman Date: 2025-06-10 16:26:32 +0000 (Tue, 10 Jun 2025) Log Message: ----------- don't reset widgets from replace when changing it from read data Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-10 16:16:27 UTC (rev 15427) +++ trunk/SKMainWindowController.m 2025-06-10 16:26:32 UTC (rev 15428) @@ -911,7 +911,8 @@ placeholderWidgetProperties = nil; } -- (void)updateWidgetsWithProperties:(NSArray *)widgetDicts { +- (void)updateWidgetsWithProperties:(NSArray *)widgetDicts reset:(BOOL)reset { + NSMutableSet *unsetWidgets = reset && [widgets count] ? [NSMutableSet setWithArray:widgets] : nil; if (widgets == nil) { widgets = [[NSMutableArray alloc] init]; widgetValues = [NSMapTable strongToStrongObjectsMapTable]; @@ -934,11 +935,19 @@ id value = [dict objectForKey:widgetType == kSKNPDFWidgetTypeButton ? SKNPDFAnnotationStateKey : SKNPDFAnnotationStringValueKey]; if ([([annotation objectValue] ?: @"") isEqual:(value ?: @"")] == NO) [annotation setObjectValue:value]; + [unsetWidgets removeObject:annotation]; break; } } } } + if ([unsetWidgets count]) { + for (PDFAnnotation *widget in unsetWidgets) { + id origValue = [widgetValues objectForKey:widget]; + if ([([widget objectValue] ?: @"") isEqual:(origValue ?: @"")] == NO) + [widget setObjectValue:origValue]; + } + } } - (NSArray *)widgetProperties { @@ -1050,15 +1059,7 @@ [pdfView setCurrentAnnotation:nil]; } - if (replacing && [widgets count]) { - for (PDFAnnotation *widget in widgets) { - id origValue = [widgetValues objectForKey:widget]; - if ([([widget objectValue] ?: @"") isEqual:(origValue ?: @"")] == NO) - [widget setObjectValue:origValue]; - } - } - if ([widgetDicts count]) - [self updateWidgetsWithProperties:widgetDicts]; + [self updateWidgetsWithProperties:widgetDicts reset:replacing]; [self addAnnotations:notesAndPagesToAdd removeAnnotations:replacing ? [self notes] : nil]; } @@ -1183,7 +1184,7 @@ if ([pdfDocument isLocked]) placeholderWidgetProperties = [widgetProperties count] ? [widgetProperties copy] : nil; else - [self updateWidgetsWithProperties:widgetProperties]; + [self updateWidgetsWithProperties:widgetProperties reset:NO]; [self updatePageLabelsAndOutlineForExpansionState:openState]; [self updateNoteSelection]; @@ -2162,7 +2163,7 @@ if (placeholderWidgetProperties) [[[self document] undoManager] disableUndoRegistration]; - [self updateWidgetsWithProperties:placeholderWidgetProperties]; + [self updateWidgetsWithProperties:placeholderWidgetProperties reset:NO]; if (placeholderWidgetProperties) [[[self document] undoManager] enableUndoRegistration]; placeholderWidgetProperties = nil; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-10 16:16:28
|
Revision: 15427 http://sourceforge.net/p/skim-app/code/15427 Author: hofman Date: 2025-06-10 16:16:27 +0000 (Tue, 10 Jun 2025) Log Message: ----------- rename method Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-10 16:14:10 UTC (rev 15426) +++ trunk/SKMainWindowController.m 2025-06-10 16:16:27 UTC (rev 15427) @@ -911,7 +911,7 @@ placeholderWidgetProperties = nil; } -- (void)changeWidgetsFromDictionaries:(NSArray *)widgetDicts { +- (void)updateWidgetsWithProperties:(NSArray *)widgetDicts { if (widgets == nil) { widgets = [[NSMutableArray alloc] init]; widgetValues = [NSMapTable strongToStrongObjectsMapTable]; @@ -1058,7 +1058,7 @@ } } if ([widgetDicts count]) - [self changeWidgetsFromDictionaries:widgetDicts]; + [self updateWidgetsWithProperties:widgetDicts]; [self addAnnotations:notesAndPagesToAdd removeAnnotations:replacing ? [self notes] : nil]; } @@ -1183,7 +1183,7 @@ if ([pdfDocument isLocked]) placeholderWidgetProperties = [widgetProperties count] ? [widgetProperties copy] : nil; else - [self changeWidgetsFromDictionaries:widgetProperties]; + [self updateWidgetsWithProperties:widgetProperties]; [self updatePageLabelsAndOutlineForExpansionState:openState]; [self updateNoteSelection]; @@ -2162,7 +2162,7 @@ if (placeholderWidgetProperties) [[[self document] undoManager] disableUndoRegistration]; - [self changeWidgetsFromDictionaries:placeholderWidgetProperties]; + [self updateWidgetsWithProperties:placeholderWidgetProperties]; if (placeholderWidgetProperties) [[[self document] undoManager] enableUndoRegistration]; placeholderWidgetProperties = nil; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-10 16:14:11
|
Revision: 15426 http://sourceforge.net/p/skim-app/code/15426 Author: hofman Date: 2025-06-10 16:14:10 +0000 (Tue, 10 Jun 2025) Log Message: ----------- hasNotes already checks for edited widgets Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-10 16:09:58 UTC (rev 15425) +++ trunk/SKMainDocument.m 2025-06-10 16:14:10 UTC (rev 15426) @@ -1299,7 +1299,7 @@ } - (IBAction)share:(id)sender { - BOOL shouldArchive = ([self hasNotes] || [[self presentationOptions] count] > 0 || [[[self mainWindowController] widgetProperties] count] > 0); + BOOL shouldArchive = ([self hasNotes] || [[self presentationOptions] count] > 0); NSString *typeName = [self fileType]; if (shouldArchive == NO && [typeName isEqualToString:SKDocumentTypePDFBundle]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-10 16:10:01
|
Revision: 15425 http://sourceforge.net/p/skim-app/code/15425 Author: hofman Date: 2025-06-10 16:09:58 +0000 (Tue, 10 Jun 2025) Log Message: ----------- return early when no widgets, avoid local variables Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-10 16:05:15 UTC (rev 15424) +++ trunk/SKMainWindowController.m 2025-06-10 16:09:58 UTC (rev 15425) @@ -944,14 +944,12 @@ - (NSArray *)widgetProperties { if (placeholderWidgetProperties) return placeholderWidgetProperties; + if ([widgets count] == 0) + return @[]; NSMutableArray *properties = [NSMutableArray array]; - if (widgets) { - for (PDFAnnotation *widget in widgets) { - id value = [widget objectValue]; - id origValue = [widgetValues objectForKey:widget]; - if ([(value ?: @"") isEqual:(origValue ?: @"")] == NO) - [properties addObject:[widget SkimNoteProperties]]; - } + for (PDFAnnotation *widget in widgets) { + if ([([widget objectValue] ?: @"") isEqual:([widgetValues objectForKey:widget] ?: @"")] == NO) + [properties addObject:[widget SkimNoteProperties]]; } return properties; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-10 16:05:18
|
Revision: 15424 http://sourceforge.net/p/skim-app/code/15424 Author: hofman Date: 2025-06-10 16:05:15 +0000 (Tue, 10 Jun 2025) Log Message: ----------- don't bother disabling undo registration when no widgets to change Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-10 15:59:04 UTC (rev 15423) +++ trunk/SKMainWindowController.m 2025-06-10 16:05:15 UTC (rev 15424) @@ -2162,9 +2162,11 @@ } } - [[[self document] undoManager] disableUndoRegistration]; + if (placeholderWidgetProperties) + [[[self document] undoManager] disableUndoRegistration]; [self changeWidgetsFromDictionaries:placeholderWidgetProperties]; - [[[self document] undoManager] enableUndoRegistration]; + if (placeholderWidgetProperties) + [[[self document] undoManager] enableUndoRegistration]; placeholderWidgetProperties = nil; if (wasLocked) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-10 15:59:07
|
Revision: 15423 http://sourceforge.net/p/skim-app/code/15423 Author: hofman Date: 2025-06-10 15:59:04 +0000 (Tue, 10 Jun 2025) Log Message: ----------- setup widget registration implicitly when applying widget values Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-10 15:55:47 UTC (rev 15422) +++ trunk/SKMainWindowController.m 2025-06-10 15:59:04 UTC (rev 15423) @@ -898,14 +898,6 @@ [widgetValues setObject:[annotation objectValue] forKey:annotation]; } -- (void)makeWidgets { - widgets = [[NSMutableArray alloc] init]; - widgetValues = [NSMapTable strongToStrongObjectsMapTable]; - NSArray *array = [[self pdfDocument] detectedWidgets]; - if ([array count]) - [self registerWidgets:array]; -} - - (void)document:(PDFDocument *)document didDetectWidgets:(NSArray *)newWidgets onPage:(PDFPage *)page { if ([newWidgets count] && widgets && [widgets containsObject:[newWidgets firstObject]] == NO) [self registerWidgets:newWidgets]; @@ -920,21 +912,30 @@ } - (void)changeWidgetsFromDictionaries:(NSArray *)widgetDicts { - PDFDocument *pdfDoc = [pdfView document]; - for (NSDictionary *dict in widgetDicts) { - NSRect bounds = NSIntegralRect(NSRectFromString([dict objectForKey:SKNPDFAnnotationBoundsKey])); - NSUInteger pageIndex = [[dict objectForKey:SKNPDFAnnotationPageIndexKey] unsignedIntegerValue]; - SKNPDFWidgetType widgetType = [[dict objectForKey:SKNPDFAnnotationWidgetTypeKey] integerValue]; - NSString *fieldName = [dict objectForKey:SKNPDFAnnotationFieldNameKey] ?: @""; - for (PDFAnnotation *annotation in [[pdfDoc pageAtIndex:pageIndex] annotations]) { - if ([annotation isWidget] && - [annotation widgetType] == widgetType && - [([annotation fieldName] ?: @"") isEqualToString:fieldName] && - NSEqualRects(NSIntegralRect([annotation bounds]), bounds)) { - id value = [dict objectForKey:widgetType == kSKNPDFWidgetTypeButton ? SKNPDFAnnotationStateKey : SKNPDFAnnotationStringValueKey]; - if ([([annotation objectValue] ?: @"") isEqual:(value ?: @"")] == NO) - [annotation setObjectValue:value]; - break; + if (widgets == nil) { + widgets = [[NSMutableArray alloc] init]; + widgetValues = [NSMapTable strongToStrongObjectsMapTable]; + NSArray *array = [[self pdfDocument] detectedWidgets]; + if ([array count]) + [self registerWidgets:array]; + } + if ([widgetDicts count]) { + PDFDocument *pdfDoc = [pdfView document]; + for (NSDictionary *dict in widgetDicts) { + NSRect bounds = NSIntegralRect(NSRectFromString([dict objectForKey:SKNPDFAnnotationBoundsKey])); + NSUInteger pageIndex = [[dict objectForKey:SKNPDFAnnotationPageIndexKey] unsignedIntegerValue]; + SKNPDFWidgetType widgetType = [[dict objectForKey:SKNPDFAnnotationWidgetTypeKey] integerValue]; + NSString *fieldName = [dict objectForKey:SKNPDFAnnotationFieldNameKey] ?: @""; + for (PDFAnnotation *annotation in [[pdfDoc pageAtIndex:pageIndex] annotations]) { + if ([annotation isWidget] && + [annotation widgetType] == widgetType && + [([annotation fieldName] ?: @"") isEqualToString:fieldName] && + NSEqualRects(NSIntegralRect([annotation bounds]), bounds)) { + id value = [dict objectForKey:widgetType == kSKNPDFWidgetTypeButton ? SKNPDFAnnotationStateKey : SKNPDFAnnotationStringValueKey]; + if ([([annotation objectValue] ?: @"") isEqual:(value ?: @"")] == NO) + [annotation setObjectValue:value]; + break; + } } } } @@ -1181,13 +1182,10 @@ [toolbarController updateMinMaxScale]; - if ([pdfDocument isLocked]) { + if ([pdfDocument isLocked]) placeholderWidgetProperties = [widgetProperties count] ? [widgetProperties copy] : nil; - } else { - [self makeWidgets]; - if ([widgetProperties count]) - [self changeWidgetsFromDictionaries:widgetProperties]; - } + else + [self changeWidgetsFromDictionaries:widgetProperties]; [self updatePageLabelsAndOutlineForExpansionState:openState]; [self updateNoteSelection]; @@ -2164,14 +2162,10 @@ } } - if (widgets == nil) - [self makeWidgets]; - if (placeholderWidgetProperties) { - [[[self document] undoManager] disableUndoRegistration]; - [self changeWidgetsFromDictionaries:placeholderWidgetProperties]; - [[[self document] undoManager] enableUndoRegistration]; - placeholderWidgetProperties = nil; - } + [[[self document] undoManager] disableUndoRegistration]; + [self changeWidgetsFromDictionaries:placeholderWidgetProperties]; + [[[self document] undoManager] enableUndoRegistration]; + placeholderWidgetProperties = nil; if (wasLocked) { [self updatePageLabelsAndOutlineForExpansionState:nil]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-10 15:55:48
|
Revision: 15422 http://sourceforge.net/p/skim-app/code/15422 Author: hofman Date: 2025-06-10 15:55:47 +0000 (Tue, 10 Jun 2025) Log Message: ----------- go to page and point after setting crop boxes after unlock Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-10 08:42:00 UTC (rev 15421) +++ trunk/SKMainWindowController.m 2025-06-10 15:55:47 UTC (rev 15422) @@ -2111,6 +2111,8 @@ settings = [savedNormalSetup objectForKey:AUTOSCALES_KEY] ? savedNormalSetup : [[NSUserDefaults standardUserDefaults] dictionaryForKey:SKDefaultPDFDisplaySettingsKey]; [pdfView setDisplaySettings:settings]; + [self applyChangedCropBoxes:[savedNormalSetup objectForKey:CROPBOXES_KEY] inDocument:[self pdfDocument]]; + NSNumber *pageIndexNumber = [savedNormalSetup objectForKey:PAGEINDEX_KEY]; NSUInteger pageIndex = pageIndexNumber ? [pageIndexNumber unsignedIntegerValue] : NSNotFound; if (pageIndex != NSNotFound) { @@ -2124,8 +2126,6 @@ [pdfView resetHistory]; } - [self applyChangedCropBoxes:[savedNormalSetup objectForKey:CROPBOXES_KEY] inDocument:[self pdfDocument]]; - NSArray *snapshotSetups = [savedNormalSetup objectForKey:SNAPSHOTS_KEY]; if ([snapshotSetups count]) [self showSnapshotsWithSetups:snapshotSetups]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-10 08:42:01
|
Revision: 15421 http://sourceforge.net/p/skim-app/code/15421 Author: hofman Date: 2025-06-10 08:42:00 +0000 (Tue, 10 Jun 2025) Log Message: ----------- invalidate revert during presentation Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-09 14:31:55 UTC (rev 15420) +++ trunk/SKMainDocument.m 2025-06-10 08:42:00 UTC (rev 15421) @@ -1392,7 +1392,7 @@ - (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem { if ([anItem action] == @selector(revertDocumentToSaved:)) { - if ([self fileURL] == nil || [[self fileURL] checkResourceIsReachableAndReturnError:NULL] == NO) + if ([self fileURL] == nil || [[self fileURL] checkResourceIsReachableAndReturnError:NULL] == NO || [[self mainWindowController] interactionMode] == SKPresentationMode) return NO; if ([self isDocumentEdited] || [fileUpdateChecker fileChangedOnDisk] || NSOrderedAscending == [[self fileModificationDate] compare:fileModificationDate([self fileURL])]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-09 14:31:57
|
Revision: 15420 http://sourceforge.net/p/skim-app/code/15420 Author: hofman Date: 2025-06-09 14:31:55 +0000 (Mon, 09 Jun 2025) Log Message: ----------- do update display when widget values change Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-09 14:11:21 UTC (rev 15419) +++ trunk/SKMainWindowController.m 2025-06-09 14:31:55 UTC (rev 15420) @@ -2767,9 +2767,6 @@ if ([oldNoteProperties objectForKey:keyPath] == nil) [oldNoteProperties setObject:oldValue forKey:keyPath]; - if ([note isSkimNote] == NO) - return; - // Update the UI, we should always do that unless the value did not really change or we're just changing the mod date or user name if ([keyPath isEqualToString:SKNPDFAnnotationModificationDateKey] == NO && [keyPath isEqualToString:SKNPDFAnnotationUserNameKey] == NO && [keyPath isEqualToString:SKNPDFAnnotationTextKey] == NO && ([note isText] || [keyPath isEqualToString:SKNPDFAnnotationStringKey] == NO)) { PDFPage *page = [note page]; @@ -2793,6 +2790,9 @@ [self updateRightStatus]; } + if ([note isSkimNote] == NO) + return; + if (mwcFlags.autoResizeNoteRows) { if ([keyPath isEqualToString:SKNPDFAnnotationStringKey]) [rightSideController.noteOutlineView setRowHeight:0.0 forItem:note]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-09 14:11:23
|
Revision: 15419 http://sourceforge.net/p/skim-app/code/15419 Author: hofman Date: 2025-06-09 14:11:21 +0000 (Mon, 09 Jun 2025) Log Message: ----------- use local variable Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-09 09:20:49 UTC (rev 15418) +++ trunk/SKMainWindowController.m 2025-06-09 14:11:21 UTC (rev 15419) @@ -920,12 +920,13 @@ } - (void)changeWidgetsFromDictionaries:(NSArray *)widgetDicts { + PDFDocument *pdfDoc = [pdfView document]; for (NSDictionary *dict in widgetDicts) { NSRect bounds = NSIntegralRect(NSRectFromString([dict objectForKey:SKNPDFAnnotationBoundsKey])); NSUInteger pageIndex = [[dict objectForKey:SKNPDFAnnotationPageIndexKey] unsignedIntegerValue]; SKNPDFWidgetType widgetType = [[dict objectForKey:SKNPDFAnnotationWidgetTypeKey] integerValue]; NSString *fieldName = [dict objectForKey:SKNPDFAnnotationFieldNameKey] ?: @""; - for (PDFAnnotation *annotation in [[[self pdfDocument] pageAtIndex:pageIndex] annotations]) { + for (PDFAnnotation *annotation in [[pdfDoc pageAtIndex:pageIndex] annotations]) { if ([annotation isWidget] && [annotation widgetType] == widgetType && [([annotation fieldName] ?: @"") isEqualToString:fieldName] && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-09 09:20:52
|
Revision: 15418 http://sourceforge.net/p/skim-app/code/15418 Author: hofman Date: 2025-06-09 09:20:49 +0000 (Mon, 09 Jun 2025) Log Message: ----------- use newSkimNoteWithProperties instead of initalizer Modified Paths: -------------- trunk/PDFPage_SKExtensions.m trunk/SKMainDocument.m trunk/SKMainWindowController.h trunk/SKMainWindowController.m Modified: trunk/PDFPage_SKExtensions.m =================================================================== --- trunk/PDFPage_SKExtensions.m 2025-06-08 22:09:37 UTC (rev 15417) +++ trunk/PDFPage_SKExtensions.m 2025-06-09 09:20:49 UTC (rev 15418) @@ -772,7 +772,7 @@ NSMutableArray *copiedValue = [[NSMutableArray alloc] init]; for (PDFAnnotation *annotation in value) { if ([annotation isMovable]) { - PDFAnnotation *copiedAnnotation = [[PDFAnnotation alloc] initSkimNoteWithProperties:[annotation SkimNoteProperties]]; + PDFAnnotation *copiedAnnotation = [PDFAnnotation newSkimNoteWithProperties:[annotation SkimNoteProperties]]; [copiedAnnotation registerUserName]; if ([properties count]) [copiedAnnotation setScriptingProperties:[copiedAnnotation coerceValue:properties forKey:@"scriptingProperties"]]; Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-08 22:09:37 UTC (rev 15417) +++ trunk/SKMainDocument.m 2025-06-09 09:20:49 UTC (rev 15418) @@ -195,7 +195,7 @@ [[self undoManager] disableUndoRegistration]; - [[self mainWindowController] setPdfDocument:pdfDoc addAnnotationsFromDictionaries:[tmpData noteDicts]]; + [[self mainWindowController] setPdfDocument:pdfDoc addAnnotationsWithProperties:[tmpData noteDicts]]; [self setPresentationOptions:[tmpData presentationOptions]]; @@ -1104,7 +1104,7 @@ } if (array) { - [[self mainWindowController] addAnnotationsFromDictionaries:array replacing:replace]; + [[self mainWindowController] addAnnotationsWithProperties:array replacing:replace]; [[self undoManager] setActionName:replace ? NSLocalizedString(@"Replace Notes", @"Undo action name") : NSLocalizedString(@"Add Notes", @"Undo action name")]; } else NSBeep(); @@ -1202,7 +1202,7 @@ dispatch_async(dispatch_get_main_queue(), ^{ - [[self mainWindowController] addConvertedAnnotationsFromDictionaries:noteDicts removeAnnotations:annotations]; + [[self mainWindowController] addConvertedAnnotationsWithProperties:noteDicts removeAnnotations:annotations]; [self setPDFData:data pageOffsets:offsets]; Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2025-06-08 22:09:37 UTC (rev 15417) +++ trunk/SKMainWindowController.h 2025-06-09 09:20:49 UTC (rev 15418) @@ -316,9 +316,9 @@ - (void)snapshotNeedsUpdate:(SKSnapshotWindowController *)dirstySnapshot lowPriority:(BOOL)lowPriority; - (void)allSnapshotsNeedUpdate; -- (void)setPdfDocument:(nullable PDFDocument *)pdfDocument addAnnotationsFromDictionaries:(nullable NSArray<NSDictionary<NSString *, id> *> *)noteDicts; -- (void)addAnnotationsFromDictionaries:(NSArray<NSDictionary<NSString *, id> *> *)noteDicts replacing:(BOOL)replacing; -- (void)addConvertedAnnotationsFromDictionaries:(NSArray<NSDictionary<NSString *, id> *> *)noteDicts removeAnnotations:(nullable NSArray<PDFAnnotation *> *)notesToRemove; +- (void)setPdfDocument:(nullable PDFDocument *)pdfDocument addAnnotationsWithProperties:(nullable NSArray<NSDictionary<NSString *, id> *> *)noteDicts; +- (void)addAnnotationsWithProperties:(NSArray<NSDictionary<NSString *, id> *> *)noteDicts replacing:(BOOL)replacing; +- (void)addConvertedAnnotationsWithProperties:(NSArray<NSDictionary<NSString *, id> *> *)noteDicts removeAnnotations:(nullable NSArray<PDFAnnotation *> *)notesToRemove; - (void)applySetup:(NSDictionary<NSString *, id> *)setup; - (NSDictionary<NSString *, id> *)currentSetup; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-08 22:09:37 UTC (rev 15417) +++ trunk/SKMainWindowController.m 2025-06-09 09:20:49 UTC (rev 15418) @@ -1012,7 +1012,7 @@ [pdfView resetPDFToolTipRects]; } -- (NSArray *)annotationsAndPagesFromDictionaries:(NSArray *)noteDicts forDocument:(PDFDocument *)pdfDoc autoUpdate:(BOOL)autoUpdate widgetDictionaries:(NSMutableArray *)widgetDicts { +- (NSArray *)annotationsAndPagesWithProperties:(NSArray *)noteDicts forDocument:(PDFDocument *)pdfDoc autoUpdate:(BOOL)autoUpdate widgetProperties:(NSMutableArray *)widgetDicts { NSMutableArray *notesAndPagesToAdd = [NSMutableArray array]; // create new annotations from the dictionary and get the page to add to @@ -1040,9 +1040,9 @@ return notesAndPagesToAdd; } -- (void)addAnnotationsFromDictionaries:(NSArray *)noteDicts replacing:(BOOL)replacing { +- (void)addAnnotationsWithProperties:(NSArray *)noteDicts replacing:(BOOL)replacing { NSMutableArray *widgetDicts = [NSMutableArray array]; - NSArray *notesAndPagesToAdd = [self annotationsAndPagesFromDictionaries:noteDicts forDocument:[pdfView document] autoUpdate:NO widgetDictionaries:widgetDicts]; + NSArray *notesAndPagesToAdd = [self annotationsAndPagesWithProperties:noteDicts forDocument:[pdfView document] autoUpdate:NO widgetProperties:widgetDicts]; if (replacing && [notes count]) { [pdfView removePDFToolTipRects]; @@ -1063,14 +1063,14 @@ [self addAnnotations:notesAndPagesToAdd removeAnnotations:replacing ? [self notes] : nil]; } -- (void)addConvertedAnnotationsFromDictionaries:(NSArray *)noteDicts removeAnnotations:(NSArray *)notesToRemove { +- (void)addConvertedAnnotationsWithProperties:(NSArray *)noteDicts removeAnnotations:(NSArray *)notesToRemove { BOOL autoUpdate = NO == [[NSUserDefaults standardUserDefaults] boolForKey:SKDisableUpdateContentsFromEnclosedTextKey]; - NSArray *notesAndPagesToAdd = [self annotationsAndPagesFromDictionaries:noteDicts forDocument:[pdfView document] autoUpdate:autoUpdate widgetDictionaries:nil]; + NSArray *notesAndPagesToAdd = [self annotationsAndPagesWithProperties:noteDicts forDocument:[pdfView document] autoUpdate:autoUpdate widgetProperties:nil]; [self addAnnotations:notesAndPagesToAdd removeAnnotations:notesToRemove]; } -- (void)setPdfDocument:(PDFDocument *)pdfDocument addAnnotationsFromDictionaries:(NSArray *)noteDicts { +- (void)setPdfDocument:(PDFDocument *)pdfDocument addAnnotationsWithProperties:(NSArray *)noteDicts { PDFDocument *pdfDoc = pdfDocument; NSMutableArray *widgetProperties = nil; PDFDocument *oldPdfDoc = [pdfView document]; @@ -1147,7 +1147,7 @@ if ([noteDicts count]) { widgetProperties = [NSMutableArray array]; - NSArray *notesAndPagesToAdd = [self annotationsAndPagesFromDictionaries:noteDicts forDocument:pdfDoc autoUpdate:NO widgetDictionaries:widgetProperties]; + NSArray *notesAndPagesToAdd = [self annotationsAndPagesWithProperties:noteDicts forDocument:pdfDoc autoUpdate:NO widgetProperties:widgetProperties]; if ([notesAndPagesToAdd count]) { NSMutableArray *addedNotes = [NSMutableArray array]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-08 22:09:38
|
Revision: 15417 http://sourceforge.net/p/skim-app/code/15417 Author: hofman Date: 2025-06-08 22:09:37 +0000 (Sun, 08 Jun 2025) Log Message: ----------- try to add notes only when there are notes to add Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-08 21:59:01 UTC (rev 15416) +++ trunk/SKMainWindowController.m 2025-06-08 22:09:37 UTC (rev 15417) @@ -1148,22 +1148,25 @@ if ([noteDicts count]) { widgetProperties = [NSMutableArray array]; NSArray *notesAndPagesToAdd = [self annotationsAndPagesFromDictionaries:noteDicts forDocument:pdfDoc autoUpdate:NO widgetDictionaries:widgetProperties]; - NSMutableArray *addedNotes = [NSMutableArray array]; - BOOL shouldDisplay = [pdfView hideNotes] == NO; - mwcFlags.addOrRemoveNotesInBulk = 1; - - for (NSArray *annotationAndPage in notesAndPagesToAdd) { - PDFAnnotation *annotation = [annotationAndPage firstObject]; - [annotation setShouldDisplay:shouldDisplay]; - [annotation setShouldPrint:shouldDisplay]; - [pdfDoc addAnnotation:annotation toPage:[annotationAndPage lastObject]]; - [addedNotes addObject:annotation]; + if ([notesAndPagesToAdd count]) { + NSMutableArray *addedNotes = [NSMutableArray array]; + BOOL shouldDisplay = [pdfView hideNotes] == NO; + + mwcFlags.addOrRemoveNotesInBulk = 1; + + for (NSArray *annotationAndPage in notesAndPagesToAdd) { + PDFAnnotation *annotation = [annotationAndPage firstObject]; + [annotation setShouldDisplay:shouldDisplay]; + [annotation setShouldPrint:shouldDisplay]; + [pdfDoc addAnnotation:annotation toPage:[annotationAndPage lastObject]]; + [addedNotes addObject:annotation]; + } + + mwcFlags.addOrRemoveNotesInBulk = 0; + + [self insertNotes:addedNotes atIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [addedNotes count])]]; } - - mwcFlags.addOrRemoveNotesInBulk = 0; - - [self insertNotes:addedNotes atIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [addedNotes count])]]; } [pdfView setDocument:pdfDocument]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |