Changeset 3875


Ignore:
Timestamp:
Nov 18, 2007, 5:45:28 AM (15 years ago)
Author:
livings124
Message:

more straightforward way to get string width for message window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/MessageWindowController.m

    r3873 r3875  
    183183            fAttributes = [[[[column dataCell] attributedStringValue] attributesAtIndex: 0 effectiveRange: NULL] retain];
    184184       
    185         NSAttributedString * string = [[NSAttributedString alloc] initWithString:
    186                                         [[fMessages objectAtIndex: row] objectForKey: @"Message"] attributes: fAttributes];
    187         count = [string size].width / width;
    188         [string release];
     185        count = [[[fMessages objectAtIndex: row] objectForKey: @"Message"] sizeWithAttributes: fAttributes].width / width;
    189186    }
    190187   
Note: See TracChangeset for help on using the changeset viewer.