Revision: 27556
http://sourceforge.net/p/bibdesk/svn/27556
Author: hofman
Date: 2022-06-04 21:37:46 +0000 (Sat, 04 Jun 2022)
Log Message:
-----------
set date added after initializng. rename method.
Modified Paths:
--------------
trunk/bibdesk/BibDocument.m
trunk/bibdesk/BibItem.h
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2022-06-04 18:33:11 UTC (rev 27555)
+++ trunk/bibdesk/BibDocument.m 2022-06-04 21:37:46 UTC (rev 27556)
@@ -1975,7 +1975,7 @@
NSDate *importDate = [NSDate date];
NSString *importDateDescription = [importDate standardDescription];
for (BibItem *pub in publications)
- [pub markImportedWithDate:importDate
description:importDateDescription];
+ [pub markNeWithDate:importDate description:importDateDescription];
[[self undoManager] removeAllActions];
// mark as dirty, since we've changed the content
[self updateChangeCount:NSChangeDone];
@@ -2184,7 +2184,7 @@
NSDate *importDate = [NSDate date];
NSString *importDateDescription = [importDate standardDescription];
for (pub in newPubs)
- [pub markImportedWithDate:importDate
description:importDateDescription];
+ [pub markNeWithDate:importDate description:importDateDescription];
if ((options & BDSKImportSelectLibrary))
[self selectLibraryGroup:nil];
Modified: trunk/bibdesk/BibItem.h
===================================================================
--- trunk/bibdesk/BibItem.h 2022-06-04 18:33:11 UTC (rev 27555)
+++ trunk/bibdesk/BibItem.h 2022-06-04 21:37:46 UTC (rev 27556)
@@ -437,7 +437,7 @@
@property (nonatomic, readonly) NSDate *dateAdded;
@property (nonatomic, readonly) NSDate *dateModified;
-- (void)markImportedWithDate:(NSDate *)date description:(NSString
*)dateDescription;
+- (void)markNeWithDate:(NSDate *)date description:(NSString *)dateDescription;
/*!
@method setPubType:withModDate:
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2022-06-04 18:33:11 UTC (rev 27555)
+++ trunk/bibdesk/BibItem.m 2022-06-04 21:37:46 UTC (rev 27556)
@@ -272,10 +272,6 @@
pubFields = [[NSMutableDictionary alloc]
initWithDictionary:fieldsDict];
files = [[NSMutableArray alloc] initWithArray:filesArray];
[files setValue:self forKey:@"delegate"];
- if (isNew){
- NSDate *date = [NSDate date];
- [self markImportedWithDate:date description:[date
standardDescription]];
- }
people = nil;
@@ -292,6 +288,11 @@
dateAdded = nil;
dateModified = nil;
+ if (isNew){
+ NSDate *date = [NSDate date];
+ [self markNeWithDate:date description:[date standardDescription]];
+ }
+
filesToBeFiled = nil;
localUrlNeedsToBeFiled = NO;
@@ -572,7 +573,7 @@
return YES;
}
-- (void)markImportedWithDate:(NSDate *)date description:(NSString
*)dateDescription {
+- (void)markNeWithDate:(NSDate *)date description:(NSString *)dateDescription {
[pubFields setObject:dateDescription forKey:BDSKDateAddedString];
[pubFields setObject:dateDescription forKey:BDSKDateModifiedString];
[self setDateAdded:date];
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