Changeset 23034
- Timestamp:
- 04/03/2008 11:21:13 AM (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Frameworks/Adium Framework/Source/AIHTMLDecoder.m
r23031 r23034 66 66 @implementation AIHTMLDecoder 67 67 68 static AITextAttributes *_defaultTextDecodingAttributes = nil;69 68 static NSString *horizontalRule = nil; 70 69 71 70 + (void)initialize 72 71 { 73 if (!_defaultTextDecodingAttributes) {74 _defaultTextDecodingAttributes = [[AITextAttributes textAttributesWithFontFamily:@"Lucida Grande" traits:0 size:12] retain];75 }76 77 72 //Set up the horizontal rule which will be searched-for when encoding and inserted when decoding 78 if ( !horizontalRule) {73 if ((self == [AIHTMLDecoder class])) { 79 74 #define HORIZONTAL_BAR 0x2013 80 75 #define HORIZONTAL_RULE_LENGTH 12 81 76 82 77 const unichar separatorUTF16[HORIZONTAL_RULE_LENGTH] = { 83 78 '\n', HORIZONTAL_BAR, HORIZONTAL_BAR, HORIZONTAL_BAR, HORIZONTAL_BAR, HORIZONTAL_BAR, … … 1059 1054 textAttributes = [AITextAttributes textAttributesWithDictionary:inDefaultAttributes]; 1060 1055 } else { 1061 textAttributes = [[ _defaultTextDecodingAttributes copy] autorelease];1062 } 1063 1056 textAttributes = [[[AITextAttributes alloc] init] autorelease]; 1057 } 1058 1064 1059 attrString = [[NSMutableAttributedString alloc] init]; 1065 1060