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-24 14:44:51
|
Revision: 15541 http://sourceforge.net/p/skim-app/code/15541 Author: hofman Date: 2025-06-24 14:44:50 +0000 (Tue, 24 Jun 2025) Log Message: ----------- consider three cases after for delayed termination Modified Paths: -------------- trunk/SKApplicationController.m Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2025-06-24 14:24:42 UTC (rev 15540) +++ trunk/SKApplicationController.m 2025-06-24 14:44:50 UTC (rev 15541) @@ -299,17 +299,18 @@ } - (void)applicationStartsTerminating:(NSNotification *)aNotification { - [currentDocumentsTimer invalidate]; - currentDocumentsTimer = nil; - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc removeObserver:self name:SKDocumentDidShowNotification object:nil]; - [nc removeObserver:self name:SKDocumentControllerDidRemoveDocumentNotification object:nil]; - [self registerCurrentDocuments:nil]; + if (currentDocumentsTimer == nil) { + [currentDocumentsTimer invalidate]; + currentDocumentsTimer = nil; + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc removeObserver:self name:SKDocumentDidShowNotification object:nil]; + [nc removeObserver:self name:SKDocumentControllerDidRemoveDocumentNotification object:nil]; + [self registerCurrentDocuments:nil]; + } } - (void)applicationDocumentControllerCanceledTerminate:(NSApplication *)application { - if (currentDocumentsTimer == nil) - [self registerForCurrentDocumentsNotifications]; + [self registerForCurrentDocumentsNotifications]; } - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)application { @@ -320,14 +321,14 @@ break; } else { DISPATCH_MAIN_AFTER_SEC(0.51, ^{ - if ([doc interactionMode] == SKPresentationMode && [doc canExitPresentation] == NO) { + if ([doc interactionMode] != SKPresentationMode) { + [NSApp replyToApplicationShouldTerminate:YES]; + } else if ([doc canExitPresentation]) { + [doc setInteractionMode:SKNormalMode]; + [NSApp replyToApplicationShouldTerminate:YES]; + } else { [NSApp replyToApplicationShouldTerminate:NO]; - if (currentDocumentsTimer == nil) - [self registerForCurrentDocumentsNotifications]; - } else { - if ([doc canExitPresentation]) - [doc setInteractionMode:SKNormalMode]; - [NSApp replyToApplicationShouldTerminate:YES]; + [self registerForCurrentDocumentsNotifications]; } }); return NSTerminateLater; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-24 14:24:45
|
Revision: 15540 http://sourceforge.net/p/skim-app/code/15540 Author: hofman Date: 2025-06-24 14:24:42 +0000 (Tue, 24 Jun 2025) Log Message: ----------- Add canExitPresentation property to NSDocument. Delay terminating the app when a document is busy entering presentation. Delay updating file from disk when busy entering presentation. Exit presentation when updating from file update from file update checker. Modified Paths: -------------- trunk/NSDocument_SKExtensions.h trunk/NSDocument_SKExtensions.m trunk/SKApplicationController.m trunk/SKFileUpdateChecker.m trunk/SKMainDocument.m Modified: trunk/NSDocument_SKExtensions.h =================================================================== --- trunk/NSDocument_SKExtensions.h 2025-06-24 09:37:26 UTC (rev 15539) +++ trunk/NSDocument_SKExtensions.h 2025-06-24 14:24:42 UTC (rev 15540) @@ -62,6 +62,8 @@ @property (nonatomic) SKInteractionMode interactionMode; +@property (nonatomic, readonly) BOOL canExitPresentation; + #pragma mark Document Setup - (void)saveRecentDocumentInfo; Modified: trunk/NSDocument_SKExtensions.m =================================================================== --- trunk/NSDocument_SKExtensions.m 2025-06-24 09:37:26 UTC (rev 15539) +++ trunk/NSDocument_SKExtensions.m 2025-06-24 14:24:42 UTC (rev 15540) @@ -100,6 +100,8 @@ [[self mainWindow] toggleFullScreen:nil]; } +- (BOOL)canExitPresentation { return NO; } + #pragma mark Document Setup - (void)saveRecentDocumentInfo { Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2025-06-24 09:37:26 UTC (rev 15539) +++ trunk/SKApplicationController.m 2025-06-24 14:24:42 UTC (rev 15540) @@ -315,9 +315,23 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)application { for (NSDocument *doc in [[NSDocumentController sharedDocumentController] documents]) { if ([doc interactionMode] == SKPresentationMode) { - if (currentDocumentsTimer == nil) - [self registerForCurrentDocumentsNotifications]; - return NSTerminateCancel; + if ([doc canExitPresentation]) { + [doc setInteractionMode:SKNormalMode]; + break; + } else { + DISPATCH_MAIN_AFTER_SEC(0.51, ^{ + if ([doc interactionMode] == SKPresentationMode && [doc canExitPresentation] == NO) { + [NSApp replyToApplicationShouldTerminate:NO]; + if (currentDocumentsTimer == nil) + [self registerForCurrentDocumentsNotifications]; + } else { + if ([doc canExitPresentation]) + [doc setInteractionMode:SKNormalMode]; + [NSApp replyToApplicationShouldTerminate:YES]; + } + }); + return NSTerminateLater; + } } } return NSTerminateNow; Modified: trunk/SKFileUpdateChecker.m =================================================================== --- trunk/SKFileUpdateChecker.m 2025-06-24 09:37:26 UTC (rev 15539) +++ trunk/SKFileUpdateChecker.m 2025-06-24 14:24:42 UTC (rev 15540) @@ -168,6 +168,9 @@ if (option == SKFileUpdateOptionAuto) fucFlags.autoUpdate = YES; + if ([document interactionMode] == SKPresentationMode) + [document setInteractionMode:SKNormalMode]; + NSError *error = nil; BOOL didRevert = [document revertToContentsOfURL:[document fileURL] ofType:[document fileType] error:&error]; if (didRevert == NO && error != nil && [error isUserCancelledError] == NO) @@ -209,6 +212,8 @@ if ([docWindow attachedSheet]) { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleWindowDidEndSheetNotification:) name:NSWindowDidEndSheetNotification object:docWindow]; + } else if ([document interactionMode] == SKPresentationMode && [document canExitPresentation] == NO) { + [self performSelector:@selector(fileUpdated) withObject:nil afterDelay:0.51]; } else if (canUpdateFromURL(fileURL)) { BOOL documentHasEdits = [document isDocumentEdited] || [document hasNotes]; if (fucFlags.autoUpdate && documentHasEdits == NO) { Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-24 09:37:26 UTC (rev 15539) +++ trunk/SKMainDocument.m 2025-06-24 14:24:42 UTC (rev 15540) @@ -308,6 +308,25 @@ return [[self mainWindowController] interactionMode]; } +- (void)setInteractionMode:(SKInteractionMode)mode { + if (mode == SKNormalMode) { + if ([[self mainWindowController] canExitFullscreen]) + [[self mainWindowController] exitFullscreen]; + else if ([[self mainWindowController] canExitPresentation]) + [[self mainWindowController] exitPresentation]; + } else if (mode == SKFullScreenMode) { + if ([[self mainWindowController] canEnterFullscreen]) + [[self mainWindowController] enterFullscreen]; + } else if (mode == SKPresentationMode) { + if ([[self mainWindowController] canEnterPresentation]) + [[self mainWindowController] enterPresentation]; + } +} + +- (BOOL)canExitPresentation { + return [[self mainWindowController] canExitPresentation]; +} + #pragma mark Writing - (NSString *)fileType { @@ -998,9 +1017,6 @@ NSWindow *modalwindow = nil; NSModalSession session; - if ([[self mainWindowController] canExitPresentation]) - [[self mainWindowController] exitPresentation]; - if ([mainWindow attachedSheet] == nil && [mainWindow isMainWindow]) { modalwindow = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:NSZeroRect]; [(SKApplication *)NSApp setUserAttentionDisabled:YES]; @@ -1859,21 +1875,6 @@ [[self pdfView] setToolMode:newToolMode]; } -- (void)setInteractionMode:(SKInteractionMode)mode { - if (mode == SKNormalMode) { - if ([[self mainWindowController] canExitFullscreen]) - [[self mainWindowController] exitFullscreen]; - else if ([[self mainWindowController] canExitPresentation]) - [[self mainWindowController] exitPresentation]; - } else if (mode == SKFullScreenMode) { - if ([[self mainWindowController] canEnterFullscreen]) - [[self mainWindowController] enterFullscreen]; - } else if (mode == SKPresentationMode) { - if ([[self mainWindowController] canEnterPresentation]) - [[self mainWindowController] enterPresentation]; - } -} - - (NSDocument *)presentationNotesDocument { return [[self mainWindowController] presentationNotesDocument]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-24 09:37:28
|
Revision: 15539 http://sourceforge.net/p/skim-app/code/15539 Author: hofman Date: 2025-06-24 09:37:26 +0000 (Tue, 24 Jun 2025) Log Message: ----------- set delegate of presentation window before animation, so it can get windowWillClose notifications Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-06-24 09:09:52 UTC (rev 15538) +++ trunk/SKMainWindowController_FullScreen.m 2025-06-24 09:37:26 UTC (rev 15539) @@ -280,6 +280,8 @@ [self setWindow:presentationWindow]; + [presentationWindow setDelegate:self]; + // prevent sleep if (activity == nil) activity = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiated | NSActivityIdleDisplaySleepDisabled | NSActivityIdleSystemSleepDisabled reason:@"Presentation"]; @@ -312,8 +314,6 @@ [presentationWindow setHasShadow:YES]; } - [presentationWindow setDelegate:self]; - [presentationView didOpen]; mwcFlags.isSwitchingFullScreen = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-24 09:09:55
|
Revision: 15538 http://sourceforge.net/p/skim-app/code/15538 Author: hofman Date: 2025-06-24 09:09:52 +0000 (Tue, 24 Jun 2025) Log Message: ----------- add comment and move code Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-06-23 22:50:55 UTC (rev 15537) +++ trunk/SKMainWindowController_FullScreen.m 2025-06-24 09:09:52 UTC (rev 15538) @@ -229,12 +229,13 @@ mwcFlags.isSwitchingFullScreen = 1; + // clean up extra windows, as we will not receive windowWillResignMain: [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; + if ([[[NSColorPanel sharedColorPanel] accessoryView] isEqual:colorAccessoryView] || [[[NSColorPanel sharedColorPanel] accessoryView] isEqual:textColorAccessoryView]) + [[NSColorPanel sharedColorPanel] setAccessoryView:nil]; // remember normal setup to return to, we must do this before changing the interactionMode [savedNormalSetup setDictionary:[pdfView displaySettings]]; - if ([[[NSColorPanel sharedColorPanel] accessoryView] isEqual:colorAccessoryView] || [[[NSColorPanel sharedColorPanel] accessoryView] isEqual:textColorAccessoryView]) - [[NSColorPanel sharedColorPanel] setAccessoryView:nil]; NSWindow *normalWindow = [self window]; savedNormalWindow = normalWindow; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-23 22:50:57
|
Revision: 15537 http://sourceforge.net/p/skim-app/code/15537 Author: hofman Date: 2025-06-23 22:50:55 +0000 (Mon, 23 Jun 2025) Log Message: ----------- make sure no document is in presentation mode when terminating, so cleanup is properly performed. Modified Paths: -------------- trunk/SKApplicationController.m Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2025-06-23 22:04:15 UTC (rev 15536) +++ trunk/SKApplicationController.m 2025-06-23 22:50:55 UTC (rev 15537) @@ -312,6 +312,17 @@ [self registerForCurrentDocumentsNotifications]; } +- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)application { + for (NSDocument *doc in [[NSDocumentController sharedDocumentController] documents]) { + if ([doc interactionMode] == SKPresentationMode) { + if (currentDocumentsTimer == nil) + [self registerForCurrentDocumentsNotifications]; + return NSTerminateCancel; + } + } + return NSTerminateNow; +} + #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-23 22:04:17
|
Revision: 15536 http://sourceforge.net/p/skim-app/code/15536 Author: hofman Date: 2025-06-23 22:04:15 +0000 (Mon, 23 Jun 2025) Log Message: ----------- Set windo delegate to nil before witching to presentation mode, so we don't need to check for savedNormalWindow. Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-06-23 22:00:03 UTC (rev 15535) +++ trunk/SKMainWindowController_FullScreen.m 2025-06-23 22:04:15 UTC (rev 15536) @@ -239,6 +239,8 @@ NSWindow *normalWindow = [self window]; savedNormalWindow = normalWindow; + [normalWindow setDelegate:nil]; + interactionMode = SKPresentationMode; NSScreen *screen = [normalWindow screen]; @@ -275,8 +277,6 @@ shouldFadeOut = YES; } - [normalWindow setDelegate:nil]; - [self setWindow:presentationWindow]; // prevent sleep Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-23 22:00:03 UTC (rev 15535) +++ trunk/SKMainWindowController_UI.m 2025-06-23 22:04:15 UTC (rev 15536) @@ -234,7 +234,7 @@ - (void)windowDidBecomeMain:(NSNotification *)notification { if ([self interactionMode] != SKPresentationMode) { [self updateUtilityPanel]; - } else if ([NSApp isActive] && [[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO && [self window] != savedNormalWindow) { + } else if ([NSApp isActive] && [[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO) { [[self window] setLevel:NSPopUpMenuWindowLevel]; } } @@ -244,7 +244,7 @@ [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; if ([[[NSColorPanel sharedColorPanel] accessoryView] isEqual:colorAccessoryView] || [[[NSColorPanel sharedColorPanel] accessoryView] isEqual:textColorAccessoryView]) [[NSColorPanel sharedColorPanel] setAccessoryView:nil]; - } else if ([[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO && [self window] != savedNormalWindow) { + } else if ([[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO) { [[self window] setLevel:NSNormalWindowLevel]; } } @@ -256,7 +256,7 @@ } - (void)windowDidChangeScreen:(NSNotification *)notification { - if ([self interactionMode] == SKPresentationMode && [self window] != savedNormalWindow) { + if ([self interactionMode] == SKPresentationMode) { NSScreen *screen = [[self window] screen]; [[self window] setFrame:[screen frame] display:NO]; if (sideWindow) { @@ -270,7 +270,7 @@ } - (void)windowDidMove:(NSNotification *)notification { - if ([self interactionMode] == SKPresentationMode && [self window] != savedNormalWindow) { + if ([self interactionMode] == SKPresentationMode) { if ([[self window] styleMask] == NSWindowStyleMaskBorderless) { NSScreen *screen = [[self window] screen]; NSRect screenFrame = [screen frame]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-23 22:00:06
|
Revision: 15535 http://sourceforge.net/p/skim-app/code/15535 Author: hofman Date: 2025-06-23 22:00:03 +0000 (Mon, 23 Jun 2025) Log Message: ----------- Make sure color panel accessory view is cleared when going into presentation. Simpler check for window. Modified Paths: -------------- trunk/SKMainWindowController_FullScreen.m trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-06-23 21:49:35 UTC (rev 15534) +++ trunk/SKMainWindowController_FullScreen.m 2025-06-23 22:00:03 UTC (rev 15535) @@ -233,6 +233,8 @@ // remember normal setup to return to, we must do this before changing the interactionMode [savedNormalSetup setDictionary:[pdfView displaySettings]]; + if ([[[NSColorPanel sharedColorPanel] accessoryView] isEqual:colorAccessoryView] || [[[NSColorPanel sharedColorPanel] accessoryView] isEqual:textColorAccessoryView]) + [[NSColorPanel sharedColorPanel] setAccessoryView:nil]; NSWindow *normalWindow = [self window]; savedNormalWindow = normalWindow; Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-23 21:49:35 UTC (rev 15534) +++ trunk/SKMainWindowController_UI.m 2025-06-23 22:00:03 UTC (rev 15535) @@ -232,38 +232,31 @@ #pragma mark NSWindow delegate protocol - (void)windowDidBecomeMain:(NSNotification *)notification { - if ([self interactionMode] != SKPresentationMode) + if ([self interactionMode] != SKPresentationMode) { [self updateUtilityPanel]; - else if ([NSApp isActive] && [[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO && [[self window] isEqual:savedNormalWindow] == NO) + } else if ([NSApp isActive] && [[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO && [self window] != savedNormalWindow) { [[self window] setLevel:NSPopUpMenuWindowLevel]; + } } - (void)windowDidResignMain:(NSNotification *)notification { - [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; - 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] isEqual:savedNormalWindow] == NO) + if ([self interactionMode] != SKPresentationMode) { + [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; + if ([[[NSColorPanel sharedColorPanel] accessoryView] isEqual:colorAccessoryView] || [[[NSColorPanel sharedColorPanel] accessoryView] isEqual:textColorAccessoryView]) + [[NSColorPanel sharedColorPanel] setAccessoryView:nil]; + } else if ([[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO && [self window] != savedNormalWindow) { [[self window] setLevel:NSNormalWindowLevel]; + } } - (void)windowDidResignKey:(NSNotification *)notification { - [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; + if ([self interactionMode] != SKPresentationMode) { + [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; + } } -- (void)windowWillClose:(NSNotification *)notification { - [(id)[self document] windowWillClose:notification]; - - if ([[pdfView document] isFinding]) - [[pdfView document] cancelFindString]; - - if ((mwcFlags.isEditingTable || [pdfView isEditing]) && [self commitEditing] == NO) - [self discardEditing]; - - [self cleanup]; // clean up everything -} - - (void)windowDidChangeScreen:(NSNotification *)notification { - if ([self interactionMode] == SKPresentationMode && [[self window] isEqual:savedNormalWindow] == NO) { + if ([self interactionMode] == SKPresentationMode && [self window] != savedNormalWindow) { NSScreen *screen = [[self window] screen]; [[self window] setFrame:[screen frame] display:NO]; if (sideWindow) { @@ -277,13 +270,14 @@ } - (void)windowDidMove:(NSNotification *)notification { - if ([self interactionMode] == SKPresentationMode && [[self window] isEqual:savedNormalWindow] == NO) { + if ([self interactionMode] == SKPresentationMode && [self window] != savedNormalWindow) { if ([[self window] styleMask] == NSWindowStyleMaskBorderless) { NSScreen *screen = [[self window] screen]; NSRect screenFrame = [screen frame]; if (NSEqualRects(screenFrame, [[self window] frame]) == NO) [[self window] setFrame:screenFrame display:NO]; - } else if (sideWindow) { + } + if (sideWindow) { NSRect screenFrame = [[[self window] screen] frame]; NSRect frame = [sideWindow frame]; frame.origin.x = NSMinX(screenFrame); @@ -303,6 +297,18 @@ } } +- (void)windowWillClose:(NSNotification *)notification { + [(id)[self document] windowWillClose:notification]; + + if ([[pdfView document] isFinding]) + [[pdfView document] cancelFindString]; + + if ((mwcFlags.isEditingTable || [pdfView isEditing]) && [self commitEditing] == NO) + [self discardEditing]; + + [self cleanup]; // clean up everything +} + - (id)windowWillReturnFieldEditor:(NSWindow *)window toObject:(id)anObject { if (fieldEditor == nil) { fieldEditor = [[SKFieldEditor alloc] init]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-23 21:49:55
|
Revision: 15534 http://sourceforge.net/p/skim-app/code/15534 Author: hofman Date: 2025-06-23 21:49:35 +0000 (Mon, 23 Jun 2025) Log Message: ----------- No need to check for window identity in window delegate methods, as we are only the delegate of our own window, otherwwise the delegate it nil. Check for presentation window bby comparing to savedNomralWindow in presdntation mode. Modified Paths: -------------- trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-23 16:38:19 UTC (rev 15533) +++ trunk/SKMainWindowController_UI.m 2025-06-23 21:49:35 UTC (rev 15534) @@ -232,42 +232,38 @@ #pragma mark NSWindow delegate protocol - (void)windowDidBecomeMain:(NSNotification *)notification { - if ([[self window] isEqual:[notification object]]) { + if ([self interactionMode] != SKPresentationMode) [self updateUtilityPanel]; - if ([self interactionMode] == SKPresentationMode && [NSApp isActive] && [[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO && ([[self window] styleMask] & NSWindowStyleMaskTitled) == 0) - [[self window] setLevel:NSPopUpMenuWindowLevel]; - } + else if ([NSApp isActive] && [[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO && [[self window] isEqual:savedNormalWindow] == NO) + [[self window] setLevel:NSPopUpMenuWindowLevel]; } - (void)windowDidResignMain:(NSNotification *)notification { - if ([[self window] isEqual:[notification object]]) { - [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; - 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]; - } + [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; + 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] isEqual:savedNormalWindow] == NO) + [[self window] setLevel:NSNormalWindowLevel]; } - (void)windowDidResignKey:(NSNotification *)notification { - if ([[self window] isEqual:[notification object]]) { - [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; - } + [[SKImageToolTipWindow sharedToolTipWindow] orderOut:nil]; } - (void)windowWillClose:(NSNotification *)notification { - if ([[notification object] isEqual:[self window]]) { - [(id)[self document] windowWillClose:notification]; - if ([[pdfView document] isFinding]) - [[pdfView document] cancelFindString]; - if ((mwcFlags.isEditingTable || [pdfView isEditing]) && [self commitEditing] == NO) - [self discardEditing]; - [self cleanup]; // clean up everything - } + [(id)[self document] windowWillClose:notification]; + + if ([[pdfView document] isFinding]) + [[pdfView document] cancelFindString]; + + if ((mwcFlags.isEditingTable || [pdfView isEditing]) && [self commitEditing] == NO) + [self discardEditing]; + + [self cleanup]; // clean up everything } - (void)windowDidChangeScreen:(NSNotification *)notification { - if ([[notification object] isEqual:[self window]] && [self interactionMode] == SKPresentationMode && ([[notification object] styleMask] & NSWindowStyleMaskTitled) == 0) { + if ([self interactionMode] == SKPresentationMode && [[self window] isEqual:savedNormalWindow] == NO) { NSScreen *screen = [[self window] screen]; [[self window] setFrame:[screen frame] display:NO]; if (sideWindow) { @@ -277,21 +273,16 @@ frame.origin.y = NSMidY(screenFrame) - floor(0.5 * NSHeight(frame)); [sideWindow setFrame:frame display:YES]; } - [pdfView layoutDocumentView]; - [pdfView setNeedsDisplay:YES]; } } - (void)windowDidMove:(NSNotification *)notification { - if ([[notification object] isEqual:[self window]] && [self interactionMode] == SKPresentationMode && ([[notification object] styleMask] & NSWindowStyleMaskTitled) == 0) { + if ([self interactionMode] == SKPresentationMode && [[self window] isEqual:savedNormalWindow] == NO) { if ([[self window] styleMask] == NSWindowStyleMaskBorderless) { NSScreen *screen = [[self window] screen]; NSRect screenFrame = [screen frame]; - if (NSEqualRects(screenFrame, [[self window] frame]) == NO) { + if (NSEqualRects(screenFrame, [[self window] frame]) == NO) [[self window] setFrame:screenFrame display:NO]; - [pdfView layoutDocumentView]; - [pdfView setNeedsDisplay:YES]; - } } else if (sideWindow) { NSRect screenFrame = [[[self window] screen] frame]; NSRect frame = [sideWindow frame]; @@ -303,7 +294,7 @@ } - (void)windowDidChangeBackingProperties:(NSNotification *)notification { - if ([[notification object] isEqual:[self window]] && 0 != ([[notification object] styleMask] & NSWindowStyleMaskTitled)) { + if ([self interactionMode] != SKPresentationMode) { CGFloat oldScale = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue]; if (fabs(oldScale - [[self window] backingScaleFactor]) > 0.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-23 16:38:20
|
Revision: 15533 http://sourceforge.net/p/skim-app/code/15533 Author: hofman Date: 2025-06-23 16:38:19 +0000 (Mon, 23 Jun 2025) Log Message: ----------- check for presentation mode and style mask Modified Paths: -------------- trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-23 16:32:56 UTC (rev 15532) +++ trunk/SKMainWindowController_UI.m 2025-06-23 16:38:19 UTC (rev 15533) @@ -267,10 +267,10 @@ } - (void)windowDidChangeScreen:(NSNotification *)notification { - if ([[notification object] isEqual:[self window]] && ([[notification object] styleMask] & NSWindowStyleMaskTitled) == 0) { + if ([[notification object] isEqual:[self window]] && [self interactionMode] == SKPresentationMode && ([[notification object] styleMask] & NSWindowStyleMaskTitled) == 0) { NSScreen *screen = [[self window] screen]; [[self window] setFrame:[screen frame] display:NO]; - if ([self interactionMode] == SKPresentationMode && sideWindow) { + if (sideWindow) { NSRect screenFrame = [[[self window] screen] frame]; NSRect frame = [sideWindow frame]; frame.origin.x = NSMinX(screenFrame); @@ -283,7 +283,7 @@ } - (void)windowDidMove:(NSNotification *)notification { - if ([[notification object] isEqual:[self window]]) { + if ([[notification object] isEqual:[self window]] && [self interactionMode] == SKPresentationMode && ([[notification object] styleMask] & NSWindowStyleMaskTitled) == 0) { if ([[self window] styleMask] == NSWindowStyleMaskBorderless) { NSScreen *screen = [[self window] screen]; NSRect screenFrame = [screen frame]; @@ -292,7 +292,7 @@ [pdfView layoutDocumentView]; [pdfView setNeedsDisplay:YES]; } - } else if ([self interactionMode] == SKPresentationMode && sideWindow) { + } else if (sideWindow) { NSRect screenFrame = [[[self window] screen] frame]; NSRect frame = [sideWindow frame]; frame.origin.x = NSMinX(screenFrame); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-23 16:32:58
|
Revision: 15532 http://sourceforge.net/p/skim-app/code/15532 Author: hofman Date: 2025-06-23 16:32:56 +0000 (Mon, 23 Jun 2025) Log Message: ----------- combine conditions Modified Paths: -------------- trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-23 16:21:27 UTC (rev 15531) +++ trunk/SKMainWindowController_UI.m 2025-06-23 16:32:56 UTC (rev 15532) @@ -283,16 +283,16 @@ } - (void)windowDidMove:(NSNotification *)notification { - if ([[notification object] isEqual:[self window]] && [[self window] styleMask] == NSWindowStyleMaskBorderless) { - NSScreen *screen = [[self window] screen]; - NSRect screenFrame = [screen frame]; - if (NSEqualRects(screenFrame, [[self window] frame]) == NO) { - [[self window] setFrame:screenFrame display:NO]; - [pdfView layoutDocumentView]; - [pdfView setNeedsDisplay:YES]; - } - } else if ([[notification object] isEqual:[self window]] && [self interactionMode] == SKPresentationMode) { - if (sideWindow) { + if ([[notification object] isEqual:[self window]]) { + if ([[self window] styleMask] == NSWindowStyleMaskBorderless) { + NSScreen *screen = [[self window] screen]; + NSRect screenFrame = [screen frame]; + if (NSEqualRects(screenFrame, [[self window] frame]) == NO) { + [[self window] setFrame:screenFrame display:NO]; + [pdfView layoutDocumentView]; + [pdfView setNeedsDisplay:YES]; + } + } else if ([self interactionMode] == SKPresentationMode && sideWindow) { NSRect screenFrame = [[[self window] screen] frame]; NSRect frame = [sideWindow frame]; frame.origin.x = NSMinX(screenFrame); @@ -303,7 +303,7 @@ } - (void)windowDidChangeBackingProperties:(NSNotification *)notification { - if (0 != ([[notification object] styleMask] & NSWindowStyleMaskTitled)) { + if ([[notification object] isEqual:[self window]] && 0 != ([[notification object] styleMask] & NSWindowStyleMaskTitled)) { CGFloat oldScale = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue]; if (fabs(oldScale - [[self window] backingScaleFactor]) > 0.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-23 16:21:30
|
Revision: 15531 http://sourceforge.net/p/skim-app/code/15531 Author: hofman Date: 2025-06-23 16:21:27 +0000 (Mon, 23 Jun 2025) Log Message: ----------- forwward windowWillClose from window controller to document Modified Paths: -------------- trunk/SKMainDocument.m trunk/SKMainWindowController_UI.m Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-06-23 16:04:00 UTC (rev 15530) +++ trunk/SKMainDocument.m 2025-06-23 16:21:27 UTC (rev 15531) @@ -151,8 +151,6 @@ - (void)tryToUnlockDocument:(PDFDocument *)document; -- (void)handleWindowWillCloseNotification:(NSNotification *)notification; - @end #pragma mark - @@ -210,6 +208,7 @@ tmpData = nil; } +// this is called by the window controller even though we are not te owner - (void)windowControllerDidLoadNib:(NSWindowController *)aController{ [self setDataFromTmpData]; @@ -216,9 +215,6 @@ fileUpdateChecker = [[SKFileUpdateChecker alloc] initForDocument:self]; // the file update checker starts disabled, setting enabled will start checking if it should [fileUpdateChecker setEnabled:YES]; - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleWindowWillCloseNotification:) - name:NSWindowWillCloseNotification object:[[self mainWindowController] window]]; } - (void)showWindows{ @@ -1438,14 +1434,14 @@ #pragma mark Notification handlers -- (void)handleWindowWillCloseNotification:(NSNotification *)notification { - NSWindow *window = [notification object]; - // ignore when we're switching fullscreen/main windows - if ([window isEqual:[[window windowController] window]]) { - [fileUpdateChecker terminate]; - fileUpdateChecker = nil; - [synchronizer terminate]; - } +// this is forwarded by the window controller +- (void)windowWillClose:(NSNotification *)notification { + [self saveRecentDocumentInfo]; + + [fileUpdateChecker terminate]; + fileUpdateChecker = nil; + + [synchronizer terminate]; } #pragma mark Pdfsync support Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-23 16:04:00 UTC (rev 15530) +++ trunk/SKMainWindowController_UI.m 2025-06-23 16:21:27 UTC (rev 15531) @@ -257,7 +257,7 @@ - (void)windowWillClose:(NSNotification *)notification { if ([[notification object] isEqual:[self window]]) { - [[self document] saveRecentDocumentInfo]; + [(id)[self document] windowWillClose:notification]; if ([[pdfView document] isFinding]) [[pdfView document] cancelFindString]; if ((mwcFlags.isEditingTable || [pdfView isEditing]) && [self commitEditing] == NO) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-23 16:04:02
|
Revision: 15530 http://sourceforge.net/p/skim-app/code/15530 Author: hofman Date: 2025-06-23 16:04:00 +0000 (Mon, 23 Jun 2025) Log Message: ----------- Insert Scripts menu and tweak main menu items in applicationWillFinishLaunching Modified Paths: -------------- trunk/SKApplicationController.m Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2025-06-23 15:51:41 UTC (rev 15529) +++ trunk/SKApplicationController.m 2025-06-23 16:04:00 UTC (rev 15530) @@ -154,17 +154,6 @@ [[NSUserDefaultsController sharedUserDefaultsController] setInitialValues:[initialValuesDict dictionaryWithValuesForKeys:resettableUserDefaultsKeys]]; } -- (void)awakeFromNib { - NSMenu *menu = [[[NSApp mainMenu] itemAtIndex:VIEW_MENU_INDEX] submenu]; - for (NSMenuItem *menuItem in [menu itemArray]) { - if ([menuItem action] == @selector(changeLeftSidePaneState:) || [menuItem action] == @selector(changeRightSidePaneState:) || [menuItem action] == @selector(changeFindPaneState:)) - [menuItem setIndentationLevel:1]; - } - - // this creates the script menu if needed - (void)[NSApp scriptMenu]; -} - - (void)registerCurrentDocuments:(id)timerOrNotification { [[NSUserDefaults standardUserDefaults] setObject:[[NSApp orderedDocuments] valueForKey:CURRENTDOCUMENTSETUP_KEY] forKey:SKLastOpenFileNamesKey]; BOOL forced = timerOrNotification == nil; @@ -203,6 +192,15 @@ [PDFPage setUsesSequentialPageNumbering:[[NSUserDefaults standardUserDefaults] boolForKey:SKSequentialPageNumberingKey]]; [sud addObserver:self forKeyPath:SKSequentialPageNumberingKey options:0 context:&SKApplicationControllerDefaultsObservationContext]; + NSMenu *menu = [[[NSApp mainMenu] itemAtIndex:VIEW_MENU_INDEX] submenu]; + for (NSMenuItem *menuItem in [menu itemArray]) { + if ([menuItem action] == @selector(changeLeftSidePaneState:) || [menuItem action] == @selector(changeRightSidePaneState:) || [menuItem action] == @selector(changeFindPaneState:)) + [menuItem setIndentationLevel:1]; + } + + // this creates the script menu if needed + (void)[NSApp scriptMenu]; + if ([sud integerForKey:SKReopenLastOpenFilesKey] == SKReopenAlways || [sud boolForKey:SKIsRelaunchKey]) { // just remove this in case opening the last open files crashes the app after a relaunch if ([sud objectForKey:SKIsRelaunchKey]) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-23 15:51:44
|
Revision: 15529 http://sourceforge.net/p/skim-app/code/15529 Author: hofman Date: 2025-06-23 15:51:41 +0000 (Mon, 23 Jun 2025) Log Message: ----------- pretend to add resent document when we don't want any (more) recent documents, so the document does not keep trying Modified Paths: -------------- trunk/SKBookmarkController.m Modified: trunk/SKBookmarkController.m =================================================================== --- trunk/SKBookmarkController.m 2025-06-23 15:25:56 UTC (rev 15528) +++ trunk/SKBookmarkController.m 2025-06-23 15:51:41 UTC (rev 15529) @@ -250,7 +250,10 @@ } - (BOOL)addRecentDocumentForURL:(NSURL *)fileURL pageIndex:(NSUInteger)pageIndex snapshots:(NSArray *)snapshots { - if (maxRecentDocumentsCount > 0 && fileURL && appIsTerminating == NO) { + if (maxRecentDocumentsCount > 0 && appIsTerminating == NO) + return YES; + + if (fileURL) { SKBookmark *info = [[SKBookmark alloc] initWithURL:fileURL pageIndex:pageIndex snapshots:snapshots label:nil]; if (info) { SKBookmark *oldInfo = [self recentDocumentAtURL:fileURL]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-23 15:25:59
|
Revision: 15528 http://sourceforge.net/p/skim-app/code/15528 Author: hofman Date: 2025-06-23 15:25:56 +0000 (Mon, 23 Jun 2025) Log Message: ----------- get recent document bookmark first Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-23 14:54:30 UTC (rev 15527) +++ trunk/SKMainWindowController.m 2025-06-23 15:25:56 UTC (rev 15528) @@ -468,19 +468,16 @@ [window zoom:self]; } + // Go to page? + SKDestination dest = [self destinationFromSetup:savedNormalSetup]; + BOOL rememberPage = dest.pageIndex == NSNotFound && [sud boolForKey:SKRememberLastPageViewedKey]; + BOOL rememberSnapshots = [sud boolForKey:SKRememberSnapshotsKey]; SKBookmark *recentDoc = nil; - BOOL lookedForRecentDoc = [doc fileURL] != nil; + if ((rememberPage || rememberSnapshots) && [doc fileURL]) + recentDoc = [[SKBookmarkController sharedBookmarkController] recentDocumentAtURL:[doc fileURL]]; - // Go to page? - SKDestination dest = [self destinationFromSetup:savedNormalSetup]; - if (dest.pageIndex == NSNotFound && [sud boolForKey:SKRememberLastPageViewedKey]) { - if (lookedForRecentDoc == NO) { - recentDoc = [[SKBookmarkController sharedBookmarkController] recentDocumentAtURL:[doc fileURL]]; - lookedForRecentDoc = YES; - } - if (recentDoc) - dest.pageIndex = [recentDoc pageIndex]; - } + if (rememberPage && recentDoc) + dest.pageIndex = [recentDoc pageIndex]; if (dest.pageIndex != NSNotFound && [[pdfView document] pageCount] > dest.pageIndex) { if ([[pdfView document] isLocked]) { [self setDestination:dest inSetup:savedNormalSetup]; @@ -507,14 +504,8 @@ // Open snapshots? NSArray *snapshotSetups = [savedNormalSetup objectForKey:SNAPSHOTS_KEY]; - if ([sud boolForKey:SKRememberSnapshotsKey]) { - if (lookedForRecentDoc == NO) { - recentDoc = [[SKBookmarkController sharedBookmarkController] recentDocumentAtURL:[doc fileURL]]; - lookedForRecentDoc = YES; - } - if (recentDoc) - snapshotSetups = mergedSnapshotSetups(snapshotSetups, [recentDoc snapshots]); - } + if (rememberSnapshots && recentDoc) + snapshotSetups = mergedSnapshotSetups(snapshotSetups, [recentDoc snapshots]); if ([snapshotSetups count]) { if ([[pdfView document] isLocked]) [savedNormalSetup setObject:snapshotSetups forKey:SNAPSHOTS_KEY]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-23 14:54:32
|
Revision: 15527 http://sourceforge.net/p/skim-app/code/15527 Author: hofman Date: 2025-06-23 14:54:30 +0000 (Mon, 23 Jun 2025) Log Message: ----------- get recent document bookmark only once Modified Paths: -------------- trunk/SKBookmarkController.h trunk/SKBookmarkController.m trunk/SKMainWindowController.m Modified: trunk/SKBookmarkController.h =================================================================== --- trunk/SKBookmarkController.h 2025-06-23 14:32:52 UTC (rev 15526) +++ trunk/SKBookmarkController.h 2025-06-23 14:54:30 UTC (rev 15527) @@ -95,8 +95,7 @@ - (void)replaceBookmarkAtIndex:(NSUInteger)anIndex ofBookmark:(SKBookmark *)parent withBookmark:(SKBookmark *)bookmark animate:(BOOL)animate; - (BOOL)addRecentDocumentForURL:(NSURL *)fileURL pageIndex:(NSUInteger)pageIndex snapshots:(nullable NSArray<NSDictionary<NSString *, id> *> *)snapshots; -- (NSUInteger)pageIndexForRecentDocumentAtURL:(NSURL *)fileURL; -- (NSArray<NSDictionary<NSString *, id> *> *)snapshotsForRecentDocumentAtURL:(NSURL *)fileURL; +- (nullable SKBookmark *)recentDocumentAtURL:(NSURL *)fileURL; - (BOOL)isBookmarkExpanded:(SKBookmark *)bookmark; - (void)setExpanded:(BOOL)flag forBookmark:(SKBookmark *)bookmark; Modified: trunk/SKBookmarkController.m =================================================================== --- trunk/SKBookmarkController.m 2025-06-23 14:32:52 UTC (rev 15526) +++ trunk/SKBookmarkController.m 2025-06-23 14:54:30 UTC (rev 15527) @@ -270,15 +270,6 @@ return NO; } -- (NSUInteger)pageIndexForRecentDocumentAtURL:(NSURL *)fileURL { - SKBookmark *info = fileURL ? [self recentDocumentAtURL:fileURL] : nil; - return info ? [info pageIndex] : NSNotFound; -} - -- (NSArray *)snapshotsForRecentDocumentAtURL:(NSURL *)fileURL { - return fileURL ? [[self recentDocumentAtURL:fileURL] snapshots] : nil; -} - #pragma mark Bookmarks support - (SKBookmark *)bookmarkForURL:(NSURL *)bookmarkURL { Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-23 14:32:52 UTC (rev 15526) +++ trunk/SKMainWindowController.m 2025-06-23 14:54:30 UTC (rev 15527) @@ -109,6 +109,7 @@ #import "SKNoteToolbarController.h" #import "SKPresentationNotesAuxiliary.h" #import "NSCharacterSet_SKExtensions.h" +#import "SKBookmark.h" #define MULTIPLICATION_SIGN_CHARACTER (unichar)0x00d7 @@ -467,10 +468,18 @@ [window zoom:self]; } + SKBookmark *recentDoc = nil; + BOOL lookedForRecentDoc = [doc fileURL] != nil; + // Go to page? SKDestination dest = [self destinationFromSetup:savedNormalSetup]; if (dest.pageIndex == NSNotFound && [sud boolForKey:SKRememberLastPageViewedKey]) { - dest.pageIndex = [[SKBookmarkController sharedBookmarkController] pageIndexForRecentDocumentAtURL:[doc fileURL]]; + if (lookedForRecentDoc == NO) { + recentDoc = [[SKBookmarkController sharedBookmarkController] recentDocumentAtURL:[doc fileURL]]; + lookedForRecentDoc = YES; + } + if (recentDoc) + dest.pageIndex = [recentDoc pageIndex]; } if (dest.pageIndex != NSNotFound && [[pdfView document] pageCount] > dest.pageIndex) { if ([[pdfView document] isLocked]) { @@ -498,8 +507,14 @@ // Open snapshots? NSArray *snapshotSetups = [savedNormalSetup objectForKey:SNAPSHOTS_KEY]; - if ([sud boolForKey:SKRememberSnapshotsKey]) - snapshotSetups = mergedSnapshotSetups(snapshotSetups, [[SKBookmarkController sharedBookmarkController] snapshotsForRecentDocumentAtURL:[doc fileURL]]); + if ([sud boolForKey:SKRememberSnapshotsKey]) { + if (lookedForRecentDoc == NO) { + recentDoc = [[SKBookmarkController sharedBookmarkController] recentDocumentAtURL:[doc fileURL]]; + lookedForRecentDoc = YES; + } + if (recentDoc) + snapshotSetups = mergedSnapshotSetups(snapshotSetups, [recentDoc snapshots]); + } if ([snapshotSetups count]) { if ([[pdfView document] isLocked]) [savedNormalSetup setObject:snapshotSetups forKey:SNAPSHOTS_KEY]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-23 14:32:54
|
Revision: 15526 http://sourceforge.net/p/skim-app/code/15526 Author: hofman Date: 2025-06-23 14:32:52 +0000 (Mon, 23 Jun 2025) Log Message: ----------- Ignore recent document registation after applicationWillTerminate is called, as it will be ignored anyway. This will be called from windowwWillClose notifications, which comes after this. Modified Paths: -------------- trunk/SKBookmarkController.h trunk/SKBookmarkController.m Modified: trunk/SKBookmarkController.h =================================================================== --- trunk/SKBookmarkController.h 2025-06-23 14:00:08 UTC (rev 15525) +++ trunk/SKBookmarkController.h 2025-06-23 14:32:52 UTC (rev 15526) @@ -62,6 +62,7 @@ NSDictionary<NSString *, NSToolbarItem *> *toolbarItems; NSArray<NSDictionary<NSString *, id> *> *bookmarksCache; BOOL needsBeginUpdates; + BOOL appIsTerminating; } @property (class, nonatomic, readonly) SKBookmarkController *sharedBookmarkController; Modified: trunk/SKBookmarkController.m =================================================================== --- trunk/SKBookmarkController.m 2025-06-23 14:00:08 UTC (rev 15525) +++ trunk/SKBookmarkController.m 2025-06-23 14:32:52 UTC (rev 15526) @@ -250,7 +250,7 @@ } - (BOOL)addRecentDocumentForURL:(NSURL *)fileURL pageIndex:(NSUInteger)pageIndex snapshots:(NSArray *)snapshots { - if (maxRecentDocumentsCount > 0 && fileURL) { + if (maxRecentDocumentsCount > 0 && fileURL && appIsTerminating == NO) { SKBookmark *info = [[SKBookmark alloc] initWithURL:fileURL pageIndex:pageIndex snapshots:snapshots label:nil]; if (info) { SKBookmark *oldInfo = [self recentDocumentAtURL:fileURL]; @@ -870,6 +870,7 @@ - (void)handleApplicationWillTerminateNotification:(NSNotification *)notification { [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(saveBookmarksData) object:nil]; [self saveBookmarksData]; + appIsTerminating = YES; } - (void)endEditing { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-23 14:00:11
|
Revision: 15525 http://sourceforge.net/p/skim-app/code/15525 Author: hofman Date: 2025-06-23 14:00:08 +0000 (Mon, 23 Jun 2025) Log Message: ----------- fix shortcuts for reading bar in help Modified Paths: -------------- trunk/Skim.help/Contents/Resources/en.lproj/skim.texi trunk/Skim.help/Contents/Resources/nl.lproj/skim.texi Modified: trunk/Skim.help/Contents/Resources/en.lproj/skim.texi =================================================================== --- trunk/Skim.help/Contents/Resources/en.lproj/skim.texi 2025-06-22 16:26:38 UTC (rev 15524) +++ trunk/Skim.help/Contents/Resources/en.lproj/skim.texi 2025-06-23 14:00:08 UTC (rev 15525) @@ -836,14 +836,14 @@ @item To show the reading bar, choose View > Show Reading Bar. @end itemize @itemize -@item To move the reading bar to the next (previous) line, hold down the Option key and press the Down Arrow (Up Arrow) key. +@item To move the reading bar to the next (previous) line, hold down the Command key and press the Down Arrow (Up Arrow) key. @end itemize @itemize -@item To move the reading bar to the next (previous) page, hold down the Option key and press the Right Arrow (Left Arrow) key. +@item To move the reading bar to the next (previous) page, hold down the Command key and press the Right Arrow (Left Arrow) key. @end itemize @endtask @itemize -@item To increase (decrease) the number of lines the reading bar spans, hold down the Option and Shift keys and press the Down Arrow (Up Arrow) key. +@item To increase (decrease) the number of lines the reading bar spans, hold down the Command and Shift keys and press the Down Arrow (Up Arrow) key. @end itemize @endtask Modified: trunk/Skim.help/Contents/Resources/nl.lproj/skim.texi =================================================================== --- trunk/Skim.help/Contents/Resources/nl.lproj/skim.texi 2025-06-22 16:26:38 UTC (rev 15524) +++ trunk/Skim.help/Contents/Resources/nl.lproj/skim.texi 2025-06-23 14:00:08 UTC (rev 15525) @@ -836,14 +836,14 @@ @item Om de leesbalk te tonen, kies Weergave > Toon Leesbalk. @end itemize @itemize -@item Om de leesbalk naar de volgende of vorige regel te verplaatsen, houd de Optie-toets ingedrukt en druk de Lijn-Omlaagtoets of Pijl-Omhoogtoets in. +@item Om de leesbalk naar de volgende of vorige regel te verplaatsen, houd de Apple-toets ingedrukt en druk de Lijn-Omlaagtoets of Pijl-Omhoogtoets in. @end itemize @itemize -@item Om de leesbalk naar de volgende of vorige pagina te verplaatsen, houd de Optie-toets ingedrukt en druk de Pijl-Rechtstoets of Pijl-Linkstoets in. +@item Om de leesbalk naar de volgende of vorige pagina te verplaatsen, houd de Apple-toets ingedrukt en druk de Pijl-Rechtstoets of Pijl-Linkstoets in. @end itemize @endtask @itemize -@item Om het aantal lijnen in de leesbalk te vergroten (verkleinen), houd de Optie en Shift toetsen ingedrukt en druk de Lijn-Omlaagtoets of Pijl-Omhoogtoets in. +@item Om het aantal lijnen in de leesbalk te vergroten (verkleinen), houd de Apple en Shift toetsen ingedrukt en druk de Lijn-Omlaagtoets of Pijl-Omhoogtoets in. @end itemize @endtask This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-22 16:26:40
|
Revision: 15524 http://sourceforge.net/p/skim-app/code/15524 Author: hofman Date: 2025-06-22 16:26:38 +0000 (Sun, 22 Jun 2025) Log Message: ----------- warn about large number of files to reopen from document controller Modified Paths: -------------- trunk/SKApplicationController.m trunk/SKDocumentController.m Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2025-06-22 15:40:15 UTC (rev 15523) +++ trunk/SKApplicationController.m 2025-06-22 16:26:38 UTC (rev 15524) @@ -185,19 +185,6 @@ didReopen = YES; SKBookmark *previousSession = [[SKBookmarkController sharedBookmarkController] previousSession]; - NSUInteger numberOfDocs = [[previousSession children] count]; - - if (numberOfDocs > REOPEN_WARNING_LIMIT) { - NSAlert *alert = [[NSAlert alloc] init]; - [alert setMessageText:[NSString stringWithFormat:NSLocalizedString(@"Are you sure you want to open %lu documents?", @"Message in alert dialog"), (unsigned long)numberOfDocs]]; - [alert setInformativeText:NSLocalizedString(@"Each document opens in a separate window.", @"Informative text in alert dialog")]; - [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Button title")]; - [alert addButtonWithTitle:NSLocalizedString(@"Open", @"Button title")]; - - if (NSAlertFirstButtonReturn == [alert runModal]) - previousSession = nil; - } - if (previousSession) [[NSDocumentController sharedDocumentController] openDocumentWithBookmark:previousSession completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error){ if (document == nil && error && [error isUserCancelledError] == NO) Modified: trunk/SKDocumentController.m =================================================================== --- trunk/SKDocumentController.m 2025-06-22 15:40:15 UTC (rev 15523) +++ trunk/SKDocumentController.m 2025-06-22 16:26:38 UTC (rev 15524) @@ -81,6 +81,7 @@ #define SKPasteboardTypePostScript @"com.adobe.encapsulated-postscript" #define WARNING_LIMIT 10 +#define SESSION_WARNING_LIMIT 50 @interface NSDocumentController (SKPrivateDeclaration) - (void)_setTabPlusButtonWasClicked:(BOOL)wasClicked; @@ -357,49 +358,53 @@ NSArray *children = [bookmark children]; NSInteger i = [children count]; - __block NSInteger countDown = i; - __block NSMutableArray *errors = nil; - __block NSMutableArray *windows = nil; - __block NSMutableArray *tabInfos = nil; - - windows = [[NSMutableArray alloc] init]; - while ([windows count] < (NSUInteger)i) - [windows addObject:[NSNull null]]; - - while (i-- > 0) { - SKBookmark *child = [children objectAtIndex:i]; + if ([self shouldOpenNumberOfDocuments:i warningLimit:SESSION_WARNING_LIMIT]) { + __block NSInteger countDown = i; + __block NSMutableArray *errors = nil; + __block NSMutableArray *windows = nil; + __block NSMutableArray *tabInfos = nil; - if (windows) { - NSString *tabs = [child tabs]; - if (tabs) { - if (tabInfos == nil) - tabInfos = [[NSMutableArray alloc] init]; - [tabInfos addObject:@[tabs, [NSNumber numberWithUnsignedInteger:i]]]; - } - } + windows = [[NSMutableArray alloc] init]; + while ([windows count] < (NSUInteger)i) + [windows addObject:[NSNull null]]; - [self openDocumentWithBookmark:child completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error){ - if (windows && [document mainWindow]) - [windows replaceObjectAtIndex:i withObject:[document mainWindow]]; - if (document == nil && error) { - if (errors == nil) - errors = [[NSMutableArray alloc] init]; - [errors addObject:error]; + while (i-- > 0) { + SKBookmark *child = [children objectAtIndex:i]; + + if (windows) { + NSString *tabs = [child tabs]; + if (tabs) { + if (tabInfos == nil) + tabInfos = [[NSMutableArray alloc] init]; + [tabInfos addObject:@[tabs, [NSNumber numberWithUnsignedInteger:i]]]; + } } - if (--countDown == 0) { - if (tabInfos && [windows count] > 1) - [NSWindow addTabs:tabInfos forWindows:windows]; - windows = nil; - tabInfos = nil; - if (completionHandler) { - if (errors) - completionHandler(nil, NO, [NSError combineErrors:errors maximum:WARNING_LIMIT]); - else - completionHandler(document, documentWasAlreadyOpen, error); + + [self openDocumentWithBookmark:child completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error){ + if (windows && [document mainWindow]) + [windows replaceObjectAtIndex:i withObject:[document mainWindow]]; + if (document == nil && error) { + if (errors == nil) + errors = [[NSMutableArray alloc] init]; + [errors addObject:error]; } - errors = nil; - } - }]; + if (--countDown == 0) { + if (tabInfos && [windows count] > 1) + [NSWindow addTabs:tabInfos forWindows:windows]; + windows = nil; + tabInfos = nil; + if (completionHandler) { + if (errors) + completionHandler(nil, NO, [NSError combineErrors:errors maximum:WARNING_LIMIT]); + else + completionHandler(document, documentWasAlreadyOpen, error); + } + errors = nil; + } + }]; + } + } else if (completionHandler) { + completionHandler(nil, NO, [NSError userCancelledErrorWithUnderlyingError:nil]); } } else if (type == SKBookmarkTypeFolder) { @@ -436,8 +441,8 @@ } } -- (BOOL)shouldOpenNumberOfDocuments:(NSUInteger)count { - if (count > WARNING_LIMIT) { +- (BOOL)shouldOpenNumberOfDocuments:(NSUInteger)count warningLimit:(NSUInteger)warningLimit { + if (count > warningLimit) { NSAlert *alert = [[NSAlert alloc] init]; [alert setMessageText:[NSString stringWithFormat:NSLocalizedString(@"Are you sure you want to open %lu documents?", @"Message in alert dialog"), (unsigned long)count]]; [alert setInformativeText:NSLocalizedString(@"Each document opens in a separate window.", @"Informative text in alert dialog")]; @@ -450,7 +455,7 @@ } - (void)openDocumentWithBookmarks:(NSArray *)bookmarks completionHandler:(void (^)(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error))completionHandler { - if ([self shouldOpenNumberOfDocuments:[bookmarks count]]) { + if ([self shouldOpenNumberOfDocuments:[bookmarks count] warningLimit:WARNING_LIMIT]) { // bookmarks should not be empty __block NSInteger i = [bookmarks count]; __block NSMutableArray *errors = nil; @@ -491,7 +496,7 @@ [urls addObject:url]; } - if ([self shouldOpenNumberOfDocuments:[urls count]] == NO) { + if ([self shouldOpenNumberOfDocuments:[urls count] warningLimit:WARNING_LIMIT] == NO) { urls = nil; if (outError) *outError = [NSError userCancelledErrorWithUnderlyingError:nil]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-22 15:40:17
|
Revision: 15523 http://sourceforge.net/p/skim-app/code/15523 Author: hofman Date: 2025-06-22 15:40:15 +0000 (Sun, 22 Jun 2025) Log Message: ----------- remove unused SKBlankAllScreensInFullScreen pref key Modified Paths: -------------- trunk/InitialUserDefaults.plist trunk/SKStringConstants.h trunk/SKStringConstants.m Modified: trunk/InitialUserDefaults.plist =================================================================== --- trunk/InitialUserDefaults.plist 2025-06-22 14:31:56 UTC (rev 15522) +++ trunk/InitialUserDefaults.plist 2025-06-22 15:40:15 UTC (rev 15523) @@ -188,8 +188,6 @@ <integer>0</integer> <key>SKSavePasswordOption</key> <integer>-1</integer> - <key>SKBlankAllScreensInFullScreen</key> - <false/> <key>SKAutoCropBoxMarginHeight</key> <real>10</real> <key>SKAutoCropBoxMarginWidth</key> @@ -326,7 +324,6 @@ <string>SKLastToolMode</string> <string>SKLastAnnotationMode</string> <string>SKLastSecondarySelectsText</string> - <string>SKBlankAllScreensInFullScreen</string> <string>SKReadMissingNotesFromSkimFileOption</string> <string>SKReadNonMissingNotesFromSkimFileOption</string> <string>SKEnableAppleRemote</string> Modified: trunk/SKStringConstants.h =================================================================== --- trunk/SKStringConstants.h 2025-06-22 14:31:56 UTC (rev 15522) +++ trunk/SKStringConstants.h 2025-06-22 15:40:15 UTC (rev 15523) @@ -115,7 +115,6 @@ extern NSString *SKReadMissingNotesFromSkimFileOptionKey; extern NSString *SKReadNonMissingNotesFromSkimFileOptionKey; extern NSString *SKSavePasswordOptionKey; -extern NSString *SKBlankAllScreensInFullScreenKey; extern NSString *SKPresentationNavigationOptionKey; extern NSString *SKAutoHidePresentationContentsKey; extern NSString *SKUseNormalLevelForPresentationKey; Modified: trunk/SKStringConstants.m =================================================================== --- trunk/SKStringConstants.m 2025-06-22 14:31:56 UTC (rev 15522) +++ trunk/SKStringConstants.m 2025-06-22 15:40:15 UTC (rev 15523) @@ -115,7 +115,6 @@ NSString *SKReadMissingNotesFromSkimFileOptionKey = @"SKReadMissingNotesFromSkimFileOption"; NSString *SKReadNonMissingNotesFromSkimFileOptionKey = @"SKReadNonMissingNotesFromSkimFileOption"; NSString *SKSavePasswordOptionKey = @"SKSavePasswordOption"; -NSString *SKBlankAllScreensInFullScreenKey = @"SKBlankAllScreensInFullScreen"; NSString *SKPresentationNavigationOptionKey = @"SKPresentationNavigationOption"; NSString *SKAutoHidePresentationContentsKey = @"SKAutoHidePresentationContents"; NSString *SKUseNormalLevelForPresentationKey = @"SKUseNormalLevelForPresentation"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-22 14:31:57
|
Revision: 15522 http://sourceforge.net/p/skim-app/code/15522 Author: hofman Date: 2025-06-22 14:31:56 +0000 (Sun, 22 Jun 2025) Log Message: ----------- Separate method to register for current document notifications and timer. Pass nil for app will terminate notification, as it will not be equal to the notification name. Delaye registration to allow for reopening files. Modified Paths: -------------- trunk/SKApplicationController.m Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2025-06-22 08:47:47 UTC (rev 15521) +++ trunk/SKApplicationController.m 2025-06-22 14:31:56 UTC (rev 15522) @@ -167,10 +167,20 @@ - (void)registerCurrentDocuments:(id)timerOrNotification { [[NSUserDefaults standardUserDefaults] setObject:[[NSApp orderedDocuments] valueForKey:CURRENTDOCUMENTSETUP_KEY] forKey:SKLastOpenFileNamesKey]; - BOOL forced = [timerOrNotification isEqual:SKApplicationStartsTerminatingNotification]; + BOOL forced = timerOrNotification == nil; [[[NSDocumentController sharedDocumentController] documents] makeObjectsPerformSelector:forced ? @selector(saveRecentDocumentInfo) : @selector(saveRecentDocumentInfoIfNeeded)]; } +- (void)registerForCurrentDocumentsNotifications { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self selector:@selector(registerCurrentDocuments:) + name:SKDocumentDidShowNotification object:nil]; + [nc addObserver:self selector:@selector(registerCurrentDocuments:) + name:SKDocumentControllerDidRemoveDocumentNotification object:nil]; + + currentDocumentsTimer = [NSTimer scheduledTimerWithTimeInterval:CURRENTDOCUMENTSETUP_INTERVAL target:self selector:@selector(registerCurrentDocuments:) userInfo:nil repeats:YES]; +} + - (void)reopenLastOpenFiles { didReopen = YES; @@ -231,14 +241,8 @@ [sud setObject:versionString forKey:SKLastVersionLaunchedKey]; } - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc addObserver:self selector:@selector(registerCurrentDocuments:) - name:SKDocumentDidShowNotification object:nil]; - [nc addObserver:self selector:@selector(registerCurrentDocuments:) - name:SKDocumentControllerDidRemoveDocumentNotification object:nil]; + [self performSelector:@selector(registerForCurrentDocumentsNotifications) withObject:nil afterDelay:1.0]; - currentDocumentsTimer = [NSTimer scheduledTimerWithTimeInterval:CURRENTDOCUMENTSETUP_INTERVAL target:self selector:@selector(registerCurrentDocuments:) userInfo:nil repeats:YES]; - // kHIDRemoteModeExclusiveAuto lets the HIDRemote handle activation when the app gets or loses focus if ([sud boolForKey:SKEnableAppleRemoteKey]) { [[HIDRemote sharedHIDRemote] startRemoteControl:kHIDRemoteModeExclusiveAuto]; @@ -315,19 +319,12 @@ NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc removeObserver:self name:SKDocumentDidShowNotification object:nil]; [nc removeObserver:self name:SKDocumentControllerDidRemoveDocumentNotification object:nil]; - [self registerCurrentDocuments:aNotification]; + [self registerCurrentDocuments: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]; - } + if (currentDocumentsTimer == nil) + [self registerForCurrentDocumentsNotifications]; } #pragma mark Updater This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-22 08:47:50
|
Revision: 15521 http://sourceforge.net/p/skim-app/code/15521 Author: hofman Date: 2025-06-22 08:47:47 +0000 (Sun, 22 Jun 2025) Log Message: ----------- register current documents after removing notifications Modified Paths: -------------- trunk/SKApplicationController.m Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2025-06-22 08:35:22 UTC (rev 15520) +++ trunk/SKApplicationController.m 2025-06-22 08:47:47 UTC (rev 15521) @@ -312,10 +312,10 @@ - (void)applicationStartsTerminating:(NSNotification *)aNotification { [currentDocumentsTimer invalidate]; currentDocumentsTimer = nil; - [self registerCurrentDocuments:aNotification]; NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc removeObserver:self name:SKDocumentDidShowNotification object:nil]; [nc removeObserver:self name:SKDocumentControllerDidRemoveDocumentNotification object:nil]; + [self registerCurrentDocuments:aNotification]; } - (void)applicationDocumentControllerCanceledTerminate:(NSApplication *)application { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-22 08:35:23
|
Revision: 15520 http://sourceforge.net/p/skim-app/code/15520 Author: hofman Date: 2025-06-22 08:35:22 +0000 (Sun, 22 Jun 2025) Log Message: ----------- use performSelectorOnce Modified Paths: -------------- trunk/SKBookmarkController.m Modified: trunk/SKBookmarkController.m =================================================================== --- trunk/SKBookmarkController.m 2025-06-21 21:26:42 UTC (rev 15519) +++ trunk/SKBookmarkController.m 2025-06-22 08:35:22 UTC (rev 15520) @@ -53,6 +53,7 @@ #import "NSError_SKExtensions.h" #import "SKDocumentController.h" #import "NSPasteboard_SKExtensions.h" +#import "NSObject_SKExtensions.h" #define SKPasteboardTypeBookmarkRow @"net.sourceforge.skim-app.pasteboard.bookmarkrow" @@ -260,8 +261,7 @@ while ([recentDocuments count] > maxCount) [recentDocuments removeLastObject]; - [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(saveBookmarksData) object:nil]; - [self performSelector:@selector(saveBookmarksData) withObject:nil afterDelay:SAVE_DELAY]; + [self performSelectorOnce:@selector(saveBookmarksData) afterDelay:SAVE_DELAY]; return YES; } @@ -859,8 +859,7 @@ break; } bookmarksCache = nil; - [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(saveBookmarksData) object:nil]; - [self performSelector:@selector(saveBookmarksData) withObject:nil afterDelay:SAVE_DELAY]; + [self performSelectorOnce:@selector(saveBookmarksData) afterDelay:SAVE_DELAY]; } else { [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-21 21:26:45
|
Revision: 15519 http://sourceforge.net/p/skim-app/code/15519 Author: hofman Date: 2025-06-21 21:26:42 +0000 (Sat, 21 Jun 2025) Log Message: ----------- uselocal variable Modified Paths: -------------- trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-21 21:22:55 UTC (rev 15518) +++ trunk/SKMainWindowController_UI.m 2025-06-21 21:26:42 UTC (rev 15519) @@ -2126,12 +2126,13 @@ [nc addObserver:self selector:@selector(handleNoteViewFrameDidChangeNotification:) name:NSViewFrameDidChangeNotification object:[rightSideController.noteOutlineView enclosingScrollView]]; // UndoManager + NSUndoManager *undoManager = [[self document] undoManager]; [nc addObserver:self selector:@selector(observeUndoManagerCheckpoint:) - name:NSUndoManagerCheckpointNotification object:[[self document] undoManager]]; + name:NSUndoManagerCheckpointNotification object:undoManager]; [nc addObserver:self selector:@selector(handleOpenOrCloseUndoGroupNotification:) - name:NSUndoManagerDidOpenUndoGroupNotification object:[[self document] undoManager]]; + name:NSUndoManagerDidOpenUndoGroupNotification object:undoManager]; [nc addObserver:self selector:@selector(handleOpenOrCloseUndoGroupNotification:) - name:NSUndoManagerDidCloseUndoGroupNotification object:[[self document] undoManager]]; + name:NSUndoManagerDidCloseUndoGroupNotification object:undoManager]; // SKDocumentController [nc addObserver:self selector:@selector(handleWillRemoveDocumentNotification:) name:SKDocumentControllerWillRemoveDocumentNotification object:nil]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-21 21:22:56
|
Revision: 15518 http://sourceforge.net/p/skim-app/code/15518 Author: hofman Date: 2025-06-21 21:22:55 +0000 (Sat, 21 Jun 2025) Log Message: ----------- don't change window level of presentation window when the app becomes or resigns active, it will happen when the window becomes or resigns main Modified Paths: -------------- trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-21 21:17:24 UTC (rev 15517) +++ trunk/SKMainWindowController_UI.m 2025-06-21 21:22:55 UTC (rev 15518) @@ -2035,18 +2035,6 @@ [self exitPresentation]; } -- (void)handleApplicationDidResignActiveNotification:(NSNotification *)notification { - if ([self interactionMode] == SKPresentationMode && [[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO) { - [[self window] setLevel:NSNormalWindowLevel]; - } -} - -- (void)handleApplicationWillBecomeActiveNotification:(NSNotification *)notification { - if ([self interactionMode] == SKPresentationMode && [[NSUserDefaults standardUserDefaults] boolForKey:SKUseNormalLevelForPresentationKey] == NO) { - [[self window] setLevel:NSPopUpMenuWindowLevel]; - } -} - - (void)setHasOutline:(BOOL)hasOutline forAnnotation:(PDFAnnotation *)annotation { SKNoteOutlineView *ov = rightSideController.noteOutlineView; NSInteger row = [ov rowForItem:annotation]; @@ -2119,12 +2107,8 @@ - (void)registerForNotifications { NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; // Application - [nc addObserver:self selector:@selector(handleApplicationStartsTerminatingNotification:) + [nc addObserver:self selector:@selector(handleApplicationStartsTerminatingNotification:) name:SKApplicationStartsTerminatingNotification object:NSApp]; - [nc addObserver:self selector:@selector(handleApplicationDidResignActiveNotification:) - name:NSApplicationDidResignActiveNotification object:NSApp]; - [nc addObserver:self selector:@selector(handleApplicationWillBecomeActiveNotification:) - name:NSApplicationWillBecomeActiveNotification object:NSApp]; // PDFView [nc addObserver:self selector:@selector(handlePageChangedNotification:) name:PDFViewPageChangedNotification object:pdfView]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-06-21 21:17:26
|
Revision: 15517 http://sourceforge.net/p/skim-app/code/15517 Author: hofman Date: 2025-06-21 21:17:24 +0000 (Sat, 21 Jun 2025) Log Message: ----------- rename notification handler Modified Paths: -------------- trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-06-21 16:42:26 UTC (rev 15516) +++ trunk/SKMainWindowController_UI.m 2025-06-21 21:17:24 UTC (rev 15517) @@ -2030,7 +2030,7 @@ [self updateRightStatus]; } -- (void)handleApplicationWillTerminateNotification:(NSNotification *)notification { +- (void)handleApplicationStartsTerminatingNotification:(NSNotification *)notification { if ([self interactionMode] == SKPresentationMode) [self exitPresentation]; } @@ -2119,7 +2119,7 @@ - (void)registerForNotifications { NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; // Application - [nc addObserver:self selector:@selector(handleApplicationWillTerminateNotification:) + [nc addObserver:self selector:@selector(handleApplicationStartsTerminatingNotification:) name:SKApplicationStartsTerminatingNotification object:NSApp]; [nc addObserver:self selector:@selector(handleApplicationDidResignActiveNotification:) name:NSApplicationDidResignActiveNotification object:NSApp]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |