[gnome-shell/user-status-update] status-menu: fix initial display



commit 2124cb15b3fa4638ecc9df27a29ed088f163c6cc
Author: Dan Winship <danw gnome org>
Date:   Mon Aug 22 14:03:36 2011 -0400

    status-menu: fix initial display
    
    Need to make sure the popup is initialized correctly even if empathy
    isn't running.

 js/ui/statusMenu.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/statusMenu.js b/js/ui/statusMenu.js
index 9a745d5..e143437 100644
--- a/js/ui/statusMenu.js
+++ b/js/ui/statusMenu.js
@@ -175,6 +175,7 @@ IMStatusChooserItem.prototype = {
         let [presence, s, msg] = this._accountMgr.get_most_available_presence();
 
         this._previousPresence = presence;
+        this._displayIMStatus(presence);
         this._accountMgr.connect('most-available-presence-changed',
                                  Lang.bind(this, this._IMStatusChanged));
 
@@ -270,6 +271,10 @@ IMStatusChooserItem.prototype = {
         else
             this._expectedPresence = undefined;
 
+        this._displayIMStatus(presence);
+    },
+
+    _displayIMStatus: function(presence) {
         let activatedItem;
 
         if (presence == Tp.ConnectionPresenceType.AVAILABLE)
@@ -282,7 +287,7 @@ IMStatusChooserItem.prototype = {
             activatedItem = IMStatus.AWAY;
         else if (presence == Tp.ConnectionPresenceType.EXTENDED_AWAY)
             activatedItem = IMStatus.IDLE;
-        else if (presence == Tp.ConnectionPresenceType.OFFLINE)
+        else
             activatedItem = IMStatus.OFFLINE;
 
         this._combo.setActiveItem(activatedItem);



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