[gnome-shell] overviewControls: only show chat icon in messages indicator for chats



commit aac312ca34ff0e2816ee45ee315d0d12f9834e7f
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Mar 4 16:23:45 2013 -0500

    overviewControls: only show chat icon in messages indicator for chats
    
    Only show the chat icon in the new messages indicator when at least one
    among the outstanding notifications is a chat.

 js/ui/overviewControls.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index 0906885..ba5c7a8 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -452,9 +452,11 @@ const MessagesIndicator = new Lang.Class({
 
     _updateCount: function() {
         let count = 0;
+        let hasChats = false;
         this._sources.forEach(Lang.bind(this,
             function(source) {
                 count += source.indicatorCount;
+                hasChats |= source.isChat;
             }));
 
         this._count = count;
@@ -462,6 +464,7 @@ const MessagesIndicator = new Lang.Class({
                                     "%d new messages",
                                    count).format(count);
 
+        this._icon.visible = hasChats;
         this._updateVisibility();
     },
 


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