Revision: 17986
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=17986&view=rev
Author:   hofman
Date:     2011-06-29 11:47:19 +0000 (Wed, 29 Jun 2011)

Log Message:
-----------
create new pub with URL in one go

Modified Paths:
--------------
    trunk/bibdesk/BibDocument.m

Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2011-06-29 11:11:13 UTC (rev 17985)
+++ trunk/bibdesk/BibDocument.m 2011-06-29 11:47:19 UTC (rev 17986)
@@ -2385,14 +2385,10 @@
 }
 
 - (NSArray *)publicationsForURL:(NSURL *)aURL title:(NSString *)aTitle {
-    NSArray *pubs = nil;
-    BibItem *newBI = [[BibItem alloc] init];
-    [newBI addFileForURL:aURL autoFile:NO runScriptHook:YES];
-    [newBI setPubType:@"webpage"];
-    [newBI setField:@"Lastchecked" toValue:[[NSDate date] dateDescription]];
-    if (aTitle)
-        [newBI setField:BDSKTitleString toValue:aTitle];
-    pubs = [NSArray arrayWithObject:newBI];
+    NSDictionary *pubFields = [NSDictionary 
dictionaryWithObjectsAndKeys:[[NSDate date] dateDescription], @"Lastchecked", 
aTitle, BDSKTitleString, nil];
+    NSArray *files = [NSArray arrayWithObjects:[BDSKLinkedFile 
linkedFileWithURL:aURL delegate:nil], nil];
+    BibItem *newBI = [[BibItem alloc] initWithType:@"webpage" citeKey:nil 
pubFields:pubFields files:files isNew:YES];
+    NSArray *pubs = [NSArray arrayWithObject:newBI];
     [newBI release];
     
        return pubs;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to