Revision: 14670
http://sourceforge.net/p/skim-app/code/14670
Author: hofman
Date: 2024-11-11 14:58:05 +0000 (Mon, 11 Nov 2024)
Log Message:
-----------
make sure recent document info is saved for notes document when opening and
changing file URL
Modified Paths:
--------------
trunk/SKNotesDocument.h
trunk/SKNotesDocument.m
Modified: trunk/SKNotesDocument.h
===================================================================
--- trunk/SKNotesDocument.h 2024-11-11 10:09:47 UTC (rev 14669)
+++ trunk/SKNotesDocument.h 2024-11-11 14:58:05 UTC (rev 14670)
@@ -64,6 +64,7 @@
unsigned int caseInsensitiveSearch:1;
unsigned int autoResizeRows:1;
unsigned int settingUpWindow:1;
+ unsigned int recentInfoNeedsUpdate:1;
} ndFlags;
}
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2024-11-11 10:09:47 UTC (rev 14669)
+++ trunk/SKNotesDocument.m 2024-11-11 14:58:05 UTC (rev 14670)
@@ -190,6 +190,8 @@
[menu addItem:[NSMenuItem separatorItem]];
[[menu addItemWithTitle:NSLocalizedString(@"Note Type", @"Menu item
title") action:NULL keyEquivalent:@""] setSubmenu:[noteTypeSheetController
noteTypeMenu]];
+ ndFlags.recentInfoNeedsUpdate = YES;
+
ndFlags.settingUpWindow = NO;
}
@@ -426,10 +428,15 @@
}
}
+- (void)saveRecentDocumentInfo:(BOOL)forced {
+ [super saveRecentDocumentInfo:forced || ndFlags.recentInfoNeedsUpdate];
+}
+
- (void)setFileURL:(NSURL *)absoluteURL {
if (absoluteURL)
[self setSourceFileURL:nil];
[super setFileURL:absoluteURL];
+ ndFlags.recentInfoNeedsUpdate = YES;
[[NSNotificationCenter defaultCenter]
postNotificationName:SKDocumentFileURLDidChangeNotification object:self];
}
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