[gnome-shell] messageTray: hide removed notification without tweening



commit f8eab659d9b732918fb17923c22ec08bf09315c8
Author: Marina Zhurakhinskaya <marinaz redhat com>
Date:   Sun Aug 19 18:21:50 2012 -0400

    messageTray: hide removed notification without tweening
    
    This reflects more accurately what happens when a notification is removed.
    
    this._pointerInTray value needs to be set to false in this case.

 js/ui/messageTray.js |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 5958a87..39f9268 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2117,19 +2117,27 @@ const MessageTray = new Lang.Class({
             this._notificationExpandedId = 0;
         }
 
-        this._tween(this._notificationBin, '_notificationState', State.HIDDEN,
-                    { y: this.actor.height,
-                      opacity: 0,
-                      time: ANIMATION_TIME,
-                      transition: 'easeOutQuad',
-                      onComplete: this._hideNotificationCompleted,
-                      onCompleteScope: this
-                    });
+        if (this._notificationRemoved) {
+            this._notificationBin.y = this.actor.height;
+            this._notificationBin.opacity = 0;
+            this._notificationState = State.HIDDEN;
+            this._hideNotificationCompleted();
+        } else {
+            this._tween(this._notificationBin, '_notificationState', State.HIDDEN,
+                        { y: this.actor.height,
+                          opacity: 0,
+                          time: ANIMATION_TIME,
+                          transition: 'easeOutQuad',
+                          onComplete: this._hideNotificationCompleted,
+                          onCompleteScope: this
+                        });
+        }
     },
 
     _hideNotificationCompleted: function() {
         this._notificationRemoved = false;
         this._notificationBin.hide();
+        this._pointerInTray = false;
         this._notificationBin.child = null;
         this._notification.collapseCompleted();
         this._notification.disconnect(this._notificationClickedId);



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