Revision: 27565
http://sourceforge.net/p/bibdesk/svn/27565
Author: hofman
Date: 2022-06-06 09:26:17 +0000 (Mon, 06 Jun 2022)
Log Message:
-----------
make noteFilesChanged a private method
Modified Paths:
--------------
trunk/bibdesk/BibItem.h
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibItem.h
===================================================================
--- trunk/bibdesk/BibItem.h 2022-06-06 09:21:02 UTC (rev 27564)
+++ trunk/bibdesk/BibItem.h 2022-06-06 09:26:17 UTC (rev 27565)
@@ -133,8 +133,6 @@
- (BOOL)addFileForURL:(NSURL *)aURL autoFile:(BOOL)shouldAutoFile
runScriptHook:(BOOL)runScriptHook;
-- (void)noteFilesChanged:(BOOL)isFile;
-
- (void)addURLString:(NSString *)urlString;
- (BOOL)migrateFilesWithRemoveOptions:(BDSKRemoveFieldsOption)removeMask
numberOfAddedFiles:(NSInteger *)numberOfAddedFiles
numberOfRemovedFields:(NSInteger *)numberOfRemovedFields error:(NSError
**)outError;
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2022-06-06 09:21:02 UTC (rev 27564)
+++ trunk/bibdesk/BibItem.m 2022-06-06 09:26:17 UTC (rev 27565)
@@ -112,6 +112,8 @@
// updates derived info from the dictionary
- (void)updateMetadataForKey:(NSString *)key;
+- (void)noteFilesChanged:(BOOL)isFile;
+
- (void)createFilesArray;
- (BDSKItemDownload *)downloadForLinkedFile:(BDSKLinkedFile *)linkedFile;
@@ -2816,25 +2818,6 @@
[self setField:BDSKUrlString toValue:urlString];
}
-- (void)noteFilesChanged:(BOOL)isFile {
- // no need to further call updateMetadataForKey:
- hasBeenEdited = YES;
- spotlightMetadataChanged = YES;
- // make sure the UI is notified that the linked file has changed, as this
is often called after setField:toValue:
- if ([self owner]) {
- NSDictionary *notifInfo = [NSDictionary
dictionaryWithObjectsAndKeys:isFile ? BDSKLocalFileString :
BDSKRemoteURLString, BDSKBibItemKeyKey, nil];
- [[NSNotificationCenter defaultCenter]
postNotificationName:BDSKBibItemChangedNotification
- object:self
- userInfo:notifInfo];
- if (isFile && [[self owner] isDocument]) {
- notifInfo = [NSDictionary dictionaryWithObjectsAndKeys:[NSArray
arrayWithObject:self], BDSKDocumentPublicationsKey, nil];
- [[NSNotificationCenter defaultCenter]
postNotificationName:BDSKFileSearchIndexInfoChangedNotification
- object:owner
-
userInfo:notifInfo];
- }
- }
-}
-
- (NSURL *)URLForField:(NSString *)field{
return ([field isLocalFileField] ? [self localFileURLForField:field] :
[self remoteURLForField:field]);
}
@@ -4115,6 +4098,25 @@
}
}
+- (void)noteFilesChanged:(BOOL)isFile {
+ // no need to further call updateMetadataForKey:
+ hasBeenEdited = YES;
+ spotlightMetadataChanged = YES;
+ // make sure the UI is notified that the linked file has changed, as this
is often called after setField:toValue:
+ if ([self owner]) {
+ NSDictionary *notifInfo = [NSDictionary
dictionaryWithObjectsAndKeys:isFile ? BDSKLocalFileString :
BDSKRemoteURLString, BDSKBibItemKeyKey, nil];
+ [[NSNotificationCenter defaultCenter]
postNotificationName:BDSKBibItemChangedNotification
+ object:self
+ userInfo:notifInfo];
+ if (isFile && [[self owner] isDocument]) {
+ notifInfo = [NSDictionary dictionaryWithObjectsAndKeys:[NSArray
arrayWithObject:self], BDSKDocumentPublicationsKey, nil];
+ [[NSNotificationCenter defaultCenter]
postNotificationName:BDSKFileSearchIndexInfoChangedNotification
+ object:owner
+
userInfo:notifInfo];
+ }
+ }
+}
+
- (void)createFilesArray
{
NSUInteger i = 1;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit