| 779 | | NSMutableDictionary *attributes = [NSMutableDictionary dictionaryWithObjectsAndKeys:baseFont, NSFontAttributeName, nil]; |
| 780 | | NSMutableAttributedString *error = [[[NSMutableAttributedString alloc] initWithString:[@" " stringByAppendingString:NSLocalizedString( @"incompatible encoding", "encoding of the message different than your current encoding" )] attributes:attributes] autorelease]; |
| 781 | | [error addAttribute:@"CSSClasses" value:[NSSet setWithObjects:@"error", @"encoding", nil] range:NSMakeRange( 1, ( [error length] - 1 ) )]; |
| 782 | | [messageString appendAttributedString:error]; |
| | 779 | /* Some of us don't want the (Incompatible Encoding) at the end of each line. So this option makes it hideable */ |
| | 780 | /* To hide the string, just do defaults write info.colloquy JVChatHideIncompatibleEncoding -bool true */ |
| | 781 | if (![[NSUserDefaults standardUserDefaults] boolForKey:@"JVChatHideIncompatibleEncoding"]) { |
| | 782 | NSMutableDictionary *attributes = [NSMutableDictionary dictionaryWithObjectsAndKeys:baseFont, NSFontAttributeName, nil]; |
| | 783 | NSMutableAttributedString *error = [[[NSMutableAttributedString alloc] initWithString:[@" " stringByAppendingString:NSLocalizedString( @"incompatible encoding", "encoding of the message different than your current encoding" )] attributes:attributes] autorelease]; |
| | 784 | [error addAttribute:@"CSSClasses" value:[NSSet setWithObjects:@"error", @"encoding", nil] range:NSMakeRange( 1, ( [error length] - 1 ) )]; |
| | 785 | [messageString appendAttributedString:error]; |
| | 786 | } |