summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2011-03-24 07:11:17 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2011-03-28 23:05:55 -0400
commitf117d9bfd39a6692d402af3227f92684b3a6dc53 (patch)
tree3a47073ae80395881b744e993198df90b7263dad
parentb470736246301f6f576de59631883661b3d3424d (diff)
downloadgnome-shell-f117d9bfd39a6692d402af3227f92684b3a6dc53.tar.gz
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
-rw-r--r--data/theme/gnome-shell.css4
-rw-r--r--js/ui/telepathyClient.js8
2 files changed, 9 insertions, 3 deletions
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index e9aefb15a..204505381 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -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);
diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js
index cc653e7fd..0b33e8602 100644
--- a/js/ui/telepathyClient.js
+++ b/js/ui/telepathyClient.js
@@ -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);