[gnome-shell/user-status-update: 12/12] status-menu: Handle IDLE



commit eef73a9ced0be431582e1c619fd5f3e5e39f818b
Author: Florian MÃllner <fmuellner gnome org>
Date:   Thu Aug 4 23:08:29 2011 +0200

    status-menu: Handle IDLE

 js/ui/statusMenu.js |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/statusMenu.js b/js/ui/statusMenu.js
index 79e13c8..8c9b41f 100644
--- a/js/ui/statusMenu.js
+++ b/js/ui/statusMenu.js
@@ -316,12 +316,20 @@ IMStatusChooserItem.prototype = {
             newPresence = this._previousPresence;
         } else if (sessionStatus == GnomeSession.PresenceStatus.BUSY) {
             // Only change presence if the current one is "more present" than
-            // busy
-            if (presence == Tp.ConnectionPresenceType.AVAILABLE) {
+            // busy, or if coming back from idle
+            if (presence == Tp.ConnectionPresenceType.AVAILABLE ||
+                presence == Tp.ConnectionPresenceType.EXTENDED_AWAY) {
                 newPresence = Tp.ConnectionPresenceType.BUSY;
             } else {
                 return;
             }
+        } else if (sessionStatus == GnomeSession.PresenceStatus.IDLE) {
+            // Only change presence if the current one is "more present" than
+            // idle
+            if (presence != Tp.ConnectionPresenceType.OFFLINE)
+                newPresence = Tp.ConnectionPresenceType.EXTENDED_AWAY;
+            else
+                return;
         } else {
             return;
         }



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