[gnome-shell] telepathyClient: give a separate style to TpLogger messages



commit f117d9bfd39a6692d402af3227f92684b3a6dc53
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Mar 24 07:11:17 2011 -0400

    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

 data/theme/gnome-shell.css |    4 ++++
 js/ui/telepathyClient.js   |    8 +++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index e9aefb1..2045053 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 cc653e7..0b33e86 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]