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-18 14:29:29
|
Revision: 15491 http://sourceforge.net/p/skim-app/code/15491 Author: hofman Date: 2025-06-18 14:29:27 +0000 (Wed, 18 Jun 2025) Log Message: ----------- make sure wwe don't call stringValue with nil Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-18 14:21:42 UTC (rev 15490) +++ trunk/SKMainWindowController.m 2025-06-18 14:29:27 UTC (rev 15491) @@ -1774,7 +1774,7 @@ [leftSideController.searchField setStringValue:searchString]; [self performSelector:@selector(search:) withObject:leftSideController.searchField afterDelay:0.0]; } else { - [leftSideController.searchField setStringValue:searchString]; + [leftSideController.searchField setStringValue:@""]; [self search:leftSideController.searchField]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-18 14:21:44
|
Revision: 15490 http://sourceforge.net/p/skim-app/code/15490 Author: hofman Date: 2025-06-18 14:21:42 +0000 (Wed, 18 Jun 2025) Log Message: ----------- remove state parameter in side view swapping methods, as it is always equal toi the current state Modified Paths: -------------- trunk/SKMainWindowController.h trunk/SKMainWindowController.m trunk/SKMainWindowController_Actions.m Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2025-06-18 14:14:19 UTC (rev 15489) +++ trunk/SKMainWindowController.h 2025-06-18 14:21:42 UTC (rev 15490) @@ -285,9 +285,9 @@ - (void)hideOverviewAnimating:(BOOL)animate; - (void)hideOverviewAnimating:(BOOL)animate completionHandler:(nullable void (^)(void))handler; -- (void)displayLeftSideView:(SKLeftSidePaneState)state animating:(BOOL)animate; -- (void)displayFindView:(SKFindPaneState)state animating:(BOOL)animate; -- (void)displayRightSideView:(SKRightSidePaneState)state animating:(BOOL)animate; +- (void)displayLeftSideViewAnimating:(BOOL)animate; +- (void)displayFindViewAnimating:(BOOL)animate; +- (void)displayRightSideViewAnimating:(BOOL)animate; - (void)showFindBar; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-18 14:14:19 UTC (rev 15489) +++ trunk/SKMainWindowController.m 2025-06-18 14:21:42 UTC (rev 15490) @@ -354,8 +354,8 @@ [self updateTableFont]; - [self displayLeftSideView:SKSidePaneStateThumbnail animating:NO]; - [self displayRightSideView:SKSidePaneStateNote animating:NO]; + [self displayLeftSideViewAnimating:NO]; + [self displayRightSideViewAnimating:NO]; // we need to create the PDFView before setting the toolbar pdfView = [[SKPDFView alloc] initWithFrame:[pdfContentView bounds]]; @@ -1297,7 +1297,7 @@ if (mwcFlags.leftSidePaneState != newLeftSidePaneState || [self displaysFindPane]) { mwcFlags.leftSidePaneState = newLeftSidePaneState; - [self displayLeftSideView:mwcFlags.leftSidePaneState animating:NO]; + [self displayLeftSideViewAnimating:NO]; } } @@ -1315,7 +1315,7 @@ mwcFlags.rightSidePaneState = newRightSidePaneState; - [self displayRightSideView:mwcFlags.rightSidePaneState animating:NO]; + [self displayRightSideViewAnimating:NO]; } } @@ -1327,12 +1327,12 @@ if (mwcFlags.findPaneState != newFindPaneState) { mwcFlags.findPaneState = newFindPaneState; - [self displayFindView:mwcFlags.findPaneState animating:NO]; + [self displayFindViewAnimating:NO]; [self updateFindResultHighlightsForDirection:NSDirectSelection]; } else if ([self displaysFindPane] == NO) { - [self displayFindView:mwcFlags.findPaneState animating:NO]; + [self displayFindViewAnimating:NO]; } } @@ -1536,8 +1536,8 @@ #pragma mark Swapping tables -- (void)displayLeftSideView:(SKLeftSidePaneState)state animating:(BOOL)animate { - if (state == SKSidePaneStateThumbnail) { +- (void)displayLeftSideViewAnimating:(BOOL)animate { + if (mwcFlags.leftSidePaneState == SKSidePaneStateThumbnail) { [leftSideController replaceSideView:leftSideController.thumbnailTableView.enclosingScrollView animate:animate]; [self updateThumbnailSelection]; } else { @@ -1546,8 +1546,8 @@ } } -- (void)displayFindView:(SKFindPaneState)state animating:(BOOL)animate { - if (state == SKFindPaneStateSingular) { +- (void)displayFindViewAnimating:(BOOL)animate { + if (mwcFlags.findPaneState == SKFindPaneStateSingular) { [leftSideController replaceSideView:leftSideController.findTableView.enclosingScrollView animate:animate]; } else { [leftSideController replaceSideView:leftSideController.groupedFindTableView.enclosingScrollView animate:animate]; @@ -1554,8 +1554,8 @@ } } -- (void)displayRightSideView:(SKRightSidePaneState)state animating:(BOOL)animate { - if (state == SKSidePaneStateNote) { +- (void)displayRightSideViewAnimating:(BOOL)animate { + if (mwcFlags.rightSidePaneState == SKSidePaneStateNote) { [rightSideController replaceSideView:rightSideController.noteOutlineView.enclosingScrollView animate:animate]; } else { [rightSideController replaceSideView:rightSideController.snapshotTableView.enclosingScrollView animate:animate]; Modified: trunk/SKMainWindowController_Actions.m =================================================================== --- trunk/SKMainWindowController_Actions.m 2025-06-18 14:14:19 UTC (rev 15489) +++ trunk/SKMainWindowController_Actions.m 2025-06-18 14:21:42 UTC (rev 15490) @@ -822,7 +822,7 @@ if ([searchString length] == 0) { if ([self displaysFindPane]) - [self displayLeftSideView:mwcFlags.leftSidePaneState animating:YES]; + [self displayLeftSideViewAnimating:YES]; [self updateRightStatus]; [self setSearchResults:nil]; @@ -850,7 +850,7 @@ } else { [pdfDoc beginFindString:[sender stringValue] withOptions:options]; } - [self displayFindView:mwcFlags.findPaneState animating:YES]; + [self displayFindViewAnimating:YES]; NSPasteboard *findPboard = [NSPasteboard pasteboardWithName:NSPasteboardNameFind]; [findPboard clearContents]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-18 14:14:21
|
Revision: 15489 http://sourceforge.net/p/skim-app/code/15489 Author: hofman Date: 2025-06-18 14:14:19 +0000 (Wed, 18 Jun 2025) Log Message: ----------- move method implementation Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-18 09:30:10 UTC (rev 15488) +++ trunk/SKMainWindowController.m 2025-06-18 14:14:19 UTC (rev 15489) @@ -1530,6 +1530,10 @@ return [[rightSideController.noteOutlineView headerView] menu]; } +- (BOOL)hasNoteToolbar { + return [noteToolbarController isVisible]; +} + #pragma mark Swapping tables - (void)displayLeftSideView:(SKLeftSidePaneState)state animating:(BOOL)animate { @@ -1558,10 +1562,6 @@ } } -- (BOOL)hasNoteToolbar { - return [noteToolbarController isVisible]; -} - #pragma mark Overview - (BOOL)hasOverview { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-18 09:30:13
|
Revision: 15488 http://sourceforge.net/p/skim-app/code/15488 Author: hofman Date: 2025-06-18 09:30:10 +0000 (Wed, 18 Jun 2025) Log Message: ----------- combine conditions Modified Paths: -------------- trunk/SKHighlightingTableRowView.m Modified: trunk/SKHighlightingTableRowView.m =================================================================== --- trunk/SKHighlightingTableRowView.m 2025-06-17 22:18:43 UTC (rev 15487) +++ trunk/SKHighlightingTableRowView.m 2025-06-18 09:30:10 UTC (rev 15488) @@ -136,23 +136,21 @@ } - (void)drawBackgroundInRect:(NSRect)dirtyRect { - if (@available(macOS 11.0, *)) {} else { - if (supportsHighlights && + if (@available(macOS 11.0, *)) {} else if (supportsHighlights && [self isSelected] == NO && [self highlightLevel] > 0 && [self isEmphasized]) { - NSRect rect = [[self viewAtColumn:0] frame]; - rgba color; - [[[NSColor selectedMenuItemColor] colorUsingColorSpace:[NSColorSpace sRGBColorSpace]] getRed:&color.r green:&color.g blue:&color.b alpha:NULL]; - color.a = fmin(1.0, 0.1 * [self highlightLevel]); - CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); - CGFloat domain[] = {0.0, 1.0}; - CGFloat range[] = {0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0}; - CGFunctionCallbacks callbacks = {0, &evaluateHighlight, NULL}; - CGFunctionRef function = CGFunctionCreate((void *)&color, 1, domain, 4, range, &callbacks); - CGShadingRef shading = CGShadingCreateAxial(colorSpace, CGPointMake(NSMinX(rect), 0.0), CGPointMake(NSMaxX(rect), 0.0), function, false, false); - CGColorSpaceRelease(colorSpace); - CGContextDrawShading([[NSGraphicsContext currentContext] CGContext], shading); - CGShadingRelease(shading); - } + NSRect rect = [[self viewAtColumn:0] frame]; + rgba color; + [[[NSColor selectedMenuItemColor] colorUsingColorSpace:[NSColorSpace sRGBColorSpace]] getRed:&color.r green:&color.g blue:&color.b alpha:NULL]; + color.a = fmin(1.0, 0.1 * [self highlightLevel]); + CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); + CGFloat domain[] = {0.0, 1.0}; + CGFloat range[] = {0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0}; + CGFunctionCallbacks callbacks = {0, &evaluateHighlight, NULL}; + CGFunctionRef function = CGFunctionCreate((void *)&color, 1, domain, 4, range, &callbacks); + CGShadingRef shading = CGShadingCreateAxial(colorSpace, CGPointMake(NSMinX(rect), 0.0), CGPointMake(NSMaxX(rect), 0.0), function, false, false); + CGColorSpaceRelease(colorSpace); + CGContextDrawShading([[NSGraphicsContext currentContext] CGContext], shading); + CGShadingRelease(shading); } [super drawBackgroundInRect:dirtyRect]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-17 22:18:45
|
Revision: 15487 http://sourceforge.net/p/skim-app/code/15487 Author: hofman Date: 2025-06-17 22:18:43 +0000 (Tue, 17 Jun 2025) Log Message: ----------- no need to check again for 10.14 Modified Paths: -------------- trunk/SKBasePDFView.m Modified: trunk/SKBasePDFView.m =================================================================== --- trunk/SKBasePDFView.m 2025-06-17 15:58:42 UTC (rev 15486) +++ trunk/SKBasePDFView.m 2025-06-17 22:18:43 UTC (rev 15487) @@ -86,7 +86,7 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey]) [[self scrollView] setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameAqua]]; - if (@available(macOS 11.0, *)) {} else if (@available(macOS 10.14, *)) { + if (@available(macOS 11.0, *)) {} else { [self handleScrollerStyleChangedNotification:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleScrollerStyleChangedNotification:) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-17 15:58:45
|
Revision: 15486 http://sourceforge.net/p/skim-app/code/15486 Author: hofman Date: 2025-06-17 15:58:42 +0000 (Tue, 17 Jun 2025) Log Message: ----------- define character set Modified Paths: -------------- trunk/NSCharacterSet_SKExtensions.h trunk/NSCharacterSet_SKExtensions.m trunk/SKMainWindowController.m Modified: trunk/NSCharacterSet_SKExtensions.h =================================================================== --- trunk/NSCharacterSet_SKExtensions.h 2025-06-17 15:55:02 UTC (rev 15485) +++ trunk/NSCharacterSet_SKExtensions.h 2025-06-17 15:58:42 UTC (rev 15486) @@ -42,6 +42,7 @@ @interface NSCharacterSet (SKExtensions) @property (class, nonatomic, readonly) NSCharacterSet *nonWhitespaceAndNewlineCharacterSet; +@property (class, nonatomic, readonly) NSCharacterSet *nonDecimalDigitCharacterSet; @property (class, nonatomic, readonly) NSCharacterSet *URLBookmarkNameAllowedCharacterSet; @property (class, nonatomic, readonly) NSCharacterSet *URLGenericAllowedCharacterSet; @end Modified: trunk/NSCharacterSet_SKExtensions.m =================================================================== --- trunk/NSCharacterSet_SKExtensions.m 2025-06-17 15:55:02 UTC (rev 15485) +++ trunk/NSCharacterSet_SKExtensions.m 2025-06-17 15:58:42 UTC (rev 15486) @@ -48,6 +48,13 @@ return nonWhitespaceAndNewlineCharacterSet; } ++ (NSCharacterSet *)nonDecimalDigitCharacterSet { + static NSCharacterSet *nonDecimalDigitCharacterSet = nil; + if (nonDecimalDigitCharacterSet == nil) + nonDecimalDigitCharacterSet = [[[NSCharacterSet decimalDigitCharacterSet] invertedSet] copy]; + return nonDecimalDigitCharacterSet; +} + + (NSCharacterSet *)URLBookmarkNameAllowedCharacterSet { static NSCharacterSet *URLBookmarkNameAllowedCharacterSet = nil; if (URLBookmarkNameAllowedCharacterSet == nil) { Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-17 15:55:02 UTC (rev 15485) +++ trunk/SKMainWindowController.m 2025-06-17 15:58:42 UTC (rev 15486) @@ -108,6 +108,7 @@ #import "SKPresentationView.h" #import "SKNoteToolbarController.h" #import "SKPresentationNotesAuxiliary.h" +#import "NSCharacterSet_SKExtensions.h" #define MULTIPLICATION_SIGN_CHARACTER (unichar)0x00d7 @@ -1261,7 +1262,7 @@ - (BOOL)validatePageLabel:(id *)value error:(NSError **)error { if ([pageLabels indexOfObject:*value] == NSNotFound) { - if ([PDFPage usesSequentialPageNumbering] == NO && [*value rangeOfCharacterFromSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]].location == NSNotFound) { + if ([PDFPage usesSequentialPageNumbering] == NO && [*value rangeOfCharacterFromSet:[NSCharacterSet nonDecimalDigitCharacterSet]].location == NSNotFound) { NSUInteger idx = [*value integerValue]; if (idx < [pageLabels count]) *value = [pageLabels objectAtIndex:idx]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-17 15:55:04
|
Revision: 15485 http://sourceforge.net/p/skim-app/code/15485 Author: hofman Date: 2025-06-17 15:55:02 +0000 (Tue, 17 Jun 2025) Log Message: ----------- translate page index into page label from user input Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-17 15:47:03 UTC (rev 15484) +++ trunk/SKMainWindowController.m 2025-06-17 15:55:02 UTC (rev 15485) @@ -1260,8 +1260,17 @@ } - (BOOL)validatePageLabel:(id *)value error:(NSError **)error { - if ([pageLabels indexOfObject:*value] == NSNotFound) - *value = [self pageLabel]; + if ([pageLabels indexOfObject:*value] == NSNotFound) { + if ([PDFPage usesSequentialPageNumbering] == NO && [*value rangeOfCharacterFromSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]].location == NSNotFound) { + NSUInteger idx = [*value integerValue]; + if (idx < [pageLabels count]) + *value = [pageLabels objectAtIndex:idx]; + else + *value = [self pageLabel]; + } else { + *value = [self pageLabel]; + } + } return YES; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-17 15:47:05
|
Revision: 15484 http://sourceforge.net/p/skim-app/code/15484 Author: hofman Date: 2025-06-17 15:47:03 +0000 (Tue, 17 Jun 2025) Log Message: ----------- validate page field Modified Paths: -------------- trunk/MainToolbar.xib Modified: trunk/MainToolbar.xib =================================================================== --- trunk/MainToolbar.xib 2025-06-17 15:36:15 UTC (rev 15483) +++ trunk/MainToolbar.xib 2025-06-17 15:47:03 UTC (rev 15484) @@ -576,7 +576,11 @@ <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> <connections> - <binding destination="190" name="value" keyPath="selection.pageLabel" id="193"/> + <binding destination="190" name="value" keyPath="selection.pageLabel" id="imy-RJ-pcB"> + <dictionary key="options"> + <bool key="NSValidatesImmediately" value="YES"/> + </dictionary> + </binding> </connections> </textField> <segmentedControl verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="39"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-17 15:36:17
|
Revision: 15483 http://sourceforge.net/p/skim-app/code/15483 Author: hofman Date: 2025-06-17 15:36:15 +0000 (Tue, 17 Jun 2025) Log Message: ----------- make sure KVO notifications are send, as we disable automatic ones Modified Paths: -------------- trunk/SKMainWindowController_Actions.m Modified: trunk/SKMainWindowController_Actions.m =================================================================== --- trunk/SKMainWindowController_Actions.m 2025-06-17 15:23:40 UTC (rev 15482) +++ trunk/SKMainWindowController_Actions.m 2025-06-17 15:36:15 UTC (rev 15483) @@ -368,9 +368,11 @@ [pageSheetController beginSheetModalForWindow:[self window] completionHandler:^(NSModalResponse result) { if (result == NSModalResponseOK) { NSString *label = [pageSheetController stringValue]; - if ([pageLabels containsObject:label]) + if ([pageLabels containsObject:label]) { + [self willChangeValueForKey:@"pageLabel"]; [self setPageLabel:label]; - else + [self didChangeValueForKey:@"pageLabel"]; + } else NSBeep(); } }]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-17 15:23:41
|
Revision: 15482 http://sourceforge.net/p/skim-app/code/15482 Author: hofman Date: 2025-06-17 15:23:40 +0000 (Tue, 17 Jun 2025) Log Message: ----------- reset cropped flag when reverting document Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-17 14:45:45 UTC (rev 15481) +++ trunk/SKMainWindowController.m 2025-06-17 15:23:40 UTC (rev 15482) @@ -1107,6 +1107,8 @@ else if (beforeMarkedPage.pageIndex >= pageCount) beforeMarkedPage.pageIndex = NSNotFound; + mwcFlags.hasCropped = 0; + [oldPdfDoc cancelFindString]; // make sure these will not be activated, or they can lead to a crash This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-17 14:45:46
|
Revision: 15481 http://sourceforge.net/p/skim-app/code/15481 Author: hofman Date: 2025-06-17 14:45:45 +0000 (Tue, 17 Jun 2025) Log Message: ----------- initialize some more ivars in main window controller Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-17 14:31:35 UTC (rev 15480) +++ trunk/SKMainWindowController.m 2025-06-17 14:45:45 UTC (rev 15481) @@ -222,9 +222,7 @@ self = [super initWithWindowNibName:@"MainWindow"]; if (self) { NSUserDefaults *sud = [NSUserDefaults standardUserDefaults]; - interactionMode = SKNormalMode; - searchResults = nil; - searchResultIndex = 0; + memset(&mwcFlags, 0, sizeof(mwcFlags)); mwcFlags.fullSizeContent = NO == [sud boolForKey:SKDisableSearchBarBlurringKey]; mwcFlags.caseInsensitiveSearch = [sud boolForKey:SKCaseInsensitiveSearchKey]; @@ -231,25 +229,44 @@ mwcFlags.wholeWordSearch = [sud boolForKey:SKWholeWordSearchKey]; mwcFlags.caseInsensitiveFilter = [sud boolForKey:SKCaseInsensitiveFilterKey]; mwcFlags.highlightAllSearchResults = [sud boolForKey:SKHighlightAllSearchResultsKey]; + mwcFlags.leftSidePaneState = SKSidePaneStateThumbnail; + mwcFlags.rightSidePaneState = SKSidePaneStateNote; + mwcFlags.findPaneState = SKFindPaneStateSingular; + + interactionMode = SKNormalMode; + + searchResults = nil; + searchResultIndex = 0; groupedSearchResults = nil; thumbnails = [[NSArray alloc] init]; notes = [[NSMutableArray alloc] init]; + widgets = nil; + widgetValues = nil; tags = [[NSArray alloc] init]; rating = 0.0; snapshots = [[NSMutableArray alloc] init]; pageLabels = [[NSArray alloc] init]; + lastViewedPages = [[NSPointerArray alloc] initWithOptions:NSPointerFunctionsOpaqueMemory | NSPointerFunctionsIntegerPersonality]; + lastLeftSidePaneWidth = 0.0; + lastRightSidePaneWidth = 0.0; + lastSplitPDFHeight = 0.0; + titleBarHeight = 0.0; + thumbnailCacheSize = 0.0; + snapshotCacheSize = 0.0; savedNormalSetup = [[NSMutableDictionary alloc] init]; - mwcFlags.leftSidePaneState = SKSidePaneStateThumbnail; - mwcFlags.rightSidePaneState = SKSidePaneStateNote; - mwcFlags.findPaneState = SKFindPaneStateSingular; + placeholderPdfDocument = nil; + placeholderWidgetProperties = nil; pageLabel = nil; markedPage = (SKDestination){NSNotFound, SKUnspecifiedPoint}; beforeMarkedPage = (SKDestination){NSNotFound, SKUnspecifiedPoint}; - activity = nil; presentationNotesDocument = nil; presentationNotesOffset = 0; + presentationNotesAuxiliary = nil; + activity = nil; + + undoGroupOldPropertiesPerNote = nil; } return self; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-17 14:31:37
|
Revision: 15480 http://sourceforge.net/p/skim-app/code/15480 Author: hofman Date: 2025-06-17 14:31:35 +0000 (Tue, 17 Jun 2025) Log Message: ----------- initialize point to unspecified point Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-17 14:19:05 UTC (rev 15479) +++ trunk/SKMainWindowController.m 2025-06-17 14:31:35 UTC (rev 15480) @@ -245,10 +245,8 @@ mwcFlags.rightSidePaneState = SKSidePaneStateNote; mwcFlags.findPaneState = SKFindPaneStateSingular; pageLabel = nil; - markedPage.pageIndex = NSNotFound; - markedPage.point = NSZeroPoint; - beforeMarkedPage.pageIndex = NSNotFound; - beforeMarkedPage.point = NSZeroPoint; + markedPage = (SKDestination){NSNotFound, SKUnspecifiedPoint}; + beforeMarkedPage = (SKDestination){NSNotFound, SKUnspecifiedPoint}; activity = nil; presentationNotesDocument = nil; presentationNotesOffset = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-17 14:19:07
|
Revision: 15479 http://sourceforge.net/p/skim-app/code/15479 Author: hofman Date: 2025-06-17 14:19:05 +0000 (Tue, 17 Jun 2025) Log Message: ----------- implement changed crop boxes in PDFDocument category Modified Paths: -------------- trunk/PDFDocument_SKExtensions.h trunk/PDFDocument_SKExtensions.m trunk/SKMainWindowController.m Modified: trunk/PDFDocument_SKExtensions.h =================================================================== --- trunk/PDFDocument_SKExtensions.h 2025-06-17 09:32:30 UTC (rev 15478) +++ trunk/PDFDocument_SKExtensions.h 2025-06-17 14:19:05 UTC (rev 15479) @@ -64,6 +64,7 @@ @property (nonatomic, readonly) BOOL allowsSaving; @property (nonatomic, readonly) BOOL allowsNotes; @property (nonatomic, readonly) BOOL realAllowsCommenting; +@property (nonatomic, nullable, copy) NSArray<NSString *> *changedCropBoxes; @property (nonatomic, nullable, readonly) NSArray<PDFAnnotation *> *detectedWidgets; @property (nonatomic, nullable, weak) NSDocument *containingDocument; - (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page; Modified: trunk/PDFDocument_SKExtensions.m =================================================================== --- trunk/PDFDocument_SKExtensions.m 2025-06-17 09:32:30 UTC (rev 15478) +++ trunk/PDFDocument_SKExtensions.m 2025-06-17 14:19:05 UTC (rev 15479) @@ -295,6 +295,29 @@ return document; } +- (NSArray *)changedCropBoxes { + NSMutableArray *cropBoxes = [NSMutableArray array]; + BOOL hasCrop = NO; + for (PDFPage *page in self) { + NSRect bounds = [page boundsForBox:kPDFDisplayBoxCropBox]; + NSRect origBounds = NSRectFromCGRect(CGPDFPageGetBoxRect([page pageRef], kCGPDFCropBox)); + if (NSEqualRects(bounds, origBounds)) { + [cropBoxes addObject:@""]; + } else { + [cropBoxes addObject:NSStringFromRect(bounds)]; + hasCrop = YES; + } + } + return hasCrop ? cropBoxes : nil; +} + +- (void)setChangedCropBoxes:(NSArray *)cropBoxes { + [cropBoxes enumerateObjectsUsingBlock:^(NSString *box, NSUInteger i, BOOL *stop){ + if ([box isEqualToString:@""] == NO) + [[self pageAtIndex:i] setBounds:NSRectFromString(box) forBox:kPDFDisplayBoxCropBox]; + }]; +} + - (void)setContainingDocument:(NSDocument *)document {} - (NSArray *)detectedWidgets { return nil; } Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-17 09:32:30 UTC (rev 15478) +++ trunk/SKMainWindowController.m 2025-06-17 14:19:05 UTC (rev 15479) @@ -529,32 +529,6 @@ mwcFlags.settingUpWindow = 0; } -- (NSArray *)changedCropBoxes { - NSMutableArray *cropBoxes = [NSMutableArray array]; - BOOL hasCrop = NO; - for (PDFPage *page in [self pdfDocument]) { - NSRect bounds = [page boundsForBox:kPDFDisplayBoxCropBox]; - NSRect origBounds = NSRectFromCGRect(CGPDFPageGetBoxRect([page pageRef], kCGPDFCropBox)); - if (NSEqualRects(bounds, origBounds)) { - [cropBoxes addObject:@""]; - } else { - [cropBoxes addObject:NSStringFromRect(bounds)]; - hasCrop = YES; - } - } - return hasCrop ? cropBoxes : nil; -} - -- (void)applyChangedCropBoxes:(NSArray *)cropBoxes inDocument:(PDFDocument *)pdfDoc { - if ([cropBoxes count] && [cropBoxes count] == [pdfDoc pageCount]) { - [cropBoxes enumerateObjectsUsingBlock:^(NSString *box, NSUInteger i, BOOL *stop){ - if ([box isEqualToString:@""] == NO) - [[pdfDoc pageAtIndex:i] setBounds:NSRectFromString(box) forBox:kPDFDisplayBoxCropBox]; - }]; - mwcFlags.hasCropped = 1; - } -} - - (void)applyLeftSideWidth:(CGFloat)leftSideWidth rightSideWidth:(CGFloat)rightSideWidth { [splitView setPosition:leftSideWidth ofDividerAtIndex:0]; [splitView setPosition:[splitView maxPossiblePositionOfDividerAtIndex:1] - [splitView dividerThickness] - rightSideWidth ofDividerAtIndex:1]; @@ -601,7 +575,11 @@ [pdfView setDisplaySettingsAndRewind:setup]; } - [self applyChangedCropBoxes:[setup objectForKey:CROPBOXES_KEY] inDocument:[self pdfDocument]]; + NSArray *cropBoxes = [setup objectForKey:CROPBOXES_KEY]; + if ([cropBoxes count] && [cropBoxes count] == [[self pdfDocument] pageCount]) { + [[self pdfDocument] setChangedCropBoxes:cropBoxes]; + mwcFlags.hasCropped = 1; + } NSArray *snapshotSetups = [setup objectForKey:SNAPSHOTS_KEY]; if ([snapshotSetups count]) @@ -617,7 +595,7 @@ - (NSDictionary *)currentSetup { NSMutableDictionary *setup = [NSMutableDictionary dictionary]; SKDestination dest = [pdfView currentDestination:YES]; - NSArray *cropBoxes = [self changedCropBoxes]; + NSArray *cropBoxes = [[self pdfDocument] changedCropBoxes]; if ([self interactionMode] == SKPresentationMode) [setup setObject:NSStringFromRect([savedNormalWindow frame]) forKey:MAINWINDOWFRAME_KEY]; @@ -1159,8 +1137,13 @@ } } - if (unlocked) - [self applyChangedCropBoxes:[savedNormalSetup objectForKey:CROPBOXES_KEY] inDocument:pdfDocument]; + if (unlocked && pageCount) { + NSArray *cropBoxes = [savedNormalSetup objectForKey:CROPBOXES_KEY]; + if ([cropBoxes count] == pageCount) { + [pdfDocument setChangedCropBoxes:cropBoxes]; + mwcFlags.hasCropped = 1; + } + } if ([noteDicts count]) { PDFDocument *pdfDoc = pdfDocument; @@ -2105,7 +2088,11 @@ settings = [savedNormalSetup objectForKey:AUTOSCALES_KEY] ? savedNormalSetup : [[NSUserDefaults standardUserDefaults] dictionaryForKey:SKDefaultPDFDisplaySettingsKey]; [pdfView setDisplaySettings:settings]; - [self applyChangedCropBoxes:[savedNormalSetup objectForKey:CROPBOXES_KEY] inDocument:[self pdfDocument]]; + NSArray *cropBoxes = [savedNormalSetup objectForKey:CROPBOXES_KEY]; + if ([cropBoxes count] && [cropBoxes count] == [[self pdfDocument] pageCount]) { + [[self pdfDocument] setChangedCropBoxes:cropBoxes]; + mwcFlags.hasCropped = 1; + } SKDestination dest = [self destinationFromSetup:savedNormalSetup]; if (dest.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-17 09:32:31
|
Revision: 15478 http://sourceforge.net/p/skim-app/code/15478 Author: hofman Date: 2025-06-17 09:32:30 +0000 (Tue, 17 Jun 2025) Log Message: ----------- use block based enumeration Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-16 21:40:27 UTC (rev 15477) +++ trunk/SKMainWindowController.m 2025-06-17 09:32:30 UTC (rev 15478) @@ -546,16 +546,12 @@ } - (void)applyChangedCropBoxes:(NSArray *)cropBoxes inDocument:(PDFDocument *)pdfDoc { - if ([cropBoxes count]) { - NSUInteger i, iMax = [pdfDoc pageCount]; - if ([cropBoxes count] == iMax) { - for (i = 0; i < iMax; i++) { - NSString *box = [cropBoxes objectAtIndex:i]; - if ([box isEqualToString:@""] == NO) - [[pdfDoc pageAtIndex:i] setBounds:NSRectFromString(box) forBox:kPDFDisplayBoxCropBox]; - } - mwcFlags.hasCropped = 1; - } + if ([cropBoxes count] && [cropBoxes count] == [pdfDoc pageCount]) { + [cropBoxes enumerateObjectsUsingBlock:^(NSString *box, NSUInteger i, BOOL *stop){ + if ([box isEqualToString:@""] == NO) + [[pdfDoc pageAtIndex:i] setBounds:NSRectFromString(box) forBox:kPDFDisplayBoxCropBox]; + }]; + mwcFlags.hasCropped = 1; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-16 21:40:29
|
Revision: 15477 http://sourceforge.net/p/skim-app/code/15477 Author: hofman Date: 2025-06-16 21:40:27 +0000 (Mon, 16 Jun 2025) Log Message: ----------- remove unused predeclaration Modified Paths: -------------- trunk/SKMainDocument.h Modified: trunk/SKMainDocument.h =================================================================== --- trunk/SKMainDocument.h 2025-06-16 21:39:35 UTC (rev 15476) +++ trunk/SKMainDocument.h 2025-06-16 21:40:27 UTC (rev 15477) @@ -43,7 +43,7 @@ extern NSString *SKSkimFileDidSaveNotification; -@class PDFDocument, SKMainWindowController, SKPDFView, SKLine, SKProgressController, SKTemporaryData, SKFileUpdateChecker, SKExportAccessoryController, PDFAnnotation, SKSnapshotWindowController; +@class PDFDocument, SKMainWindowController, SKPDFView, SKLine, SKTemporaryData, SKFileUpdateChecker, SKExportAccessoryController, PDFAnnotation, SKSnapshotWindowController; @interface SKMainDocument : NSDocument <SKPDFSynchronizerDelegate> { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-16 21:39:37
|
Revision: 15476 http://sourceforge.net/p/skim-app/code/15476 Author: hofman Date: 2025-06-16 21:39:35 +0000 (Mon, 16 Jun 2025) Log Message: ----------- remove unused imports Modified Paths: -------------- trunk/SKMainWindowController_Actions.m trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_Actions.m =================================================================== --- trunk/SKMainWindowController_Actions.m 2025-06-16 21:31:24 UTC (rev 15475) +++ trunk/SKMainWindowController_Actions.m 2025-06-16 21:39:35 UTC (rev 15476) @@ -53,7 +53,6 @@ #import "NSGeometry_SKExtensions.h" #import "SKTextFieldSheetController.h" #import "SKPresentationOptionsSheetController.h" -#import "SKProgressController.h" #import "SKInfoWindowController.h" #import "SKMainDocument.h" #import "SKStatusBar.h" Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-16 21:31:24 UTC (rev 15475) +++ trunk/SKMainWindowController_UI.m 2025-06-16 21:39:35 UTC (rev 15476) @@ -49,7 +49,6 @@ #import "SKNoteTextView.h" #import "NSWindowController_SKExtensions.h" #import "SKSideWindow.h" -#import "SKProgressController.h" #import "SKAnnotationTypeImageView.h" #import "SKStringConstants.h" #import <SkimNotes/SkimNotes.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-16 21:31:26
|
Revision: 15475 http://sourceforge.net/p/skim-app/code/15475 Author: hofman Date: 2025-06-16 21:31:24 +0000 (Mon, 16 Jun 2025) Log Message: ----------- note window controller is closed implicitly when removing note Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-16 21:26:11 UTC (rev 15474) +++ trunk/SKMainWindowController.m 2025-06-16 21:31:24 UTC (rev 15475) @@ -2291,8 +2291,6 @@ if ([[self selectedNotes] containsObject:annotation]) [rightSideController.noteOutlineView deselectAll:self]; - [[self windowControllerForNote:annotation] close]; - mwcFlags.updatingNoteSelection = 1; NSUInteger i = [notes indexOfObject:annotation]; if (i != NSNotFound) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-16 21:26:13
|
Revision: 15474 http://sourceforge.net/p/skim-app/code/15474 Author: hofman Date: 2025-06-16 21:26:11 +0000 (Mon, 16 Jun 2025) Log Message: ----------- return presentation undo manager only when it was needed Modified Paths: -------------- trunk/SKMainWindowController.h trunk/SKMainWindowController.m trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2025-06-16 16:56:44 UTC (rev 15473) +++ trunk/SKMainWindowController.h 2025-06-16 21:26:11 UTC (rev 15474) @@ -256,8 +256,6 @@ @property (nonatomic, nullable, weak) NSDocument *presentationNotesDocument; @property (nonatomic) NSInteger presentationNotesOffset; -@property (nonatomic, nullable, readonly) NSUndoManager *presentationUndoManager; - @property (nonatomic, copy) NSArray<NSString *> *tags; @property (nonatomic) double rating; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-16 16:56:44 UTC (rev 15473) +++ trunk/SKMainWindowController.m 2025-06-16 21:26:11 UTC (rev 15474) @@ -214,7 +214,7 @@ @implementation SKMainWindowController @synthesize splitView, topConstraint, centerContentView, pdfSplitView, pdfContentView, findBarTopConstraint, statusBar, pdfView, secondaryPdfView, leftSideContentView, rightSideContentView, presentationNotesDocument, presentationNotesOffset, notes, thumbnails, snapshots, searchResults, groupedSearchResults, tags, rating, pageLabel, interactionMode, placeholderPdfDocument; -@dynamic pdfDocument, presentationUndoManager, selectedNotes, hasNotes, widgetProperties, currentPage, leftSidePaneState, rightSidePaneState, findPaneState, displaysFindPane, leftSidePaneIsOpen, rightSidePaneIsOpen, searchString, hasNoteToolbar, hasOverview, notesMenu; +@dynamic pdfDocument, selectedNotes, hasNotes, widgetProperties, currentPage, leftSidePaneState, rightSidePaneState, findPaneState, displaysFindPane, leftSidePaneIsOpen, rightSidePaneIsOpen, searchString, hasNoteToolbar, hasOverview, notesMenu; + (BOOL)automaticallyNotifiesObserversOfPageLabel { return NO; } Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-16 16:56:44 UTC (rev 15473) +++ trunk/SKMainWindowController_UI.m 2025-06-16 21:26:11 UTC (rev 15474) @@ -92,6 +92,7 @@ #import "SKPresentationView.h" #import "SKBookmarkController.h" #import "SKNoteToolbarController.h" +#import "SKPresentationNotesAuxiliary.h" #define NOTES_KEY @"notes" #define SNAPSHOTS_KEY @"snapshots" @@ -327,9 +328,10 @@ } - (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)window { + NSUndoManager *undoManager = nil; if ([self interactionMode] == SKPresentationMode) - return [self presentationUndoManager]; - return [[self document] undoManager]; + undoManager = [presentationNotesAuxiliary undoManager]; + return undoManager ?: [[self document] undoManager]; } - (void)window:(NSWindow *)window willSendEvent:(NSEvent *)event { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-16 16:56:47
|
Revision: 15473 http://sourceforge.net/p/skim-app/code/15473 Author: hofman Date: 2025-06-16 16:56:44 +0000 (Mon, 16 Jun 2025) Log Message: ----------- Keep some auxiliary objects for presentation notes in a temporary object Modified Paths: -------------- trunk/SKMainWindowController.h trunk/SKMainWindowController.m trunk/SKMainWindowController_FullScreen.m trunk/Skim.xcodeproj/project.pbxproj Added Paths: ----------- trunk/SKPresentationNotesAuxiliary.h trunk/SKPresentationNotesAuxiliary.m Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2025-06-16 15:28:02 UTC (rev 15472) +++ trunk/SKMainWindowController.h 2025-06-16 16:56:44 UTC (rev 15473) @@ -71,6 +71,7 @@ @class PDFAnnotation, PDFSelection, SKGroupedSearchResult; @class SKPDFView, SKSecondaryPDFView, SKPresentationView, SKStatusBar, SKFindController, SKSplitView, SKFieldEditor, SKOverviewView, SKSideWindow; @class SKLeftSideViewController, SKRightSideViewController, SKMainToolbarController, SKMainTouchBarController, SKNoteToolbarController, SKProgressController, SKNoteTypeSheetController, SKSnapshotWindowController, SKTransitionController; +@class SKPresentationNotesAuxiliary; @interface SKMainWindowController : NSWindowController <SKSnapshotWindowControllerDelegate, SKThumbnailDelegate, SKFindControllerDelegate, SKPDFViewDelegate, SKPDFDocumentDelegate, NSTouchBarDelegate> { SKSplitView *splitView; @@ -136,12 +137,8 @@ __weak NSDocument *presentationNotesDocument; NSInteger presentationNotesOffset; - SKSnapshotWindowController *presentationPreview; - NSButton *presentationNotesButton; - NSTrackingArea *presentationNotesTrackingArea; - NSMutableArray<PDFAnnotation *> *presentationNotes; - NSUndoManager *presentationUndoManager; + SKPresentationNotesAuxiliary *presentationNotesAuxiliary; NSButton *colorAccessoryView; NSButton *textColorAccessoryView; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-16 15:28:02 UTC (rev 15472) +++ trunk/SKMainWindowController.m 2025-06-16 16:56:44 UTC (rev 15473) @@ -107,6 +107,7 @@ #import "SKThumbnailStamp.h" #import "SKPresentationView.h" #import "SKNoteToolbarController.h" +#import "SKPresentationNotesAuxiliary.h" #define MULTIPLICATION_SIGN_CHARACTER (unichar)0x00d7 @@ -1509,9 +1510,14 @@ } - (NSUndoManager *)presentationUndoManager { - if (presentationUndoManager == nil) - presentationUndoManager = [[SKChainedUndoManager alloc] initWithNextUndoManager:[[self document] undoManager]]; - return presentationUndoManager; + NSUndoManager *undoManager = [presentationNotesAuxiliary undoManager]; + if (undoManager == nil) { + if (presentationNotesAuxiliary == nil) + presentationNotesAuxiliary = [[SKPresentationNotesAuxiliary alloc] init]; + undoManager = [[SKChainedUndoManager alloc] initWithNextUndoManager:[[self document] undoManager]]; + [presentationNotesAuxiliary setUndoManager:undoManager]; + } + return undoManager; } - (NSMenu *)notesMenu { @@ -2232,9 +2238,7 @@ [annotation setShouldDisplay:YES]; [annotation setShouldPrint:NO]; - if (presentationNotes == nil) - presentationNotes = [[NSMutableArray alloc] init]; - [presentationNotes addObject:annotation]; + [presentationNotesAuxiliary addNote:annotation]; [self updateThumbnailAtPageIndex:[page pageIndex]]; [presentationView setNeedsDisplayForPage:page]; } else { @@ -2273,7 +2277,7 @@ if (mwcFlags.isSwitchingFullScreen == 0) { [[[self presentationUndoManager] prepareWithInvocationTarget:[notification object]] addAnnotation:annotation toPage:page]; - [presentationNotes removeObject:annotation]; + [presentationNotesAuxiliary removeNote:annotation]; [self updateThumbnailAtPageIndex:[page pageIndex]]; [presentationView setNeedsDisplayForPage:page]; } else { @@ -2424,8 +2428,8 @@ } - (void)snapshotControllerWillClose:(SKSnapshotWindowController *)controller { - if (controller == presentationPreview) { - presentationPreview = nil; + if (controller == [presentationNotesAuxiliary previewController]) { + [presentationNotesAuxiliary setPreviewController:nil]; } else { [rightSideController.snapshotTableView beginUpdates]; NSUInteger row = [[rightSideController.snapshotArrayController arrangedObjects] indexOfObject:controller]; @@ -2444,7 +2448,7 @@ } - (void)snapshotControllerDidChange:(SKSnapshotWindowController *)controller { - if (controller != presentationPreview) { + if (controller != [presentationNotesAuxiliary previewController]) { [self snapshotNeedsUpdate:controller]; [rightSideController.snapshotArrayController rearrangeObjects]; [rightSideController.snapshotTableView reloadData]; @@ -2453,13 +2457,13 @@ } - (void)snapshotControllerDidMove:(SKSnapshotWindowController *)controller { - if (controller != presentationPreview) { + if (controller != [presentationNotesAuxiliary previewController]) { [[self document] setRecentInfoNeedsUpdate:YES]; } } - (NSRect)snapshotController:(SKSnapshotWindowController *)controller miniaturizedRect:(BOOL)isMiniaturize { - if (controller == presentationPreview) + if (controller == [presentationNotesAuxiliary previewController]) return NSZeroRect; NSRect rect = NSZeroRect; if ([self hasOverview]) { Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-06-16 15:28:02 UTC (rev 15472) +++ trunk/SKMainWindowController_FullScreen.m 2025-06-16 16:56:44 UTC (rev 15473) @@ -69,6 +69,7 @@ #import "NSWindow_SKExtensions.h" #import "SKImageToolTipWindow.h" #import "SKNoteToolbarController.h" +#import "SKPresentationNotesAuxiliary.h" #define MAINWINDOWFRAME_KEY @"windowFrame" #define TABGROUP_KEY @"tabGroup" @@ -145,19 +146,23 @@ PDFDocument *pdfDoc = [[self presentationNotesDocument] pdfDocument]; NSInteger offset = [self presentationNotesOffset]; NSUInteger pageIndex = MAX(0, MIN((NSInteger)[pdfDoc pageCount], (NSInteger)[[pdfView currentPage] pageIndex] + offset)); + + if (presentationNotesAuxiliary == nil) + presentationNotesAuxiliary = [[SKPresentationNotesAuxiliary alloc] init]; + if ([self presentationNotesDocument] == [self document]) { - presentationPreview = [[SKSnapshotWindowController alloc] init]; + SKSnapshotWindowController *preview = [[SKSnapshotWindowController alloc] init]; - [presentationPreview setDelegate:self]; + [presentationNotesAuxiliary setPreviewController:preview]; + [preview setDelegate:self]; + NSScreen *screen = [window screen]; screen = [[screen alternateScreens] firstObject] ?: screen; - [presentationPreview setPdfDocument:[pdfView document] - previewPageNumber:pageIndex - displayOnScreen:screen]; - - [[self document] addWindowController:presentationPreview]; + [preview setPdfDocument:[pdfView document] previewPageNumber:pageIndex displayOnScreen:screen]; + + [[self document] addWindowController:preview]; } else { [[self presentationNotesDocument] setCurrentPage:[pdfDoc pageAtIndex:pageIndex]]; } @@ -178,7 +183,7 @@ NSInteger offset = [self presentationNotesOffset]; NSUInteger pageIndex = (NSUInteger)MAX(0, MIN((NSInteger)[pdfDoc pageCount], (NSInteger)[[pdfView currentPage] pageIndex] + offset)); if ([self presentationNotesDocument] == [self document]) - [[presentationPreview pdfView] goToCurrentPage:[pdfDoc pageAtIndex:pageIndex]]; + [[[presentationNotesAuxiliary previewController] pdfView] goToCurrentPage:[pdfDoc pageAtIndex:pageIndex]]; else [[self presentationNotesDocument] setCurrentPage:[pdfDoc pageAtIndex:pageIndex]]; } @@ -284,7 +289,7 @@ [[presentationWindow animator] setAlphaValue:1.0]; if (shouldFadeOut) [[normalWindow animator] setAlphaValue:0.0]; - [[[presentationPreview window] animator] setAlphaValue:1.0]; + [[[[presentationNotesAuxiliary previewController] window] animator] setAlphaValue:1.0]; } completionHandler:^{ // only hide the dock and menubar when the presentation window is on the primary screen, otherwise no need to block main menu and dock @@ -321,13 +326,11 @@ if ([self leftSidePaneIsOpen]) [self hideSideWindow]; - if ([presentationNotes count]) { + if ([[presentationNotesAuxiliary notes] count]) { PDFDocument *pdfDoc = [self pdfDocument]; - for (PDFAnnotation *annotation in [presentationNotes copy]) + for (PDFAnnotation *annotation in [[presentationNotesAuxiliary notes] copy]) [pdfDoc removeAnnotation:annotation]; } - presentationNotes = nil; - presentationUndoManager = nil; [presentationView willClose]; [[NSNotificationCenter defaultCenter] removeObserver:self name:SKPresentationViewPageChangedNotification object:presentationView]; @@ -414,7 +417,7 @@ if ([normalWindow alphaValue] < 1.0) [[normalWindow animator] setAlphaValue:1.0]; [[presentationWindow animator] setAlphaValue:0.0]; - [[[presentationPreview window] animator] setAlphaValue:0.0]; + [[[[presentationNotesAuxiliary previewController] window] animator] setAlphaValue:0.0]; } completionHandler:^{ if ([overviewContentView window] == presentationWindow) @@ -423,11 +426,13 @@ [presentationView setPage:nil]; [presentationView setAutoScales:NO]; - if (presentationPreview) { - [[presentationPreview window] setAnimationBehavior:NSWindowAnimationBehaviorNone]; - [presentationPreview close]; + if ([presentationNotesAuxiliary previewController]) { + [[[presentationNotesAuxiliary previewController] window] setAnimationBehavior:NSWindowAnimationBehaviorNone]; + [[presentationNotesAuxiliary previewController] close]; } + presentationNotesAuxiliary = nil; + mwcFlags.isSwitchingFullScreen = 0; if (mwcFlags.wantsPresentationOrFullScreen) { @@ -457,7 +462,7 @@ - (void)forceSubwindowsOnTop:(BOOL)flag { for (NSWindowController *wc in [[self document] windowControllers]) { - if ([wc respondsToSelector:@selector(setForceOnTop:)] && wc != presentationPreview) + if ([wc respondsToSelector:@selector(setForceOnTop:)] && wc != [presentationNotesAuxiliary previewController]) [(id)wc setForceOnTop:flag]; } } @@ -714,7 +719,7 @@ - (NSView *)presentationNotesView { if ([[self presentationNotesDocument] isEqual:[self document]]) - return [presentationPreview pdfView]; + return [[presentationNotesAuxiliary previewController] pdfView]; else return [(SKMainDocument *)[self presentationNotesDocument] pdfView]; } @@ -723,30 +728,28 @@ [self removePresentationNotesNavigation]; NSView *notesView = [self presentationNotesView]; if (notesView) { - presentationNotesTrackingArea = [[NSTrackingArea alloc] initWithRect:NSZeroRect options:NSTrackingMouseEnteredAndExited | NSTrackingActiveInActiveApp | NSTrackingInVisibleRect owner:self userInfo:nil]; - [notesView addTrackingArea:presentationNotesTrackingArea]; + NSTrackingArea *trackingArea = [[NSTrackingArea alloc] initWithRect:NSZeroRect options:NSTrackingMouseEnteredAndExited | NSTrackingActiveInActiveApp | NSTrackingInVisibleRect owner:self userInfo:nil]; + [notesView addTrackingArea:trackingArea]; + [presentationNotesAuxiliary setTrackingArea:trackingArea]; } } - (void)removePresentationNotesNavigation { - if (presentationNotesTrackingArea) { - [[self presentationNotesView] removeTrackingArea:presentationNotesTrackingArea]; - presentationNotesTrackingArea = nil; - } - if (presentationNotesButton) { - [presentationNotesButton removeFromSuperview]; - presentationNotesButton = nil; - } + if ([presentationNotesAuxiliary trackingArea]) + [[self presentationNotesView] removeTrackingArea:[presentationNotesAuxiliary trackingArea]]; + if ([presentationNotesAuxiliary button]) + [[presentationNotesAuxiliary button] removeFromSuperview]; } - (void)mouseEntered:(NSEvent *)event { - if ([event trackingArea] == presentationNotesTrackingArea) { + if ([event trackingArea] == [presentationNotesAuxiliary trackingArea]) { NSView *notesView = [self presentationNotesView]; - if (presentationNotesButton == nil) { - presentationNotesButton = [[NSButton alloc] initWithFrame:NSMakeRect(0.0, 0.0, 30.0, 50.0)]; - [presentationNotesButton setButtonType:NSMomentaryChangeButton]; - [presentationNotesButton setBordered:NO]; - [presentationNotesButton setImage:[NSImage imageWithSize:NSMakeSize(30.0, 50.0) flipped:NO drawingHandler:^(NSRect rect){ + NSButton *button = [presentationNotesAuxiliary button]; + if ([presentationNotesAuxiliary button] == nil) { + button = [[NSButton alloc] initWithFrame:NSMakeRect(0.0, 0.0, 30.0, 50.0)]; + [button setButtonType:NSMomentaryChangeButton]; + [button setBordered:NO]; + [button setImage:[NSImage imageWithSize:NSMakeSize(30.0, 50.0) flipped:NO drawingHandler:^(NSRect rect){ NSBezierPath *path = [NSBezierPath bezierPath]; [path moveToPoint:NSMakePoint(5.0, 45.0)]; [path lineToPoint:NSMakePoint(25.0, 25.0)]; @@ -760,18 +763,19 @@ [path stroke]; return YES; }]]; - [presentationNotesButton setTarget:self]; - [presentationNotesButton setAction:@selector(doGoToNextPage:)]; - [presentationNotesButton setAutoresizingMask:NSViewMinXMargin | NSViewMaxXMargin | NSViewMinYMargin | NSViewMaxYMargin]; - [[presentationNotesButton cell] setAccessibilityLabel:NSLocalizedString(@"Next", @"")]; + [button setTarget:self]; + [button setAction:@selector(doGoToNextPage:)]; + [button setAutoresizingMask:NSViewMinXMargin | NSViewMaxXMargin | NSViewMinYMargin | NSViewMaxYMargin]; + [[button cell] setAccessibilityLabel:NSLocalizedString(@"Next", @"")]; + [presentationNotesAuxiliary setButton:button]; } - [presentationNotesButton setAlphaValue:0.0]; - [presentationNotesButton setFrame:SKRectFromCenterAndSize(SKCenterPoint([notesView frame]), [presentationNotesButton frame].size)]; - [notesView addSubview:presentationNotesButton positioned:NSWindowAbove relativeTo:nil]; + [button setAlphaValue:0.0]; + [button setFrame:SKRectFromCenterAndSize(SKCenterPoint([notesView frame]), [button frame].size)]; + [notesView addSubview:button positioned:NSWindowAbove relativeTo:nil]; [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){ - [[presentationNotesButton animator] setAlphaValue:1.0]; + [[button animator] setAlphaValue:1.0]; } completionHandler:^{}]; - NSAccessibilityPostNotificationWithUserInfo(NSAccessibilityUnignoredAncestor(notesView), NSAccessibilityLayoutChangedNotification, [NSDictionary dictionaryWithObjectsAndKeys:NSAccessibilityUnignoredChildrenForOnlyChild(presentationNotesButton), NSAccessibilityUIElementsKey, nil]); + NSAccessibilityPostNotificationWithUserInfo(NSAccessibilityUnignoredAncestor(notesView), NSAccessibilityLayoutChangedNotification, [NSDictionary dictionaryWithObjectsAndKeys:NSAccessibilityUnignoredChildrenForOnlyChild(button), NSAccessibilityUIElementsKey, nil]); } else if ([[SKMainWindowController superclass] instancesRespondToSelector:_cmd]) { [super mouseEntered:event]; } @@ -778,11 +782,11 @@ } - (void)mouseExited:(NSEvent *)event { - if ([event trackingArea] == presentationNotesTrackingArea && presentationNotesButton) { + if ([event trackingArea] == [presentationNotesAuxiliary trackingArea] && [presentationNotesAuxiliary button]) { [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){ - [[presentationNotesButton animator] setAlphaValue:0.0]; + [[[presentationNotesAuxiliary button] animator] setAlphaValue:0.0]; } completionHandler:^{ - [presentationNotesButton removeFromSuperview]; + [[presentationNotesAuxiliary button] removeFromSuperview]; }]; NSAccessibilityPostNotificationWithUserInfo(NSAccessibilityUnignoredAncestor([self presentationNotesView]), NSAccessibilityLayoutChangedNotification, nil); } else if ([[SKMainWindowController superclass] instancesRespondToSelector:_cmd]) { Added: trunk/SKPresentationNotesAuxiliary.h =================================================================== --- trunk/SKPresentationNotesAuxiliary.h (rev 0) +++ trunk/SKPresentationNotesAuxiliary.h 2025-06-16 16:56:44 UTC (rev 15473) @@ -0,0 +1,68 @@ +// +// SKPresentationNotesAuxiliary.h +// Skim +// +// Created by Christiaan Hofman on 16/06/2025. +/* + This software is Copyright (c) 2025 + Christiaan Hofman. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Christiaan Hofman nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import <Cocoa/Cocoa.h> + +NS_ASSUME_NONNULL_BEGIN + +@class SKSnapshotWindowController, PDFAnnotation; + +@interface SKPresentationNotesAuxiliary : NSObject { + SKSnapshotWindowController *previewController; + + NSButton *button; + NSTrackingArea *trackingArea; + + NSUndoManager *undoManager; + NSMutableArray<PDFAnnotation *> *notes; +} + +@property (nonatomic, nullable, strong) SKSnapshotWindowController *previewController; + +@property (nonatomic, nullable, strong) NSButton *button; +@property (nonatomic, nullable, strong) NSTrackingArea *trackingArea; + +@property (nonatomic, nullable, strong) NSUndoManager *undoManager; +@property (nonatomic, nullable, readonly) NSArray<PDFAnnotation *> *notes; + +- (void)addNote:(PDFAnnotation *)note; +- (void)removeNote:(PDFAnnotation *)note; + +@end + +NS_ASSUME_NONNULL_END Added: trunk/SKPresentationNotesAuxiliary.m =================================================================== --- trunk/SKPresentationNotesAuxiliary.m (rev 0) +++ trunk/SKPresentationNotesAuxiliary.m 2025-06-16 16:56:44 UTC (rev 15473) @@ -0,0 +1,55 @@ +// +// SKPresentationNotesAuxiliary.m +// Skim +// +// Created by Christiaan Hofman on 16/06/2025. +/* + This software is Copyright (c) 2025 + Christiaan Hofman. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Christiaan Hofman nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SKPresentationNotesAuxiliary.h" + +@implementation SKPresentationNotesAuxiliary + +@synthesize previewController, button, trackingArea, undoManager, notes; + +- (void)addNote:(PDFAnnotation *)note { + if (notes == nil) + notes = [[NSMutableArray alloc] init]; + [notes addObject:note]; +} + +- (void)removeNote:(PDFAnnotation *)note { + [notes removeObject:note]; +} + +@end Modified: trunk/Skim.xcodeproj/project.pbxproj =================================================================== --- trunk/Skim.xcodeproj/project.pbxproj 2025-06-16 15:28:02 UTC (rev 15472) +++ trunk/Skim.xcodeproj/project.pbxproj 2025-06-16 16:56:44 UTC (rev 15473) @@ -101,6 +101,7 @@ CE2DEB1C0B8618DE00D0DA12 /* SKFindController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE2DEB1B0B8618DE00D0DA12 /* SKFindController.m */; }; CE2DED6C0B86334900D0DA12 /* SKFieldEditor.m in Sources */ = {isa = PBXBuildFile; fileRef = CE2DED6B0B86334900D0DA12 /* SKFieldEditor.m */; }; CE2E9A592C14D2F300044B01 /* SKSnapshotConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = CE2E9A582C14D2F300044B01 /* SKSnapshotConfiguration.m */; }; + CE31960F2E00779000996E40 /* SKPresentationNotesAuxiliary.m in Sources */ = {isa = PBXBuildFile; fileRef = CE31960E2E00779000996E40 /* SKPresentationNotesAuxiliary.m */; }; CE31A6180C01FC45003612A9 /* SKDocumentController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE31A6160C01FC45003612A9 /* SKDocumentController.m */; }; CE32531F0F4723EA0021BADD /* SKMainWindowController_Actions.m in Sources */ = {isa = PBXBuildFile; fileRef = CE32531E0F4723EA0021BADD /* SKMainWindowController_Actions.m */; }; CE325592226F73810032390F /* SKAnnotationTypeImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = CE325591226F73810032390F /* SKAnnotationTypeImageView.m */; }; @@ -891,6 +892,8 @@ CE2E9A582C14D2F300044B01 /* SKSnapshotConfiguration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SKSnapshotConfiguration.m; sourceTree = "<group>"; }; CE2EF6852022753D004A73D8 /* synctex_parser_advanced.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = synctex_parser_advanced.h; sourceTree = "<group>"; }; CE2EF68D2022753D004A73D8 /* synctex_version.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = synctex_version.h; sourceTree = "<group>"; }; + CE31960D2E00779000996E40 /* SKPresentationNotesAuxiliary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SKPresentationNotesAuxiliary.h; sourceTree = "<group>"; }; + CE31960E2E00779000996E40 /* SKPresentationNotesAuxiliary.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SKPresentationNotesAuxiliary.m; sourceTree = "<group>"; }; CE31A6150C01FC45003612A9 /* SKDocumentController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKDocumentController.h; sourceTree = "<group>"; }; CE31A6160C01FC45003612A9 /* SKDocumentController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKDocumentController.m; sourceTree = "<group>"; }; CE32531D0F4723EA0021BADD /* SKMainWindowController_Actions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKMainWindowController_Actions.h; sourceTree = "<group>"; }; @@ -2282,6 +2285,8 @@ CE2DEB1B0B8618DE00D0DA12 /* SKFindController.m */, CE1E2B260BDAB6180011D9DD /* SKPDFSynchronizer.h */, CE1E2B270BDAB6180011D9DD /* SKPDFSynchronizer.m */, + CE31960D2E00779000996E40 /* SKPresentationNotesAuxiliary.h */, + CE31960E2E00779000996E40 /* SKPresentationNotesAuxiliary.m */, ); name = "Main Controllers"; sourceTree = "<group>"; @@ -2854,6 +2859,7 @@ CE1E30290BDB9D8E0011D9DD /* NSCharacterSet_SKExtensions.m in Sources */, CE4972510BDE898F00D7F1D2 /* SKMainWindow.m in Sources */, CE49726D0BDE8A7400D7F1D2 /* PDFSelection_SKExtensions.m in Sources */, + CE31960F2E00779000996E40 /* SKPresentationNotesAuxiliary.m in Sources */, CE1DFA3D244CF04700D64C83 /* SKShareMenuController.m in Sources */, CED4DA252707B330001E09A8 /* SKThumbnailImageView.m in Sources */, CE49728B0BDE8B2900D7F1D2 /* SKToolbarItem.m in Sources */, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-16 15:28:04
|
Revision: 15472 http://sourceforge.net/p/skim-app/code/15472 Author: hofman Date: 2025-06-16 15:28:02 +0000 (Mon, 16 Jun 2025) Log Message: ----------- convenience accessor for pdfview of PDFAnnotation Modified Paths: -------------- trunk/PDFAnnotation_SKExtensions.m Modified: trunk/PDFAnnotation_SKExtensions.m =================================================================== --- trunk/PDFAnnotation_SKExtensions.m 2025-06-16 15:19:37 UTC (rev 15471) +++ trunk/PDFAnnotation_SKExtensions.m 2025-06-16 15:28:02 UTC (rev 15472) @@ -780,11 +780,14 @@ return nil; } +- (SKPDFView *)containingPdfView { + NSDocument *doc = [[self page] containingDocument]; + return [doc isPDFDocument] ? [(SKMainDocument *)doc pdfView] : nil; +} + - (void)handleEditScriptCommand:(NSScriptCommand *)command { if ([self isEditable]) { - NSDocument *doc = [[self page] containingDocument]; - if ([doc isPDFDocument]) - [[(SKMainDocument *)doc pdfView] editAnnotation:self]; + [[self containingPdfView] editAnnotation:self]; } } @@ -791,30 +794,25 @@ - (BOOL)accessibilityPerformPress { if ([self isSkimNote] == NO) return NO; - NSDocument *doc = [[self page] containingDocument]; - if ([doc respondsToSelector:@selector(pdfView)] == NO) - return NO; - [[(SKMainDocument *)doc pdfView] editAnnotation:self]; - return YES; + SKPDFView *pdfView = [self containingPdfView]; + [pdfView editAnnotation:self]; + return pdfView != nil; } - (BOOL)accessibilityPerformPick { if ([self isSkimNote] == NO) return NO; - NSDocument *doc = [[self page] containingDocument]; - if ([doc respondsToSelector:@selector(pdfView)] == NO) - return NO; - [[(SKMainDocument *)doc pdfView] setCurrentAnnotation:self]; - return YES; + SKPDFView *pdfView = [self containingPdfView]; + [pdfView setCurrentAnnotation:self]; + return pdfView != nil; } - (BOOL)accessibilityPerformShowMenu { if ([self isSkimNote] == NO) return NO; - NSDocument *doc = [[self page] containingDocument]; - if ([doc respondsToSelector:@selector(pdfView)] == NO) + SKPDFView *pdfView = [self containingPdfView]; + if (pdfView == nil) return NO; - PDFView *pdfView = [(SKMainDocument *)doc pdfView]; NSPoint point = SKCenterPoint([pdfView convertRect:[self bounds] fromPage:[self page]]); NSEvent *event = [NSEvent mouseEventWithType:NSEventTypeRightMouseDown location:[pdfView convertPoint:point toView:nil] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-16 15:19:40
|
Revision: 15471 http://sourceforge.net/p/skim-app/code/15471 Author: hofman Date: 2025-06-16 15:19:37 +0000 (Mon, 16 Jun 2025) Log Message: ----------- convenience accessor for undoManager of PDFPage Modified Paths: -------------- trunk/PDFPage_SKExtensions.m Modified: trunk/PDFPage_SKExtensions.m =================================================================== --- trunk/PDFPage_SKExtensions.m 2025-06-16 14:20:37 UTC (rev 15470) +++ trunk/PDFPage_SKExtensions.m 2025-06-16 15:19:37 UTC (rev 15471) @@ -552,6 +552,10 @@ return [[self document] containingDocument]; } +- (NSUndoManager *)undoManager { + return [[self containingDocument] undoManager]; +} + - (NSUInteger)index { return [self pageIndex] + 1; } @@ -562,7 +566,7 @@ - (void)setRotationAngle:(NSInteger)angle { if ([self isEditable] && angle != [self rotation]) { - NSUndoManager *undoManager = [[self containingDocument] undoManager]; + NSUndoManager *undoManager = [self undoManager]; [(PDFPage *)[undoManager prepareWithInvocationTarget:self] setRotationAngle:[self rotation]]; [undoManager setActionName:NSLocalizedString(@"Rotate Page", @"Undo action name")]; [undoManager setActionIsDiscardable:YES]; @@ -580,7 +584,7 @@ - (void)setBoundsAsQDRect:(NSData *)inQDBoundsAsData { if ([self isEditable] && inQDBoundsAsData && [inQDBoundsAsData isEqual:[NSNull null]] == NO) { - NSUndoManager *undoManager = [[self containingDocument] undoManager]; + NSUndoManager *undoManager = [self undoManager]; [[undoManager prepareWithInvocationTarget:self] setBoundsAsQDRect:[self boundsAsQDRect]]; [undoManager setActionName:NSLocalizedString(@"Crop Page", @"Undo action name")]; [undoManager setActionIsDiscardable:YES]; @@ -603,7 +607,7 @@ - (void)setMediaBoundsAsQDRect:(NSData *)inQDBoundsAsData { if ([self isEditable] && inQDBoundsAsData && [inQDBoundsAsData isEqual:[NSNull null]] == NO) { - NSUndoManager *undoManager = [[self containingDocument] undoManager]; + NSUndoManager *undoManager = [self undoManager]; [[undoManager prepareWithInvocationTarget:self] setMediaBoundsAsQDRect:[self mediaBoundsAsQDRect]]; [undoManager setActionName:NSLocalizedString(@"Crop Page", @"Undo action name")]; [undoManager setActionIsDiscardable:YES]; @@ -675,7 +679,7 @@ - (void)insertObject:(PDFAnnotation *)newNote inNotesAtIndex:(NSUInteger)anIndex { if ([self isEditable] && [[self document] allowsNotes]) { [[self document] addAnnotation:newNote toPage:self]; - [[[self containingDocument] undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")]; + [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")]; } } @@ -683,7 +687,7 @@ if ([self isEditable] && [[self document] allowsNotes]) { PDFAnnotation *note = [[self notes] objectAtIndex:anIndex]; [[self document] removeAnnotation:note]; - [[[self containingDocument] undoManager] setActionName:NSLocalizedString(@"Remove Note", @"Undo action name")]; + [[self undoManager] setActionName:NSLocalizedString(@"Remove Note", @"Undo action name")]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-16 14:20:39
|
Revision: 15470 http://sourceforge.net/p/skim-app/code/15470 Author: hofman Date: 2025-06-16 14:20:37 +0000 (Mon, 16 Jun 2025) Log Message: ----------- initialize arrays to nil when nothingn will be in it Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-16 09:20:22 UTC (rev 15469) +++ trunk/SKMainWindowController.m 2025-06-16 14:20:37 UTC (rev 15470) @@ -982,13 +982,16 @@ PDFDocument *pdfDoc = [pdfView document]; NSMutableIndexSet *pageIndexes = [NSMutableIndexSet indexSet]; - NSMutableArray *addedNotes = [NSMutableArray array]; - NSMutableArray *removedNotesAndPages = [NSMutableArray array]; - NSMutableIndexSet *removedIndexes = [[notesToRemove firstObject] isSkimNote] ? [NSMutableIndexSet indexSet] : nil; + NSMutableArray *addedNotes = nil; + NSMutableArray *removedNotesAndPages = nil; + NSMutableIndexSet *removedIndexes = nil; mwcFlags.addOrRemoveNotesInBulk = 1; if ([notesToRemove count]) { + removedNotesAndPages = [NSMutableArray array]; + if ([[notesToRemove firstObject] isSkimNote]) + removedIndexes = [NSMutableIndexSet indexSet]; for (PDFAnnotation *annotation in notesToRemove) { PDFPage *page = [annotation page]; [removedNotesAndPages addObject:@[annotation, page]]; @@ -1001,6 +1004,7 @@ if ([notesAndPagesToAdd count]) { BOOL shouldDisplay = [pdfView hideNotes] == NO; + addedNotes = [NSMutableArray array]; for (NSArray *annotationAndPage in notesAndPagesToAdd) { PDFAnnotation *annotation = [annotationAndPage firstObject]; PDFPage *page = [annotationAndPage lastObject]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-16 09:20:24
|
Revision: 15469 http://sourceforge.net/p/skim-app/code/15469 Author: hofman Date: 2025-06-16 09:20:22 +0000 (Mon, 16 Jun 2025) Log Message: ----------- avoid local variable shadowing ivar Modified Paths: -------------- trunk/SKOverviewView.m Modified: trunk/SKOverviewView.m =================================================================== --- trunk/SKOverviewView.m 2025-06-15 16:24:55 UTC (rev 15468) +++ trunk/SKOverviewView.m 2025-06-16 09:20:22 UTC (rev 15469) @@ -92,13 +92,13 @@ } - (BOOL)validateMenuItem:(NSMenuItem *)menuItem { - SEL action = [menuItem action]; - if (action == @selector(copy:) || action == @selector(copyURL:)) { + SEL itemAction = [menuItem action]; + if (itemAction == @selector(copy:) || itemAction == @selector(copyURL:)) { NSUInteger i = [[self selectionIndexes] firstIndex]; if (i == NSNotFound) return NO; id view = [[self itemAtIndex:i] view]; - if ([view respondsToSelector:action] == NO) + if ([view respondsToSelector:itemAction] == NO) return NO; if ([view respondsToSelector:_cmd]) return [view validateMenuItem:menuItem]; @@ -113,15 +113,12 @@ } - (void)mouseDown:(NSEvent *)theEvent { - SEL action = (([theEvent clickCount] == 1 && [self sendActionOnSingleClick]) || [theEvent clickCount] == 2) ? [self action] : NULL; + BOOL shouldSendAction = [self action] && (([theEvent clickCount] == 1 && [self sendActionOnSingleClick]) || [theEvent clickCount] == 2) && [NSApp willDragMouse] == NO; - if (action && [NSApp willDragMouse]) - action = NULL; - [super mouseDown:theEvent]; - if (action) - DISPATCH_MAIN_AFTER_SEC(0.01, ^{ [self tryToPerform:action with:self]; }); + if (shouldSendAction) + DISPATCH_MAIN_AFTER_SEC(0.01, ^{ [self tryToPerform:[self action] with:self]; }); } - (id)newViewWithIdentifier:(NSString *)identifier { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-15 16:24:57
|
Revision: 15468 http://sourceforge.net/p/skim-app/code/15468 Author: hofman Date: 2025-06-15 16:24:55 +0000 (Sun, 15 Jun 2025) Log Message: ----------- combine cases Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-15 16:21:46 UTC (rev 15467) +++ trunk/SKMainWindowController.m 2025-06-15 16:24:55 UTC (rev 15468) @@ -1352,10 +1352,8 @@ } - (BOOL)hasNotes { - if ([notes count] > 0) + if ([notes count] > 0 || [placeholderWidgetProperties count] > 0) return YES; - if ([placeholderWidgetProperties count] > 0) - return YES; for (PDFAnnotation *widget in widgets) { if ([([widget objectValue] ?: @"") isEqual:([widgetValues objectForKey:widget] ?: @"")] == NO) return YES; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-15 16:21:48
|
Revision: 15467 http://sourceforge.net/p/skim-app/code/15467 Author: hofman Date: 2025-06-15 16:21:46 +0000 (Sun, 15 Jun 2025) Log Message: ----------- combine cases Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-15 15:45:12 UTC (rev 15466) +++ trunk/SKMainWindowController.m 2025-06-15 16:21:46 UTC (rev 15467) @@ -966,10 +966,8 @@ } - (NSArray *)widgetProperties { - if (placeholderWidgetProperties) - return placeholderWidgetProperties; if ([widgets count] == 0) - return @[]; + return placeholderWidgetProperties ?: @[]; NSMutableArray *properties = [NSMutableArray array]; for (PDFAnnotation *widget in widgets) { if ([([widget objectValue] ?: @"") isEqual:([widgetValues objectForKey:widget] ?: @"")] == NO) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |