Revision: 29001
http://sourceforge.net/p/bibdesk/svn/29001
Author: hofman
Date: 2025-02-11 10:32:36 +0000 (Tue, 11 Feb 2025)
Log Message:
-----------
Set passed in title in pub item from url when not already set
Modified Paths:
--------------
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2025-02-07 17:14:53 UTC (rev 29000)
+++ trunk/bibdesk/BibItem.m 2025-02-11 10:32:36 UTC (rev 29001)
@@ -3997,11 +3997,13 @@
[item setField:BDSKLocalUrlString toURLValue:aURL
basePath:[anOwner basePath]];
else
[item addFileForURL:aURL autoFile:NO runScriptHook:NO];
+ if (aTitle && [NSString isEmptyString:[item
valueOfField:BDSKTitleString]])
+ [item setField:BDSKTitleString toValue:aTitle];
}
// by default create a webpage item
if (item == nil) {
- NSMutableDictionary *pubFields = [NSMutableDictionary
dictionaryWithObjectsAndKeys:[[NSDate date] dateDescription], @"Lastchecked",
aTitle, BDSKTitleString, [aURL absoluteString], BDSKUrlString, nil];
+ NSMutableDictionary *pubFields = [NSMutableDictionary
dictionaryWithObjectsAndKeys:[[NSDate date] dateDescription], @"Lastchecked",
[aURL absoluteString], BDSKUrlString, aTitle, BDSKTitleString, nil];
NSArray *files = nil;
if ([[NSUserDefaults standardUserDefaults]
boolForKey:BDSKUseLocalUrlAndUrlKey] == NO)
files = @[[BDSKLinkedFile linkedFileWithURL:aURL delegate:nil]];
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