Revision: 15161
http://sourceforge.net/p/skim-app/code/15161
Author: hofman
Date: 2025-05-06 21:15:35 +0000 (Tue, 06 May 2025)
Log Message:
-----------
make sure we don't reopen last open files twice
Modified Paths:
--------------
trunk/SKApplicationController.h
trunk/SKApplicationController.m
Modified: trunk/SKApplicationController.h
===================================================================
--- trunk/SKApplicationController.h 2025-05-06 16:51:29 UTC (rev 15160)
+++ trunk/SKApplicationController.h 2025-05-06 21:15:35 UTC (rev 15161)
@@ -50,6 +50,7 @@
NSMenu *noteColumnsMenu;
NSMenu *noteTypeMenu;
NSTimer *currentDocumentsTimer;
+ BOOL didReopen;
BOOL remoteScrolling;
id activity;
SKPreferenceController *preferenceController;
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2025-05-06 16:51:29 UTC (rev 15160)
+++ trunk/SKApplicationController.m 2025-05-06 21:15:35 UTC (rev 15161)
@@ -166,6 +166,8 @@
}
- (void)reopenLastOpenFiles {
+ didReopen = YES;
+
SKBookmark *previousSession = [[SKBookmarkController
sharedBookmarkController] previousSession];
NSUInteger numberOfDocs = [[previousSession children] count];
@@ -211,7 +213,7 @@
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification{
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
- if ([sud integerForKey:SKReopenLastOpenFilesKey] == 1 && [[[aNotification
userInfo] objectForKey:NSApplicationLaunchIsDefaultLaunchKey] boolValue])
+ if (didReopen == NO && [sud integerForKey:SKReopenLastOpenFilesKey] == 1
&& [[[aNotification userInfo]
objectForKey:NSApplicationLaunchIsDefaultLaunchKey] boolValue])
[self reopenLastOpenFiles];
[NSApp setServicesProvider:[NSDocumentController
sharedDocumentController]];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit