]> granicus.if.org Git - transmission/commitdiff
revert MessageWindowController changes
authorMitchell Livingston <livings124@transmissionbt.com>
Thu, 6 Sep 2012 03:25:52 +0000 (03:25 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Thu, 6 Sep 2012 03:25:52 +0000 (03:25 +0000)
macosx/MessageWindowController.m

index 9d288f0b5abf598d930f8a043d24115fa3c4a01f..e360d75fe930fffc721e00717aba96f9b4ac488d 100644 (file)
     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