telepathyClient: give a separate style to TpLogger messages

Sometimes, log messages are hard to differentiate from normal,
unread recent messages, so give a separate style to messages
retrieved from the TelepathyLogger service.

https://bugzilla.gnome.org/show_bug.cgi?id=645609
This commit is contained in:
Jasper St. Pierre 2011-03-24 07:11:17 -04:00 committed by Owen W. Taylor
parent b470736246
commit f117d9bfd3
2 changed files with 9 additions and 3 deletions

View File

@ -1100,6 +1100,10 @@ StTooltip StLabel {
icon-size: 36px;
}
.chat-log-message {
color: #888888;
}
.chat-received {
background-gradient-direction: horizontal;
background-gradient-start: rgba(255, 255, 255, 0.2);

View File

@ -267,7 +267,7 @@ Source.prototype = {
if (!isPending) {
showTimestamp = true;
this._notification.appendMessage(logMessage, true);
this._notification.appendMessage(logMessage, true, ['chat-log-message']);
}
}
@ -403,10 +403,12 @@ Notification.prototype = {
* @noTimestamp: Whether to add a timestamp. If %true, no timestamp
* will be added, regardless of the difference since the
* last timestamp
* @styles: A list of CSS class names.
*/
appendMessage: function(message, noTimestamp) {
appendMessage: function(message, noTimestamp, styles) {
let messageBody = GLib.markup_escape_text(message.text, -1);
let styles = [message.direction];
styles = styles || [];
styles.push(message.direction);
if (message.messageType == Tp.ChannelTextMessageType.ACTION) {
let senderAlias = GLib.markup_escape_text(message.sender, -1);