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-21 16:42:29
|
Revision: 15516 http://sourceforge.net/p/skim-app/code/15516 Author: hofman Date: 2025-06-21 16:42:26 +0000 (Sat, 21 Jun 2025) Log Message: ----------- Restart current documents timer and notification observing when the document controller cancels terminate Modified Paths: -------------- trunk/SKApplication.h trunk/SKApplication.m trunk/SKApplicationController.m Modified: trunk/SKApplication.h =================================================================== --- trunk/SKApplication.h 2025-06-20 22:12:44 UTC (rev 15515) +++ trunk/SKApplication.h 2025-06-21 16:42:26 UTC (rev 15516) @@ -45,6 +45,7 @@ @protocol SKApplicationDelegate <NSApplicationDelegate> @optional - (void)applicationStartsTerminating:(NSNotification *)aNotification; +- (void)applicationDocumentControllerCanceledTerminate:(NSApplication *)application; @end @class SPUStandardUpdaterController; Modified: trunk/SKApplication.m =================================================================== --- trunk/SKApplication.m 2025-06-20 22:12:44 UTC (rev 15515) +++ trunk/SKApplication.m 2025-06-21 16:42:26 UTC (rev 15516) @@ -46,6 +46,10 @@ NSString *SKApplicationStartsTerminatingNotification = @"SKApplicationStartsTerminatingNotification"; +@interface NSApplication (SKPrivateDeclarations) +- (void)_docController:(NSDocumentController *)docController shouldTerminate:(BOOL)shouldTerminate; +@end + @implementation SKApplication @synthesize updaterController, userAttentionDisabled; @@ -81,6 +85,12 @@ [super terminate:sender]; } +- (void)_docController:(NSDocumentController *)docController shouldTerminate:(BOOL)shouldTerminate { + [super _docController:docController shouldTerminate:shouldTerminate]; + if (shouldTerminate == NO && [[self delegate] respondsToSelector:@selector(applicationDocumentControllerCanceledTerminate:)]) + [[self delegate] applicationDocumentControllerCanceledTerminate:self]; +} + - (BOOL)willDragMouse { return NSEventTypeLeftMouseDragged == [[self nextEventMatchingMask:(NSEventMaskLeftMouseUp | NSEventMaskLeftMouseDragged) untilDate:[NSDate distantFuture] inMode:NSEventTrackingRunLoopMode dequeue:NO] type]; } Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2025-06-20 22:12:44 UTC (rev 15515) +++ trunk/SKApplicationController.m 2025-06-21 16:42:26 UTC (rev 15516) @@ -316,9 +316,20 @@ NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc removeObserver:self name:SKDocumentDidShowNotification object:nil]; [nc removeObserver:self name:SKDocumentControllerDidRemoveDocumentNotification object:nil]; - [nc removeObserver:self name:NSWindowDidBecomeMainNotification object:nil]; } +- (void)applicationDocumentControllerCanceledTerminate:(NSApplication *)application { + if (currentDocumentsTimer == nil) { + currentDocumentsTimer = [NSTimer scheduledTimerWithTimeInterval:CURRENTDOCUMENTSETUP_INTERVAL target:self selector:@selector(registerCurrentDocuments:) userInfo:nil repeats:YES]; + + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self selector:@selector(registerCurrentDocuments:) + name:SKDocumentDidShowNotification object:nil]; + [nc addObserver:self selector:@selector(registerCurrentDocuments:) + name:SKDocumentControllerDidRemoveDocumentNotification object:nil]; + } +} + #pragma mark Updater - (void)updaterWillRelaunchApplication:(SPUUpdater *)updater { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 22:12:45
|
Revision: 15515 http://sourceforge.net/p/skim-app/code/15515 Author: hofman Date: 2025-06-20 22:12:44 +0000 (Fri, 20 Jun 2025) Log Message: ----------- Add downloads directory to initial values dict Modified Paths: -------------- trunk/SKApplicationController.m Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2025-06-20 21:45:33 UTC (rev 15514) +++ trunk/SKApplicationController.m 2025-06-20 22:12:44 UTC (rev 15515) @@ -137,14 +137,14 @@ [initialValuesDict setValue:NSFullUserName() forKey:SKUserNameKey]; + NSURL *downloadsURL = [[NSFileManager defaultManager] URLForDirectory:NSDownloadsDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL]; + if (downloadsURL) + [initialValuesDict setValue:[[downloadsURL path] stringByAbbreviatingWithTildeInPath] forKey:SKDownloadsDirectoryKey]; + // set them in the standard user defaults [[NSUserDefaults standardUserDefaults] registerDefaults:initialValuesDict]; - NSURL *downloadsURL = [[NSFileManager defaultManager] URLForDirectory:NSDownloadsDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL]; - if (downloadsURL) - [[NSUserDefaults standardUserDefaults] registerDefaults:@{SKDownloadsDirectoryKey:[[downloadsURL path] stringByAbbreviatingWithTildeInPath]}]; - - // if your application supports resetting a subset of the defaults to + // if your application supports resetting a subset of the defaults to // factory values, you should set those values // in the shared user defaults controller This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 21:45:36
|
Revision: 15514 http://sourceforge.net/p/skim-app/code/15514 Author: hofman Date: 2025-06-20 21:45:33 +0000 (Fri, 20 Jun 2025) Log Message: ----------- no need for localized format Modified Paths: -------------- trunk/SKMainWindowController.m trunk/de.lproj/Localizable.strings trunk/en.lproj/Localizable.strings trunk/es.lproj/Localizable.strings trunk/fr.lproj/Localizable.strings trunk/it.lproj/Localizable.strings trunk/ja.lproj/Localizable.strings trunk/nl.lproj/Localizable.strings trunk/pl.lproj/Localizable.strings trunk/ru.lproj/Localizable.strings trunk/zh_CN.lproj/Localizable.strings trunk/zh_TW.lproj/Localizable.strings Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-20 21:28:22 UTC (rev 15513) +++ trunk/SKMainWindowController.m 2025-06-20 21:45:33 UTC (rev 15514) @@ -666,7 +666,7 @@ - (NSString *)windowTitleForDocumentDisplayName:(NSString *)displayName { if (@available(macOS 11.0, *)) {} else if ([pdfView document]) - return [NSString stringWithFormat:NSLocalizedString(@"%@ (%@)", @"Window title format"), displayName, [self pageStatus]]; + return [displayName stringByAppendingFormat:@" (%@)", [self pageStatus]]; return displayName; } Modified: trunk/de.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/en.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/es.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/fr.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/it.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/ja.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/nl.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/pl.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/ru.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/zh_CN.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/zh_TW.lproj/Localizable.strings =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 21:28:24
|
Revision: 15513 http://sourceforge.net/p/skim-app/code/15513 Author: hofman Date: 2025-06-20 21:28:22 +0000 (Fri, 20 Jun 2025) Log Message: ----------- don't send double KVO notifications Modified Paths: -------------- trunk/SKGeneralPreferences.m Modified: trunk/SKGeneralPreferences.m =================================================================== --- trunk/SKGeneralPreferences.m 2025-06-20 16:52:22 UTC (rev 15512) +++ trunk/SKGeneralPreferences.m 2025-06-20 21:28:22 UTC (rev 15513) @@ -81,9 +81,7 @@ if (interval > 0) [[self updater] setUpdateCheckInterval:interval]; [[self updater] setAutomaticallyChecksForUpdates:interval > 0]; - [self willChangeValueForKey:UPDATEINTERVAL_KEY]; updateInterval = interval; - [self didChangeValueForKey:UPDATEINTERVAL_KEY]; } - (SPUUpdater *)updater { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 16:52:25
|
Revision: 15512 http://sourceforge.net/p/skim-app/code/15512 Author: hofman Date: 2025-06-20 16:52:22 +0000 (Fri, 20 Jun 2025) Log Message: ----------- get the same window title format on older version, move method implementation Modified Paths: -------------- trunk/SKMainWindowController.m trunk/SKMainWindowController_UI.m trunk/de.lproj/Localizable.strings trunk/en.lproj/Localizable.strings trunk/es.lproj/Localizable.strings trunk/fr.lproj/Localizable.strings trunk/it.lproj/Localizable.strings trunk/ja.lproj/Localizable.strings trunk/nl.lproj/Localizable.strings trunk/pl.lproj/Localizable.strings trunk/ru.lproj/Localizable.strings trunk/zh_CN.lproj/Localizable.strings trunk/zh_TW.lproj/Localizable.strings Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-20 16:32:17 UTC (rev 15511) +++ trunk/SKMainWindowController.m 2025-06-20 16:52:22 UTC (rev 15512) @@ -664,6 +664,12 @@ return @""; } +- (NSString *)windowTitleForDocumentDisplayName:(NSString *)displayName { + if (@available(macOS 11.0, *)) {} else if ([pdfView document]) + return [NSString stringWithFormat:NSLocalizedString(@"%@ (%@)", @"Window title format"), displayName, [self pageStatus]]; + return displayName; +} + - (void)updateSubtitle { if (@available(macOS 11.0, *)) [([self interactionMode] == SKPresentationMode ? savedNormalWindow : [self window]) setSubtitle:[self pageStatus]]; Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-20 16:32:17 UTC (rev 15511) +++ trunk/SKMainWindowController_UI.m 2025-06-20 16:52:22 UTC (rev 15512) @@ -231,12 +231,6 @@ #pragma mark NSWindow delegate protocol -- (NSString *)windowTitleForDocumentDisplayName:(NSString *)displayName { - if (@available(macOS 11.0, *)) {} else if ([pdfView document]) - return [NSString stringWithFormat:NSLocalizedString(@"%@ (page %ld of %ld)", @"Window title format"), displayName, (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]; - return displayName; -} - - (void)windowDidBecomeMain:(NSNotification *)notification { if ([[self window] isEqual:[notification object]]) { [self updateUtilityPanel]; Modified: trunk/de.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/en.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/es.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/fr.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/it.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/ja.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/nl.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/pl.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/ru.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/zh_CN.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/zh_TW.lproj/Localizable.strings =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 16:32:19
|
Revision: 15511 http://sourceforge.net/p/skim-app/code/15511 Author: hofman Date: 2025-06-20 16:32:17 +0000 (Fri, 20 Jun 2025) Log Message: ----------- separate accessor for left status or subtitle Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-20 16:22:44 UTC (rev 15510) +++ trunk/SKMainWindowController.m 2025-06-20 16:32:17 UTC (rev 15511) @@ -658,20 +658,21 @@ #pragma mark UI updating +- (NSString *)pageStatus { + if ([pdfView document]) + return [NSString stringWithFormat:NSLocalizedString(@"Page %ld of %ld", @"Status message"), (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]; + return @""; +} + - (void)updateSubtitle { - if (@available(macOS 11.0, *)) { - NSString *subtitle = @""; - if ([pdfView document]) - subtitle = [NSString stringWithFormat:NSLocalizedString(@"Page %ld of %ld", @""), (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]; - [([self interactionMode] == SKPresentationMode ? savedNormalWindow : [self window]) setSubtitle:subtitle]; - } else { + if (@available(macOS 11.0, *)) + [([self interactionMode] == SKPresentationMode ? savedNormalWindow : [self window]) setSubtitle:[self pageStatus]]; + else [self synchronizeWindowTitleWithDocumentName]; - } } - (void)updateLeftStatus { - NSString *message = [NSString stringWithFormat:NSLocalizedString(@"Page %ld of %ld", @"Status message"), (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]; - [[statusBar leftField] setStringValue:message]; + [[statusBar leftField] setStringValue:[self pageStatus]]; } #define CM_PER_POINT 0.035277778 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 16:22:45
|
Revision: 15510 http://sourceforge.net/p/skim-app/code/15510 Author: hofman Date: 2025-06-20 16:22:44 +0000 (Fri, 20 Jun 2025) Log Message: ----------- make sure title is updated after presentation on 10.15- Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-06-20 16:20:32 UTC (rev 15509) +++ trunk/SKMainWindowController_FullScreen.m 2025-06-20 16:22:44 UTC (rev 15510) @@ -367,6 +367,9 @@ [self setWindow:normalWindow]; + if (@available(macOS 11.0, *)) {} else + [self synchronizeWindowTitleWithDocumentName]; + if (mwcFlags.thumbnailsNeedUpdateAfterPresentaton) { mwcFlags.thumbnailsNeedUpdateAfterPresentaton = 0; [self allThumbnailsNeedUpdate]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 16:20:34
|
Revision: 15509 http://sourceforge.net/p/skim-app/code/15509 Author: hofman Date: 2025-06-20 16:20:32 +0000 (Fri, 20 Jun 2025) Log Message: ----------- make sure subtitle is set on normal window Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-20 15:57:50 UTC (rev 15508) +++ trunk/SKMainWindowController.m 2025-06-20 16:20:32 UTC (rev 15509) @@ -660,10 +660,10 @@ - (void)updateSubtitle { if (@available(macOS 11.0, *)) { + NSString *subtitle = @""; if ([pdfView document]) - [[self window] setSubtitle:[NSString stringWithFormat:NSLocalizedString(@"Page %ld of %ld", @""), (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]]; - else - [[self window] setSubtitle:@""]; + subtitle = [NSString stringWithFormat:NSLocalizedString(@"Page %ld of %ld", @""), (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]; + [([self interactionMode] == SKPresentationMode ? savedNormalWindow : [self window]) setSubtitle:subtitle]; } else { [self synchronizeWindowTitleWithDocumentName]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 15:57:53
|
Revision: 15508 http://sourceforge.net/p/skim-app/code/15508 Author: hofman Date: 2025-06-20 15:57:50 +0000 (Fri, 20 Jun 2025) Log Message: ----------- don't call displayindViewAnimating: when already displaying the find view Modified Paths: -------------- trunk/SKMainWindowController_Actions.m Modified: trunk/SKMainWindowController_Actions.m =================================================================== --- trunk/SKMainWindowController_Actions.m 2025-06-20 15:52:57 UTC (rev 15507) +++ trunk/SKMainWindowController_Actions.m 2025-06-20 15:57:50 UTC (rev 15508) @@ -850,7 +850,8 @@ } else { [pdfDoc beginFindString:[sender stringValue] withOptions:options]; } - [self displayFindViewAnimating:YES]; + if ([self displaysFindPane] == NO) + [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-20 15:52:58
|
Revision: 15507 http://sourceforge.net/p/skim-app/code/15507 Author: hofman Date: 2025-06-20 15:52:57 +0000 (Fri, 20 Jun 2025) Log Message: ----------- No need for trivial delegate accessors override to change type Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2025-06-20 15:50:50 UTC (rev 15506) +++ trunk/SKPDFView.m 2025-06-20 15:52:57 UTC (rev 15507) @@ -249,7 +249,7 @@ @implementation SKPDFView @synthesize toolMode, annotationMode, temporaryToolMode, currentAnnotation, readingBar, pacerSpeed, typeSelectHelper, syncDot, hideNotes, zooming; -@dynamic extendedDisplayMode, displaysHorizontally, displaySettings, canSelectNote, hasReadingBar, hasPacer, currentSelectionPage, currentSelectionRect, currentMagnification, needsRewind, editing; +@dynamic extendedDisplayMode, displaysHorizontally, displaySettings, canSelectNote, hasReadingBar, hasPacer, currentSelectionPage, currentSelectionRect, currentMagnification, needsRewind, editing, delegate; + (void)initialize { SKINITIALIZE; @@ -5171,10 +5171,6 @@ [self setCursorForAreaOfInterest:[self areaOfInterestForMouse:theEvent]]; } -- (id <SKPDFViewDelegate>)delegate { - return (id <SKPDFViewDelegate>)[super delegate]; -} - - (void)setDelegate:(id <SKPDFViewDelegate>)newDelegate { if (newDelegate == nil) [self cleanup]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 15:50:52
|
Revision: 15506 http://sourceforge.net/p/skim-app/code/15506 Author: hofman Date: 2025-06-20 15:50:50 +0000 (Fri, 20 Jun 2025) Log Message: ----------- No need for trivial delegate accessors override to change type Modified Paths: -------------- trunk/SKApplication.m trunk/SKMainWindow.m trunk/SKOutlineView.m trunk/SKPDFDocument.m trunk/SKSnapshotPDFView.m trunk/SKTableView.m Modified: trunk/SKApplication.m =================================================================== --- trunk/SKApplication.m 2025-06-20 15:13:07 UTC (rev 15505) +++ trunk/SKApplication.m 2025-06-20 15:50:50 UTC (rev 15506) @@ -49,6 +49,7 @@ @implementation SKApplication @synthesize updaterController, userAttentionDisabled; +@dynamic delegate; - (NSInteger)requestUserAttention:(NSRequestUserAttentionType)requestType { return userAttentionDisabled ? 0 : [super requestUserAttention:requestType]; @@ -84,9 +85,6 @@ return NSEventTypeLeftMouseDragged == [[self nextEventMatchingMask:(NSEventMaskLeftMouseUp | NSEventMaskLeftMouseDragged) untilDate:[NSDate distantFuture] inMode:NSEventTrackingRunLoopMode dequeue:NO] type]; } -- (id <SKApplicationDelegate>)delegate { return (id <SKApplicationDelegate>)[super delegate]; } -- (void)setDelegate:(id <SKApplicationDelegate>)newDelegate { [super setDelegate:newDelegate]; } - #pragma mark Windows menu - (void)reorganizeWindowsItem:(NSWindow *)aWindow { Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-06-20 15:13:07 UTC (rev 15505) +++ trunk/SKMainWindow.m 2025-06-20 15:50:50 UTC (rev 15506) @@ -111,14 +111,6 @@ disableConstrainedFrame = NO; } -- (id<SKMainWindowDelegate>)delegate { - return (id<SKMainWindowDelegate>)[super delegate]; -} - -- (void)setDelegate:(id<SKMainWindowDelegate>)newDelegate { - [super setDelegate:newDelegate]; -} - - (NSTitlebarAccessoryViewController *)safeTabBarViewController { if ([self respondsToSelector:@selector(_tabBarAccessoryViewController)]) return [self _tabBarAccessoryViewController]; Modified: trunk/SKOutlineView.m =================================================================== --- trunk/SKOutlineView.m 2025-06-20 15:13:07 UTC (rev 15505) +++ trunk/SKOutlineView.m 2025-06-20 15:50:50 UTC (rev 15506) @@ -390,10 +390,6 @@ [[self delegate] outlineView:self typeSelectHelperUpdateSearchString:searchString]; } -- (id <SKOutlineViewDelegate>)delegate { - return (id <SKOutlineViewDelegate>)[super delegate]; -} - - (void)setDelegate:(id <SKOutlineViewDelegate>)newDelegate { [self removeTrackingAreasIfNeeded]; [super setDelegate:newDelegate]; Modified: trunk/SKPDFDocument.m =================================================================== --- trunk/SKPDFDocument.m 2025-06-20 15:13:07 UTC (rev 15505) +++ trunk/SKPDFDocument.m 2025-06-20 15:50:50 UTC (rev 15506) @@ -107,12 +107,4 @@ - (BOOL)realAllowsCommenting { return [super allowsCommenting]; } -- (id <SKPDFDocumentDelegate>)delegate { - return (id <SKPDFDocumentDelegate>)[super delegate]; -} - -- (void)setDelegate:(id <SKPDFDocumentDelegate>)newDelegate { - [super setDelegate:newDelegate]; -} - @end Modified: trunk/SKSnapshotPDFView.m =================================================================== --- trunk/SKSnapshotPDFView.m 2025-06-20 15:13:07 UTC (rev 15505) +++ trunk/SKSnapshotPDFView.m 2025-06-20 15:50:50 UTC (rev 15506) @@ -243,14 +243,6 @@ } } -- (id <SKSnapshotPDFViewDelegate>)delegate { - return (id <SKSnapshotPDFViewDelegate>)[super delegate]; -} - -- (void)setDelegate:(id <SKSnapshotPDFViewDelegate>)newDelegate { - [super setDelegate:newDelegate]; -} - - (void)handlePDFViewFrameChangedNotification:(NSNotification *)notification { if ([self autoFits]) { NSRect clipRect = [self visibleContentRect]; Modified: trunk/SKTableView.m =================================================================== --- trunk/SKTableView.m 2025-06-20 15:13:07 UTC (rev 15505) +++ trunk/SKTableView.m 2025-06-20 15:50:50 UTC (rev 15506) @@ -415,10 +415,6 @@ [[self delegate] tableView:self typeSelectHelperUpdateSearchString:searchString]; } -- (id <SKTableViewDelegate>)delegate { - return (id <SKTableViewDelegate>)[super delegate]; -} - - (void)setDelegate:(id <SKTableViewDelegate>)newDelegate { [self removeTrackingAreasIfNeeded]; [super setDelegate:newDelegate]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 15:13:08
|
Revision: 15505 http://sourceforge.net/p/skim-app/code/15505 Author: hofman Date: 2025-06-20 15:13:07 +0000 (Fri, 20 Jun 2025) Log Message: ----------- check currentView rather than window for table to decide whether we display the find view, as it can be removed from the window when the overview is displayed Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-20 15:07:01 UTC (rev 15504) +++ trunk/SKMainWindowController.m 2025-06-20 15:13:07 UTC (rev 15505) @@ -1332,7 +1332,7 @@ } - (BOOL)displaysFindPane { - return [leftSideController.findTableView window] || [leftSideController.groupedFindTableView window]; + return leftSideController.findTableView.enclosingScrollView == leftSideController.currentView || leftSideController.groupedFindTableView.enclosingScrollView == leftSideController.currentView; } - (BOOL)leftSidePaneIsOpen { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 15:07:02
|
Revision: 15504 http://sourceforge.net/p/skim-app/code/15504 Author: hofman Date: 2025-06-20 15:07:01 +0000 (Fri, 20 Jun 2025) Log Message: ----------- invert boolean Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-20 14:43:57 UTC (rev 15503) +++ trunk/SKMainWindowController.m 2025-06-20 15:07:01 UTC (rev 15504) @@ -822,7 +822,7 @@ - (void)updatePageLabelsAndOutlineForExpansionState:(NSDictionary *)info { // update page labels, also update the size of the table columns displaying the labels NSArray *newPageLabels = [[pdfView document] pageLabels]; - BOOL changed = [newPageLabels isEqualToArray:pageLabels]; + BOOL changed = NO == [newPageLabels isEqualToArray:pageLabels]; pageLabels = [newPageLabels copy]; [self updatePageLabel]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 14:43:58
|
Revision: 15503 http://sourceforge.net/p/skim-app/code/15503 Author: hofman Date: 2025-06-20 14:43:57 +0000 (Fri, 20 Jun 2025) Log Message: ----------- tool tip rects have already been updated implicitly when setting the pdf document Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-20 14:41:07 UTC (rev 15502) +++ trunk/SKMainWindowController.m 2025-06-20 14:43:57 UTC (rev 15503) @@ -1229,7 +1229,6 @@ // make sure we clear the undo handling undoGroupOldPropertiesPerNote = nil; - [pdfView resetPDFToolTipRects]; } #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-20 14:41:09
|
Revision: 15502 http://sourceforge.net/p/skim-app/code/15502 Author: hofman Date: 2025-06-20 14:41:07 +0000 (Fri, 20 Jun 2025) Log Message: ----------- status bbar is already updated from handlePageChangedNotification: Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-20 14:34:55 UTC (rev 15501) +++ trunk/SKMainWindowController.m 2025-06-20 14:41:07 UTC (rev 15502) @@ -1226,8 +1226,6 @@ [toolbarController handleChangedHistoryNotification:nil]; [toolbarController handlePageChangedNotification:nil]; [self handlePageChangedNotification:nil]; - [self updateLeftStatus]; - [self updateRightStatus]; // make sure we clear the undo handling undoGroupOldPropertiesPerNote = nil; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-20 14:34:57
|
Revision: 15501 http://sourceforge.net/p/skim-app/code/15501 Author: hofman Date: 2025-06-20 14:34:55 +0000 (Fri, 20 Jun 2025) Log Message: ----------- updateNoteSelection is already called from handlePageChangedNotification: Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-19 09:22:50 UTC (rev 15500) +++ trunk/SKMainWindowController.m 2025-06-20 14:34:55 UTC (rev 15501) @@ -1222,8 +1222,6 @@ [pdfView resetHistory]; } - [self updateNoteSelection]; - // the number of pages may have changed [toolbarController handleChangedHistoryNotification:nil]; [toolbarController handlePageChangedNotification:nil]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-19 09:22:52
|
Revision: 15500 http://sourceforge.net/p/skim-app/code/15500 Author: hofman Date: 2025-06-19 09:22:50 +0000 (Thu, 19 Jun 2025) Log Message: ----------- Also remove text color accessory view from color panel Modified Paths: -------------- trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-18 16:06:24 UTC (rev 15499) +++ trunk/SKMainWindowController_UI.m 2025-06-19 09:22:50 UTC (rev 15500) @@ -248,7 +248,7 @@ - (void)windowDidResignMain:(NSNotification *)notification { if ([[self window] isEqual:[notification object]]) { [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; - if ([[[NSColorPanel sharedColorPanel] accessoryView] isEqual:colorAccessoryView]) + if ([[[NSColorPanel sharedColorPanel] accessoryView] isEqual:colorAccessoryView] || [[[NSColorPanel sharedColorPanel] accessoryView] isEqual:textColorAccessoryView]) [[NSColorPanel sharedColorPanel] setAccessoryView:nil]; if ([self interactionMode] == SKPresentationMode && [[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO) [[self window] setLevel:NSNormalWindowLevel]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-18 16:06:25
|
Revision: 15499 http://sourceforge.net/p/skim-app/code/15499 Author: hofman Date: 2025-06-18 16:06:24 +0000 (Wed, 18 Jun 2025) Log Message: ----------- avoid variables Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-18 15:57:03 UTC (rev 15498) +++ trunk/SKMainDocument.m 2025-06-18 16:06:24 UTC (rev 15499) @@ -1113,7 +1113,6 @@ NSOpenPanel *oPanel = [NSOpenPanel openPanel]; NSURL *fileURL = [self fileURL]; NSButton *replaceNotesCheckButton = nil; - NSView *readNotesAccessoryView = nil; if ([self hasNotes]) { replaceNotesCheckButton = [[NSButton alloc] init]; @@ -1121,7 +1120,7 @@ [replaceNotesCheckButton setTitle:NSLocalizedString(@"Replace existing notes", @"Check button title")]; [replaceNotesCheckButton sizeToFit]; [replaceNotesCheckButton setFrameOrigin:NSMakePoint(CHECK_BUTTON_OFFSET_X, CHECK_BUTTON_OFFSET_Y)]; - readNotesAccessoryView = [[NSView alloc] initWithFrame:NSInsetRect([replaceNotesCheckButton frame], -CHECK_BUTTON_OFFSET_X, -CHECK_BUTTON_OFFSET_Y)]; + NSView *readNotesAccessoryView = [[NSView alloc] initWithFrame:NSInsetRect([replaceNotesCheckButton frame], -CHECK_BUTTON_OFFSET_X, -CHECK_BUTTON_OFFSET_Y)]; [readNotesAccessoryView addSubview:replaceNotesCheckButton]; [oPanel setAccessoryView:readNotesAccessoryView]; [replaceNotesCheckButton setState:NSControlStateValueOn]; @@ -1131,11 +1130,8 @@ [oPanel setDirectoryURL:[fileURL URLByDeletingLastPathComponent]]; [oPanel setAllowedFileTypes:@[SKDocumentTypeNotes]]; [oPanel beginSheetModalForWindow:[self windowForSheet] completionHandler:^(NSModalResponse result){ - if (result == NSModalResponseOK) { - NSURL *notesURL = [[oPanel URLs] objectAtIndex:0]; - BOOL replace = (replaceNotesCheckButton && [replaceNotesCheckButton state] == NSControlStateValueOn); - [self readNotesFromURL:notesURL replace:replace]; - } + if (result == NSModalResponseOK) + [self readNotesFromURL:[[oPanel URLs] firstObject] replace:[replaceNotesCheckButton state] == NSControlStateValueOn]; }]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-18 15:57:06
|
Revision: 15498 http://sourceforge.net/p/skim-app/code/15498 Author: hofman Date: 2025-06-18 15:57:03 +0000 (Wed, 18 Jun 2025) Log Message: ----------- set correct array Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-18 15:55:54 UTC (rev 15497) +++ trunk/SKMainDocument.m 2025-06-18 15:57:03 UTC (rev 15498) @@ -910,7 +910,7 @@ (pdfDoc = [[SKPDFDocument alloc] initWithURL:pdfURL])) { NSArray *array = [[NSFileManager defaultManager] readSkimNotesFromPDFBundleAtURL:absoluteURL error:&error]; if ([array count]) { - [tmpData setNoteDicts:array]; + notes = array; } else if (array == nil && [self shouldDiscontinueAfterReadNotesError:error fromURL:absoluteURL]) { data = nil; pdfDoc = nil; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-18 15:55:56
|
Revision: 15497 http://sourceforge.net/p/skim-app/code/15497 Author: hofman Date: 2025-06-18 15:55:54 +0000 (Wed, 18 Jun 2025) Log Message: ----------- combine conditions, create tmpdata only when needed Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-18 15:48:40 UTC (rev 15496) +++ trunk/SKMainDocument.m 2025-06-18 15:55:54 UTC (rev 15497) @@ -899,11 +899,10 @@ NSData *fileData = nil; NSData *data = nil; PDFDocument *pdfDoc = nil; + NSArray *notes = nil; NSError *error = nil; NSWorkspace *ws = [NSWorkspace sharedWorkspace]; - tmpData = [[SKTemporaryData alloc] init]; - if ([ws type:docType conformsToType:SKDocumentTypePDFBundle]) { NSURL *pdfURL = [[NSFileManager defaultManager] bundledFileURLWithExtension:@"pdf" inPDFBundleAtURL:absoluteURL error:&error]; if (pdfURL) { @@ -932,7 +931,7 @@ BOOL foundEANotes = [array count] > 0; // if we found no notes, see if we had an error finding notes. If EAs were not supported we ignore the error, as we may assume there won't be any notes if (foundEANotes) { - [tmpData setNoteDicts:array]; + notes = array; } else if (array == nil && isIgnorablePOSIXError(error) == NO && [self shouldDiscontinueAfterReadNotesError:error fromURL:absoluteURL]) { fileData = nil; data = nil; @@ -947,8 +946,8 @@ readOption = [self definitiveOption:readOption usingMessageText:NSLocalizedString(@"Found Separate Notes", @"Message in alert dialog") informativeText:foundEANotes ? NSLocalizedString(@"A Skim notes file with the same name was found. Do you want Skim to read the notes from this file?", @"Informative text in alert dialog") : [NSString stringWithFormat:NSLocalizedString(@"Unable to read notes for %@, but a Skim notes file with the same name was found. Do you want Skim to read the notes from this file?", @"Informative text in alert dialog"), [[absoluteURL path] stringByAbbreviatingWithTildeInPath]]]; if (readOption == SKOptionAlways) { array = [[NSFileManager defaultManager] readSkimNotesFromSkimFileAtURL:notesURL error:NULL]; - if ([array count] && [array isEqualToArray:[tmpData noteDicts]] == NO) { - [tmpData setNoteDicts:array]; + if ([array count] && [array isEqualToArray:notes] == NO) { + notes = array; [self updateChangeCount:NSChangeReadOtherContents]; } } @@ -958,46 +957,43 @@ } } - if (data) { - if (pdfDoc) { - [self setPDFData:data]; - [tmpData setPdfDocument:pdfDoc]; - [self setOriginalData:fileData]; - [fileUpdateChecker didUpdateFromURL:absoluteURL]; - - NSDictionary *dictionary = nil; - NSArray *array = nil; - NSNumber *number = nil; - if ([docType isEqualToString:SKDocumentTypePDFBundle]) { - NSDictionary *info = [NSDictionary dictionaryWithContentsOfURL:[[absoluteURL URLByAppendingPathComponent:BUNDLE_DATA_FILENAME isDirectory:NO] URLByAppendingPathExtension:@"plist"]]; - if ([info isKindOfClass:[NSDictionary class]]) { - dictionary = [info objectForKey:SKPresentationOptionsKey]; - array = [info objectForKey:SKTagsKey]; - number = [info objectForKey:SKRatingKey]; - } - } else { - SKNExtendedAttributeManager *eam = [SKNExtendedAttributeManager sharedNoSplitManager]; - NSError *err = nil; - dictionary = [eam propertyListFromExtendedAttributeNamed:PRESENTATION_OPTIONS_KEY atPath:[absoluteURL path] traverseLink:YES error:&err]; - array = [eam propertyListFromExtendedAttributeNamed:OPEN_META_TAGS_KEY atPath:[absoluteURL path] traverseLink:YES error:NULL]; - number = [eam propertyListFromExtendedAttributeNamed:OPEN_META_RATING_KEY atPath:[absoluteURL path] traverseLink:YES error:NULL]; + if (data && pdfDoc) { + tmpData = [[SKTemporaryData alloc] init]; + [tmpData setPdfDocument:pdfDoc]; + [tmpData setNoteDicts:notes]; + [self setPDFData:data]; + [self setOriginalData:fileData]; + [fileUpdateChecker didUpdateFromURL:absoluteURL]; + + NSDictionary *dictionary = nil; + NSArray *array = nil; + NSNumber *number = nil; + if ([docType isEqualToString:SKDocumentTypePDFBundle]) { + NSDictionary *info = [NSDictionary dictionaryWithContentsOfURL:[[absoluteURL URLByAppendingPathComponent:BUNDLE_DATA_FILENAME isDirectory:NO] URLByAppendingPathExtension:@"plist"]]; + if ([info isKindOfClass:[NSDictionary class]]) { + dictionary = [info objectForKey:SKPresentationOptionsKey]; + array = [info objectForKey:SKTagsKey]; + number = [info objectForKey:SKRatingKey]; } - if ([dictionary isKindOfClass:[NSDictionary class]] && [dictionary count]) - [tmpData setPresentationOptions:dictionary]; - if ([array isKindOfClass:[NSArray class]] && [array count]) - [tmpData setOpenMetaTags:array]; - if ([number respondsToSelector:@selector(doubleValue)] && [number doubleValue] > 0.0) - [tmpData setOpenMetaRating:[number doubleValue]]; + } else { + SKNExtendedAttributeManager *eam = [SKNExtendedAttributeManager sharedNoSplitManager]; + NSError *err = nil; + dictionary = [eam propertyListFromExtendedAttributeNamed:PRESENTATION_OPTIONS_KEY atPath:[absoluteURL path] traverseLink:YES error:&err]; + array = [eam propertyListFromExtendedAttributeNamed:OPEN_META_TAGS_KEY atPath:[absoluteURL path] traverseLink:YES error:NULL]; + number = [eam propertyListFromExtendedAttributeNamed:OPEN_META_RATING_KEY atPath:[absoluteURL path] traverseLink:YES error:NULL]; } - } - - if ([tmpData pdfDocument] == nil) { - tmpData = nil; + if ([dictionary isKindOfClass:[NSDictionary class]] && [dictionary count]) + [tmpData setPresentationOptions:dictionary]; + if ([array isKindOfClass:[NSArray class]] && [array count]) + [tmpData setOpenMetaTags:array]; + if ([number respondsToSelector:@selector(doubleValue)] && [number doubleValue] > 0.0) + [tmpData setOpenMetaRating:[number doubleValue]]; + + return YES; + } else { if (outError) *outError = error ?: [NSError readFileErrorWithLocalizedDescription:NSLocalizedString(@"Unable to load file", @"Error description")]; return NO; - } else { - 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-18 15:48:42
|
Revision: 15496 http://sourceforge.net/p/skim-app/code/15496 Author: hofman Date: 2025-06-18 15:48:40 +0000 (Wed, 18 Jun 2025) Log Message: ----------- get preference only when not already failing Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-18 15:42:54 UTC (rev 15495) +++ trunk/SKMainDocument.m 2025-06-18 15:48:40 UTC (rev 15496) @@ -939,16 +939,18 @@ pdfDoc = nil; error = [NSError userCancelledErrorWithUnderlyingError:error]; } - NSInteger readOption = [[NSUserDefaults standardUserDefaults] integerForKey:foundEANotes ? SKReadNonMissingNotesFromSkimFileOptionKey : SKReadMissingNotesFromSkimFileOptionKey]; - if (pdfDoc && readOption != SKOptionNever) { - NSURL *notesURL = [absoluteURL URLReplacingPathExtension:@"skim"]; - if ([notesURL checkResourceIsReachableAndReturnError:NULL]) { - readOption = [self definitiveOption:readOption usingMessageText:NSLocalizedString(@"Found Separate Notes", @"Message in alert dialog") informativeText:foundEANotes ? NSLocalizedString(@"A Skim notes file with the same name was found. Do you want Skim to read the notes from this file?", @"Informative text in alert dialog") : [NSString stringWithFormat:NSLocalizedString(@"Unable to read notes for %@, but a Skim notes file with the same name was found. Do you want Skim to read the notes from this file?", @"Informative text in alert dialog"), [[absoluteURL path] stringByAbbreviatingWithTildeInPath]]]; - if (readOption == SKOptionAlways) { - array = [[NSFileManager defaultManager] readSkimNotesFromSkimFileAtURL:notesURL error:NULL]; - if ([array count] && [array isEqualToArray:[tmpData noteDicts]] == NO) { - [tmpData setNoteDicts:array]; - [self updateChangeCount:NSChangeReadOtherContents]; + if (pdfDoc) { + NSInteger readOption = [[NSUserDefaults standardUserDefaults] integerForKey:foundEANotes ? SKReadNonMissingNotesFromSkimFileOptionKey : SKReadMissingNotesFromSkimFileOptionKey]; + if (readOption != SKOptionNever) { + NSURL *notesURL = [absoluteURL URLReplacingPathExtension:@"skim"]; + if ([notesURL checkResourceIsReachableAndReturnError:NULL]) { + readOption = [self definitiveOption:readOption usingMessageText:NSLocalizedString(@"Found Separate Notes", @"Message in alert dialog") informativeText:foundEANotes ? NSLocalizedString(@"A Skim notes file with the same name was found. Do you want Skim to read the notes from this file?", @"Informative text in alert dialog") : [NSString stringWithFormat:NSLocalizedString(@"Unable to read notes for %@, but a Skim notes file with the same name was found. Do you want Skim to read the notes from this file?", @"Informative text in alert dialog"), [[absoluteURL path] stringByAbbreviatingWithTildeInPath]]]; + if (readOption == SKOptionAlways) { + array = [[NSFileManager defaultManager] readSkimNotesFromSkimFileAtURL:notesURL error:NULL]; + if ([array count] && [array isEqualToArray:[tmpData noteDicts]] == NO) { + [tmpData setNoteDicts:array]; + [self updateChangeCount:NSChangeReadOtherContents]; + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-18 15:42:57
|
Revision: 15495 http://sourceforge.net/p/skim-app/code/15495 Author: hofman Date: 2025-06-18 15:42:54 +0000 (Wed, 18 Jun 2025) Log Message: ----------- rename method Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-18 15:25:25 UTC (rev 15494) +++ trunk/SKMainDocument.m 2025-06-18 15:42:54 UTC (rev 15495) @@ -299,7 +299,7 @@ return option; } -- (BOOL)discontinueAfterFailureToReadNotesFromURL:(NSURL *)aURL error:(NSError *)error { +- (BOOL)shouldDiscontinueAfterReadNotesError:(NSError *)error fromURL:(NSURL *)aURL { NSAlert *alert = [[NSAlert alloc] init]; [alert setMessageText:NSLocalizedString(@"Unable to Read Notes", @"Message in alert dialog")]; [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Skim was not able to read the notes at %@. %@ Do you want to continue to open the PDF document anyway?", @"Informative text in alert dialog"), [[aURL path] stringByAbbreviatingWithTildeInPath], [error localizedDescription]]]; @@ -912,7 +912,7 @@ NSArray *array = [[NSFileManager defaultManager] readSkimNotesFromPDFBundleAtURL:absoluteURL error:&error]; if ([array count]) { [tmpData setNoteDicts:array]; - } else if (array == nil && [self discontinueAfterFailureToReadNotesFromURL:absoluteURL error:error]) { + } else if (array == nil && [self shouldDiscontinueAfterReadNotesError:error fromURL:absoluteURL]) { data = nil; pdfDoc = nil; error = [NSError userCancelledErrorWithUnderlyingError:error]; @@ -933,7 +933,7 @@ // if we found no notes, see if we had an error finding notes. If EAs were not supported we ignore the error, as we may assume there won't be any notes if (foundEANotes) { [tmpData setNoteDicts:array]; - } else if (array == nil && isIgnorablePOSIXError(error) == NO && [self discontinueAfterFailureToReadNotesFromURL:absoluteURL error:error]) { + } else if (array == nil && isIgnorablePOSIXError(error) == NO && [self shouldDiscontinueAfterReadNotesError:error fromURL:absoluteURL]) { fileData = nil; data = nil; pdfDoc = nil; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-18 15:25:26
|
Revision: 15494 http://sourceforge.net/p/skim-app/code/15494 Author: hofman Date: 2025-06-18 15:25:25 +0000 (Wed, 18 Jun 2025) Log Message: ----------- alert messages are always the same Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-18 14:59:49 UTC (rev 15493) +++ trunk/SKMainDocument.m 2025-06-18 15:25:25 UTC (rev 15494) @@ -299,10 +299,10 @@ return option; } -- (BOOL)confirmNotToContinueUsingMessageText:(NSString *)messageText informativeText:(NSString *)informativeText { +- (BOOL)discontinueAfterFailureToReadNotesFromURL:(NSURL *)aURL error:(NSError *)error { NSAlert *alert = [[NSAlert alloc] init]; - [alert setMessageText:messageText]; - [alert setInformativeText:informativeText]; + [alert setMessageText:NSLocalizedString(@"Unable to Read Notes", @"Message in alert dialog")]; + [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Skim was not able to read the notes at %@. %@ Do you want to continue to open the PDF document anyway?", @"Informative text in alert dialog"), [[aURL path] stringByAbbreviatingWithTildeInPath], [error localizedDescription]]]; [alert addButtonWithTitle:NSLocalizedString(@"No", @"Button title")]; [alert addButtonWithTitle:NSLocalizedString(@"Yes", @"Button title")]; return [alert runModal] == NSAlertFirstButtonReturn; @@ -912,7 +912,7 @@ NSArray *array = [[NSFileManager defaultManager] readSkimNotesFromPDFBundleAtURL:absoluteURL error:&error]; if ([array count]) { [tmpData setNoteDicts:array]; - } else if (array == nil && [self confirmNotToContinueUsingMessageText:NSLocalizedString(@"Unable to Read Notes", @"Message in alert dialog") informativeText:[NSString stringWithFormat:NSLocalizedString(@"Skim was not able to read the notes at %@. %@ Do you want to continue to open the PDF document anyway?", @"Informative text in alert dialog"), [[pdfURL path] stringByAbbreviatingWithTildeInPath], [error localizedDescription]]]) { + } else if (array == nil && [self discontinueAfterFailureToReadNotesFromURL:absoluteURL error:error]) { data = nil; pdfDoc = nil; error = [NSError userCancelledErrorWithUnderlyingError:error]; @@ -933,7 +933,7 @@ // if we found no notes, see if we had an error finding notes. If EAs were not supported we ignore the error, as we may assume there won't be any notes if (foundEANotes) { [tmpData setNoteDicts:array]; - } else if (array == nil && isIgnorablePOSIXError(error) == NO && [self confirmNotToContinueUsingMessageText:NSLocalizedString(@"Unable to Read Notes", @"Message in alert dialog") informativeText:[NSString stringWithFormat:NSLocalizedString(@"Skim was not able to read the notes at %@. %@ Do you want to continue to open the PDF document anyway?", @"Informative text in alert dialog"), [[absoluteURL path] stringByAbbreviatingWithTildeInPath], [error localizedDescription]]]) { + } else if (array == nil && isIgnorablePOSIXError(error) == NO && [self discontinueAfterFailureToReadNotesFromURL:absoluteURL error:error]) { fileData = nil; data = nil; pdfDoc = nil; 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:59:50
|
Revision: 15493 http://sourceforge.net/p/skim-app/code/15493 Author: hofman Date: 2025-06-18 14:59:49 +0000 (Wed, 18 Jun 2025) Log Message: ----------- convenience method to show an alert to let the user confirm not to continue Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-18 14:40:46 UTC (rev 15492) +++ trunk/SKMainDocument.m 2025-06-18 14:59:49 UTC (rev 15493) @@ -299,6 +299,15 @@ return option; } +- (BOOL)confirmNotToContinueUsingMessageText:(NSString *)messageText informativeText:(NSString *)informativeText { + NSAlert *alert = [[NSAlert alloc] init]; + [alert setMessageText:messageText]; + [alert setInformativeText:informativeText]; + [alert addButtonWithTitle:NSLocalizedString(@"No", @"Button title")]; + [alert addButtonWithTitle:NSLocalizedString(@"Yes", @"Button title")]; + return [alert runModal] == NSAlertFirstButtonReturn; +} + - (SKInteractionMode)interactionMode { return [[self mainWindowController] interactionMode]; } @@ -901,19 +910,12 @@ if ((data = [[NSData alloc] initWithContentsOfURL:pdfURL options:NSDataReadingUncached error:&error]) && (pdfDoc = [[SKPDFDocument alloc] initWithURL:pdfURL])) { NSArray *array = [[NSFileManager defaultManager] readSkimNotesFromPDFBundleAtURL:absoluteURL error:&error]; - if (array == nil) { - NSAlert *alert = [[NSAlert alloc] init]; - [alert setMessageText:NSLocalizedString(@"Unable to Read Notes", @"Message in alert dialog")]; - [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Skim was not able to read the notes at %@. %@ Do you want to continue to open the PDF document anyway?", @"Informative text in alert dialog"), [[pdfURL path] stringByAbbreviatingWithTildeInPath], [error localizedDescription]]]; - [alert addButtonWithTitle:NSLocalizedString(@"No", @"Button title")]; - [alert addButtonWithTitle:NSLocalizedString(@"Yes", @"Button title")]; - if ([alert runModal] == NSAlertFirstButtonReturn) { - data = nil; - pdfDoc = nil; - error = [NSError userCancelledErrorWithUnderlyingError:error]; - } - } else if ([array count]) { + if ([array count]) { [tmpData setNoteDicts:array]; + } else if (array == nil && [self confirmNotToContinueUsingMessageText:NSLocalizedString(@"Unable to Read Notes", @"Message in alert dialog") informativeText:[NSString stringWithFormat:NSLocalizedString(@"Skim was not able to read the notes at %@. %@ Do you want to continue to open the PDF document anyway?", @"Informative text in alert dialog"), [[pdfURL path] stringByAbbreviatingWithTildeInPath], [error localizedDescription]]]) { + data = nil; + pdfDoc = nil; + error = [NSError userCancelledErrorWithUnderlyingError:error]; } } } @@ -928,23 +930,14 @@ if (pdfDoc) { NSArray *array = [[NSFileManager defaultManager] readSkimNotesFromExtendedAttributesAtURL:absoluteURL error:&error]; BOOL foundEANotes = [array count] > 0; + // if we found no notes, see if we had an error finding notes. If EAs were not supported we ignore the error, as we may assume there won't be any notes if (foundEANotes) { [tmpData setNoteDicts:array]; - } else { - // we found no notes, see if we had an error finding notes. if EAs were not supported we ignore the error, as we may assume there won't be any notes - if (array == nil && isIgnorablePOSIXError(error) == NO) { - NSAlert *alert = [[NSAlert alloc] init]; - [alert setMessageText:NSLocalizedString(@"Unable to Read Notes", @"Message in alert dialog")]; - [alert setInformativeText:[NSString stringWithFormat:NSLocalizedString(@"Skim was not able to read the notes at %@. %@ Do you want to continue to open the PDF document anyway?", @"Informative text in alert dialog"), [[absoluteURL path] stringByAbbreviatingWithTildeInPath], [error localizedDescription]]]; - [alert addButtonWithTitle:NSLocalizedString(@"No", @"Button title")]; - [alert addButtonWithTitle:NSLocalizedString(@"Yes", @"Button title")]; - if ([alert runModal] == NSAlertFirstButtonReturn) { - fileData = nil; - data = nil; - pdfDoc = nil; - error = [NSError userCancelledErrorWithUnderlyingError:error]; - } - } + } else if (array == nil && isIgnorablePOSIXError(error) == NO && [self confirmNotToContinueUsingMessageText:NSLocalizedString(@"Unable to Read Notes", @"Message in alert dialog") informativeText:[NSString stringWithFormat:NSLocalizedString(@"Skim was not able to read the notes at %@. %@ Do you want to continue to open the PDF document anyway?", @"Informative text in alert dialog"), [[absoluteURL path] stringByAbbreviatingWithTildeInPath], [error localizedDescription]]]) { + fileData = nil; + data = nil; + pdfDoc = nil; + error = [NSError userCancelledErrorWithUnderlyingError:error]; } NSInteger readOption = [[NSUserDefaults standardUserDefaults] integerForKey:foundEANotes ? SKReadNonMissingNotesFromSkimFileOptionKey : SKReadMissingNotesFromSkimFileOptionKey]; if (pdfDoc && readOption != SKOptionNever) { 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:40:49
|
Revision: 15492 http://sourceforge.net/p/skim-app/code/15492 Author: hofman Date: 2025-06-18 14:40:46 +0000 (Wed, 18 Jun 2025) Log Message: ----------- make sure main window controller is created once Modified Paths: -------------- trunk/SKMainDocument.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-18 14:29:27 UTC (rev 15491) +++ trunk/SKMainDocument.m 2025-06-18 14:40:46 UTC (rev 15492) @@ -176,9 +176,11 @@ } - (void)makeWindowControllers{ - mainWindowController = [[SKMainWindowController alloc] init]; - [mainWindowController setShouldCloseDocument:YES]; - [self addWindowController:mainWindowController]; + if (mainWindowController == nil) { + mainWindowController = [[SKMainWindowController alloc] init]; + [mainWindowController setShouldCloseDocument:YES]; + [self addWindowController:mainWindowController]; + } } - (void)updateChangeCount:(NSDocumentChangeType)change { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |