Update of /cvsroot/zephyrchat/zchat/zChat
In directory sc8-pr-cvs1:/tmp/cvs-serv15381
Modified Files:
ZCChatWindowController.mm
Log Message:
Mark urgent messages in red.
Index: ZCChatWindowController.mm
===================================================================
RCS file: /cvsroot/zephyrchat/zchat/zChat/ZCChatWindowController.mm,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- ZCChatWindowController.mm 1 Apr 2003 15:18:40 -0000 1.21
+++ ZCChatWindowController.mm 3 Apr 2003 17:21:21 -0000 1.22
@@ -485,13 +485,18 @@
[self removePingFrom:sender];
NSString *displayName = [self displayNameFor:sender signature:signature];
+ NSColor *textColor = [ZChatApp textColorFor:sender];
+ if (strcaseequal(message.GetInstance(), "urgent")) {
+ textColor = [NSColor redColor];
+ }
+
NSAttributedString *formattedMessage
= [[NSAttributedString attributedStringWithZWGCString:
[NSString stringWithSTLString:message.GetMessage()]
defaultAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[NSFont userFontOfSize:12.0], NSFontAttributeName,
- [ZChatApp textColorFor:sender], NSForegroundColorAttributeName,
+ textColor, NSForegroundColorAttributeName,
nil]]
unflowWithDefaultFont:[NSFont userFontOfSize:12.0]
fixedFont:[NSFont userFixedPitchFontOfSize:10.0]];
@@ -510,11 +515,11 @@
@selector(invitationSheetDidEnd:returnCode:contextInfo:), nil, invitation,
NSLocalizedString(@"INVITATION_MESSAGE", nil), displayName,
[ZChatSubscription titleForSub:invitation->dest]);
- } else {
+ } else {
[self appendMessage:formattedMessage
from:displayName
color:[ZChatApp colorFor:sender]
- textColor:[ZChatApp textColorFor:sender]
+ textColor:textColor
alignment:NSNaturalTextAlignment];
}
}
@@ -680,7 +685,7 @@
return;
}
- if (_chatWith->dest.klass == "message") {
+ if (strcaseequal(_chatWith->dest.klass, "message")) {
message = [NSString stringWithFormat:NSLocalizedString(@"INVITE_MSG_INSTANCE", nil),
[NSString stringWithSTLString:_chatWith->dest.instance]];
} else if (_chatWith->dest.instance == "*" || _chatWith->dest.instance == "") {
|