Changeset 15331
- Timestamp:
- 02/23/2006 03:23:59 PM (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m
r15325 r15331 45 45 #define APPEND_NEXT_MESSAGE_NO_SCROLL @"appendNextMessageNoScroll(\"%@\");" 46 46 47 #define VALID_SENDER_COLORS_ARRAY [[NSArray alloc] initWithObjects:@"red", @"blue" , @"gray", @"magenta", @"violet", @"olive", @"yellowgreen", @"darkred", @"darkgreen", @"darksalmon", @"darkcyan", @"darkyellow", @"mediumpurple", @"peru", @"olivedrab", @"royalred", @"darkorange", @"slateblue", @"slategray", @"goldenrod", @"orangered", @"tomato", @"dogderblue", @"steelblue", @"deeppink", @"saddlebrown", @"coral", @"royalblue", nil] 48 49 static NSArray *validSenderColors; 50 47 51 @interface NSMutableString (AIKeywordReplacementAdditions) 48 52 - (void) replaceKeyword:(NSString *)word withString:(NSString *)newWord; … … 630 634 [inString replaceKeyword:@"%senderStatusIcon%" 631 635 withString:[self statusIconPathForListObject:[content source]]]; 636 637 if(!validSenderColors) validSenderColors = VALID_SENDER_COLORS_ARRAY; 638 [inString replaceKeyword:@"%senderColor%" 639 withString:[validSenderColors objectAtIndex:([[[content source] UID] hash] % ([validSenderColors count] - 1))]]; 632 640 633 641 //Replaces %time{x}% with a timestamp formatted like x (using NSDateFormatter)