From 84b10c43127990857e5bfeadc443ec68f3d9d445 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 18 Nov 2007 05:45:28 +0000 Subject: [PATCH] more straightforward way to get string width for message window --- macosx/MessageWindowController.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/macosx/MessageWindowController.m b/macosx/MessageWindowController.m index e62ea85c0..2f63e609a 100644 --- a/macosx/MessageWindowController.m +++ b/macosx/MessageWindowController.m @@ -182,10 +182,7 @@ if (!fAttributes) fAttributes = [[[[column dataCell] attributedStringValue] attributesAtIndex: 0 effectiveRange: NULL] retain]; - NSAttributedString * string = [[NSAttributedString alloc] initWithString: - [[fMessages objectAtIndex: row] objectForKey: @"Message"] attributes: fAttributes]; - count = [string size].width / width; - [string release]; + count = [[[fMessages objectAtIndex: row] objectForKey: @"Message"] sizeWithAttributes: fAttributes].width / width; } return [tableView rowHeight] * (float)(count+1);