Revision: 28453
          http://sourceforge.net/p/bibdesk/svn/28453
Author:   hofman
Date:     2023-11-19 15:00:52 +0000 (Sun, 19 Nov 2023)
Log Message:
-----------
Drop legacy encoded properties for BibItem. Ignore sharing protocol version, 
very little chance it would be relevant, and it would drop support where it 
does not matter.

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

Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m     2023-11-19 14:56:55 UTC (rev 28452)
+++ trunk/bibdesk/BibItem.m     2023-11-19 15:00:52 UTC (rev 28453)
@@ -358,18 +358,6 @@
     return theCopy;
 }
 
-// Legacy: we need to encode deprecated NSCalendarDate objects, because we 
might be sharing with someone who uses an older version of BibDesk
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-static inline NSCalendarDate *ensureCalendarDate(NSDate *date) {
-    if (date == nil || [date isKindOfClass:[NSCalendarDate class]])
-        return (NSCalendarDate *)date;
-    else
-        return [[[NSCalendarDate alloc] initWithTimeInterval:0.0 
sinceDate:date] autorelease];
-}
-#pragma clang diagnostic pop
-
 - (id)initWithCoder:(NSCoder *)coder{
     if([coder allowsKeyedCoding]){
         if(self = [super init]){
@@ -406,8 +394,6 @@
        return self;
 }
 
-// If we ever want to drop legacy, i.e. no fileType and no NSCalendarDate, we 
must increase [BDSKSharingClientServer supportedProtocolVersion] and 
[BDSKSharingDOServer requiredProtocolVersion]
-
 - (void)encodeWithCoder:(NSCoder *)coder{
     if([coder allowsKeyedCoding]){
         [coder encodeObject:citeKey forKey:@"citeKey"];
@@ -414,12 +400,6 @@
         [coder encodeObject:pubType forKey:@"pubType"];
         [coder encodeObject:pubFields forKey:@"pubFields"];
         [coder encodeObject:files forKey:@"files"];
-        // Legacy, these are necessary for sharing with older versions of 
BibDesk
-        [coder encodeObject:BDSKBibtexString forKey:@"fileType"];
-        [coder encodeObject:ensureCalendarDate([self dateInheriting:NO]) 
forKey:@"pubDate"];
-        [coder encodeObject:ensureCalendarDate(dateAdded) forKey:@"dateAdded"];
-        [coder encodeObject:ensureCalendarDate(dateModified) 
forKey:@"dateModified"];
-        [coder encodeBool:hasBeenEdited forKey:@"hasBeenEdited"];
     } else {
         [coder encodeDataObject:[NSKeyedArchiver 
archivedDataWithRootObject:self]];
     }        

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

Reply via email to