Revision: 26696 http://sourceforge.net/p/bibdesk/svn/26696 Author: hofman Date: 2021-08-20 12:41:58 +0000 (Fri, 20 Aug 2021) Log Message: ----------- Include tool tip for linked file cells in display value
Modified Paths: -------------- trunk/bibdesk/BibDocument_DataSource.m trunk/bibdesk/BibItem.m Modified: trunk/bibdesk/BibDocument_DataSource.m =================================================================== --- trunk/bibdesk/BibDocument_DataSource.m 2021-08-20 09:45:40 UTC (rev 26695) +++ trunk/bibdesk/BibDocument_DataSource.m 2021-08-20 12:41:58 UTC (rev 26696) @@ -156,10 +156,7 @@ [imageView setObjectValue:value]; } else { // linked files and URLs - if ([tcID isEqualToString:BDSKLocalFileString]) - [view setToolTip:[[pub existingLocalFiles] valueForKeyPath:@"path.stringByAbbreviatingWithTildeInPath.@componentsJoinedByComma"]]; - else if ([tcID isEqualToString:BDSKRemoteURLString]) - [view setToolTip:[[pub remoteURLs] valueForKeyPath:@"URL.absoluteString.@componentsJoinedByComma"]]; + [view setToolTip:[value valueForKey:@"toolTip"]]; [textField setObjectValue:[value valueForKey:@"string"]]; [imageView setObjectValue:[value valueForKey:@"image"]]; } Modified: trunk/bibdesk/BibItem.m =================================================================== --- trunk/bibdesk/BibItem.m 2021-08-20 09:45:40 UTC (rev 26695) +++ trunk/bibdesk/BibItem.m 2021-08-20 12:41:58 UTC (rev 26696) @@ -70,7 +70,6 @@ #import "BDSKMacroResolver.h" #import "BDSKMacro.h" #import "NSColor_BDSKExtensions.h" -#import "BDSKTextWithIconCell.h" #import "CFString_BDSKExtensions.h" #import "BDSKCFCallBacks.h" #import "NSCharacterSet_BDSKExtensions.h" @@ -1430,7 +1429,8 @@ hasSkimNotes = YES; } NSImage *image = hasSkimNotes ? (hasMissingFile ? [NSImage redAnnotatedPaperclipImage] : [NSImage annotatedPaperclipImage]) : (hasMissingFile ? [NSImage redPaperclipImage] : [NSImage paperclipImage]); - cellDictionary = [NSDictionary dictionaryWithObjectsAndKeys:image, BDSKTextWithIconImageKey, label, BDSKTextWithIconStringKey, nil]; + NSString *toolTip = [[self existingLocalFiles] valueForKeyPath:@"path.stringByAbbreviatingWithTildeInPath.@componentsJoinedByComma"]; + cellDictionary = [NSDictionary dictionaryWithObjectsAndKeys:image, @"image", label, @"image", toolTip, @"toolTip", nil]; } return cellDictionary; }else if([field isEqualToString:BDSKRemoteURLString]){ @@ -1438,7 +1438,8 @@ NSDictionary *cellDictionary = nil; if (count > 0) { NSString *label = 1 == count ? NSLocalizedString(@"1 item", @"") : [NSString stringWithFormat:NSLocalizedString(@"%ld items", @""), (long)count]; - cellDictionary = [NSDictionary dictionaryWithObjectsAndKeys:[[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGenericURLIcon)], BDSKTextWithIconImageKey, label, BDSKTextWithIconStringKey, nil]; + NSString *toolTip = [[self remoteURLs] valueForKeyPath:@"URL.absoluteString.@componentsJoinedByComma"]; + cellDictionary = [NSDictionary dictionaryWithObjectsAndKeys:[[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGenericURLIcon)], @"image", label, @"string", toolTip, @"toolTip", nil]; } return cellDictionary; }else if([field isEqualToString:BDSKColorString] || [field isEqualToString:BDSKColorLabelString]){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit