From 781776dd6933a302b32148f495be33dc296ff3c0 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Thu, 6 Sep 2012 03:25:52 +0000 Subject: [PATCH] revert MessageWindowController changes --- macosx/MessageWindowController.m | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/macosx/MessageWindowController.m b/macosx/MessageWindowController.m index 9d288f0b5..e360d75fe 100644 --- a/macosx/MessageWindowController.m +++ b/macosx/MessageWindowController.m @@ -292,26 +292,7 @@ NSTableColumn * column = [tableView tableColumnWithIdentifier: @"Message"]; const CGFloat count = floorf([message sizeWithAttributes: fAttributes].width / [column width]); - const CGFloat oldHeight = [tableView rowHeight] * (count + 1.0); - NSLog(@"oldHeight: %f", oldHeight); - - NSAttributedString * attributedMessage = [[NSAttributedString alloc] initWithString: message attributes: fAttributes]; - CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString((CFAttributedStringRef)attributedMessage); - [attributedMessage release]; - - const CGSize size = CTFramesetterSuggestFrameSizeWithConstraints(framesetter, CFRangeMake(0, 0), NULL, CGSizeMake([column width], CGFLOAT_MAX), NULL); - CFRelease(framesetter); - - NSLog(@"new %@", NSStringFromSize(size)); - //NSLog(@"%@", fAttributes); - - CGFloat newHeight = size.height; - - //not sure why this is needed - const CGFloat numRows = newHeight / 13.0; - newHeight += numRows * 1.0; - - return newHeight; + return [tableView rowHeight] * (count + 1.0); } - (void) tableView: (NSTableView *) tableView sortDescriptorsDidChange: (NSArray *) oldDescriptors