Since TeX was already removed from the title (in -displayTitle). Also it only partially worked in the past, as the font was reset.
Christiaan On 28 Dec 2007, at 6:13 PM, Adam R. Maxwell wrote: > So when did this quit working, and since when is a subclass a weird > workaround? It used to work pretty well. > > On Dec 28, 2007, at 8:42 AM, [EMAIL PROTECTED] wrote: > >> Revision: 12069 >> http://bibdesk.svn.sourceforge.net/bibdesk/? >> rev=12069&view=rev >> Author: hofman >> Date: 2007-12-28 08:42:48 -0800 (Fri, 28 Dec 2007) >> >> Log Message: >> ----------- >> Changes to file content search display. Don't use attributedString, >> as it wasn't working anyway and just required weird workarounds. >> Create column cells mostly in IB rather than programatically. Use >> the file name as tooltip in the table. >> >> Modified Paths: >> -------------- >> trunk/bibdesk/BDSKFileContentSearchController.m >> trunk/bibdesk/BDSKSearchResult.h >> trunk/bibdesk/BDSKSearchResult.m >> trunk/bibdesk/English.lproj/BDSKFileContentSearch.nib/classes.nib >> trunk/bibdesk/English.lproj/BDSKFileContentSearch.nib/info.nib >> trunk/bibdesk/English.lproj/BDSKFileContentSearch.nib/ >> keyedobjects.nib >> >> Modified: trunk/bibdesk/BDSKFileContentSearchController.m >> =================================================================== >> --- trunk/bibdesk/BDSKFileContentSearchController.m 2007-12-28 >> 13:41:37 UTC (rev 12068) >> +++ trunk/bibdesk/BDSKFileContentSearchController.m 2007-12-28 >> 16:42:48 UTC (rev 12069) >> @@ -50,21 +50,7 @@ >> #import "BibDocument_Search.h" >> #import "NSArray_BDSKExtensions.h" >> >> -// Overrides attributedStringValue since we return an attributed >> string; normally, the cell uses the font of the attributed string, >> rather than the table's font, so font changes are ignored. This >> means that italics and bold in titles will be lost until the search >> string changes again, but that's not a great loss. >> [EMAIL PROTECTED] BDSKFileContentTextWithIconCell : BDSKTextWithIconCell >> [EMAIL PROTECTED] >> >> [EMAIL PROTECTED] BDSKFileContentTextWithIconCell >> - >> -- (NSAttributedString *)attributedStringValue >> -{ >> - NSMutableAttributedString *value = [[super >> attributedStringValue] mutableCopy]; >> - [value addAttribute:NSFontAttributeName value:[self font] >> range:NSMakeRange(0, [value length])]; >> - return [value autorelease]; >> -} >> - >> [EMAIL PROTECTED] >> - >> @implementation BDSKFileContentSearchController >> >> - (id)initForDocument:(id)aDocument >> @@ -109,19 +95,12 @@ >> [tableView setTarget:self]; >> [tableView setDoubleAction:@selector(tableAction:)]; >> >> - BDSKLevelIndicatorCell *cell = [[BDSKLevelIndicatorCell alloc] >> initWithLevelIndicatorStyle:NSRelevancyLevelIndicatorStyle]; >> + BDSKLevelIndicatorCell *cell = [[tableView >> tableColumnWithIdentifier:@"score"] dataCell]; >> [cell setEnabled:NO]; // this is required to make it non-editable >> [cell setMaxHeight:17.0 * 0.7]; >> - [cell setMaxValue:5.0]; >> - [[tableView tableColumnWithIdentifier:@"score"] >> setDataCell:cell]; >> - [cell release]; >> >> // set up the image/text cell combination >> - BDSKTextWithIconCell *textCell = >> [[BDSKFileContentTextWithIconCell alloc] init]; >> - [textCell setControlSize:[cell controlSize]]; >> - [textCell setDrawsHighlight:NO]; >> - [[tableView tableColumnWithIdentifier:@"name"] >> setDataCell:textCell]; >> - [textCell release]; >> + [(BDSKTextWithIconCell *)[[tableView >> tableColumnWithIdentifier:@"title"] dataCell] setDrawsHighlight:NO]; >> >> OBPRECONDITION([[tableView enclosingScrollView] contentView]); >> [[NSNotificationCenter defaultCenter] addObserver:self >> @@ -443,6 +422,10 @@ >> [[self document] tableViewSelectionDidChange:notification]; >> } >> >> +- (NSString *)tableView:(NSTableView *)tv toolTipForCell:(NSCell >> *)aCell rect:(NSRectPointer)rect tableColumn:(NSTableColumn >> *)tableColumn row:(int)row mouseLocation:(NSPoint)mouseLocation { >> + return [[NSFileManager defaultManager] displayNameAtPath: >> [[[[resultsArrayController arrangedObjects] objectAtIndex:row] URL] >> path]]; >> +} >> + >> - (NSString *)tableViewFontNamePreferenceKey:(NSTableView *)tv { >> return BDSKFileContentSearchTableViewFontNameKey; >> } >> >> Modified: trunk/bibdesk/BDSKSearchResult.h >> =================================================================== >> --- trunk/bibdesk/BDSKSearchResult.h 2007-12-28 13:41:37 UTC (rev >> 12068) >> +++ trunk/bibdesk/BDSKSearchResult.h 2007-12-28 16:42:48 UTC (rev >> 12069) >> @@ -45,7 +45,6 @@ >> BDSKFile *file; >> // title of the search result (shown in table) >> NSString *string; >> - NSAttributedString *attributedString; >> NSImage *image; >> double score; >> NSURL *identifierURL; >> @@ -57,7 +56,6 @@ >> // used by the table cell >> - (NSImage *)image; >> - (NSString *)string; >> -- (NSAttributedString *)attributedString; >> - (void)setScore:(double)newScore; >> - (double)score; >> - (NSURL *)identifierURL; >> >> Modified: trunk/bibdesk/BDSKSearchResult.m >> =================================================================== >> --- trunk/bibdesk/BDSKSearchResult.m 2007-12-28 13:41:37 UTC (rev >> 12068) >> +++ trunk/bibdesk/BDSKSearchResult.m 2007-12-28 16:42:48 UTC (rev >> 12069) >> @@ -37,7 +37,6 @@ >> */ >> >> #import "BDSKSearchResult.h" >> -#import "NSAttributedString_BDSKExtensions.h" >> #import "BDSKSearchIndex.h" >> #import "NSImage_BDSKExtensions.h" >> #import "BDSKFile.h" >> @@ -64,8 +63,6 @@ >> >> string = [theTitle copy]; >> [theURL release]; >> - >> - attributedString = [[NSAttributedString alloc] >> initWithTeXString:string attributes:nil collapseWhitespace:NO]; >> >> identifierURL = [[theItem valueForKey:@"identifierURL"] >> copy]; >> >> @@ -78,7 +75,6 @@ >> - (void)dealloc >> { >> [file release]; >> - [attributedString release]; >> [string release]; >> [identifierURL release]; >> [image release]; >> @@ -90,7 +86,6 @@ >> BDSKSearchResult *copy = [[[self class] allocWithZone:zone] >> init]; >> copy->file = [file copy]; >> copy->string = [string copy]; >> - copy->attributedString = [attributedString copy]; >> copy->identifierURL = [identifierURL copy]; >> copy->image = [image retain]; >> copy->score = score; >> @@ -114,7 +109,6 @@ >> >> - (NSImage *)image { return image; } >> - (NSString *)string { return string; } >> -- (NSAttributedString *)attributedString { return >> attributedString; } >> - (NSURL *)identifierURL { return identifierURL; } >> - (NSURL *)URL { return [file fileURL]; } >> - (void)setScore:(double)newScore { score = newScore; } >> >> Modified: trunk/bibdesk/English.lproj/BDSKFileContentSearch.nib/ >> classes.nib >> =================================================================== >> (Binary files differ) >> >> Modified: trunk/bibdesk/English.lproj/BDSKFileContentSearch.nib/ >> info.nib >> =================================================================== >> (Binary files differ) >> >> Modified: trunk/bibdesk/English.lproj/BDSKFileContentSearch.nib/ >> keyedobjects.nib >> =================================================================== >> (Binary files differ) >> >> >> This was sent by the SourceForge.net collaborative development >> platform, the world's largest Open Source development site. >> >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Bibdesk-commit mailing list >> [EMAIL PROTECTED] >> https://lists.sourceforge.net/lists/listinfo/bibdesk-commit > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Bibdesk-develop mailing list > Bibdesk-develop@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bibdesk-develop ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bibdesk-develop mailing list Bibdesk-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-develop