Revision: 29896
          http://sourceforge.net/p/bibdesk/svn/29896
Author:   hofman
Date:     2025-11-29 17:22:24 +0000 (Sat, 29 Nov 2025)
Log Message:
-----------
use short date description for default smart group names

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

Modified: trunk/bibdesk/BDSKCondition.m
===================================================================
--- trunk/bibdesk/BDSKCondition.m       2025-11-29 17:09:48 UTC (rev 29895)
+++ trunk/bibdesk/BDSKCondition.m       2025-11-29 17:22:24 UTC (rev 29896)
@@ -605,11 +605,21 @@
 }
 
 - (NSString *)defaultName {
-    if (([self isDateCondition] && [self dateComparison] < BDSKDate) ||
-        ([self isAttachmentCondition] && [self attachmentComparison] < 
BDSKAttachmentContain))
-        return [self key];
-    else
-        return [self value];
+    if ([self isDateCondition]) {
+        if ([self dateComparison] < BDSKDate || [self dateComparison] == 
BDSKThisSession)
+            return [self key];
+        else if ([self dateComparison] < BDSKInDateRange)
+            return [dateValue shortDateDescription];
+        else
+            return [NSString stringWithFormat:@"%@ - %@", [dateValue 
shortDateDescription], [toDateValue shortDateDescription]];
+    } else if ([self isAttachmentCondition]) {
+        if ([self attachmentComparison] < BDSKAttachmentContain)
+            return [self key];
+        else
+            return [self value];
+    } else {
+        return [self stringValue];
+    }
 }
 
 #pragma mark Cached dates

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