[gnome-shell/wip/gtk-notification: 8/22] messageTray: Remove reNotifyAfterHideNotification logic



commit 61a2a3118bc02cfd1c175fa228c3ea0c98ff85ed
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Oct 13 22:41:10 2013 -0400

    messageTray: Remove reNotifyAfterHideNotification logic
    
    When we hide the summary box pointer, we always drop to the tray
    instead of the desktop, so this code would simply drop the notification
    anyway.

 js/ui/messageTray.js |   28 ++--------------------------
 1 files changed, 2 insertions(+), 26 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 0e23738..f5df311 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1894,7 +1894,6 @@ const MessageTray = new Lang.Class({
         this._summaryBoxPointerTimeoutId = 0;
         this._desktopCloneState = State.HIDDEN;
         this._notificationRemoved = false;
-        this._reNotifyAfterHideNotification = null;
         this._desktopClone = null;
         this._inCtrlAltTab = false;
 
@@ -2222,26 +2221,8 @@ const MessageTray = new Lang.Class({
 
     _onNotify: function(source, notification) {
         if (this._summaryBoxPointerItem && this._summaryBoxPointerItem.source == source) {
-            if (this._summaryBoxPointerState == State.HIDING) {
-                // We are in the process of hiding the summary box pointer.
-                // If there is an update for one of the notifications or
-                // a new notification to be added to the notification stack
-                // while it is in the process of being hidden, we show it as
-                // a new notification. However, we first wait till the hide
-                // is complete. This is especially important if one of the
-                // notifications in the stack was updated because we will
-                // need to be able to re-parent its actor to a different
-                // part of the stage.
-                this._reNotifyAfterHideNotification = notification;
-            } else {
-                // The summary box pointer is showing or shown (otherwise,
-                // this._summaryBoxPointerItem would be null)
-                // Immediately mark the notification as acknowledged and play its
-                // sound, as it's not going into the queue
-                notification.acknowledged = true;
-                notification.playSound();
-            }
-
+            notification.acknowledged = true;
+            notification.playSound();
             return;
         }
 
@@ -2941,11 +2922,6 @@ const MessageTray = new Lang.Class({
 
             this._summaryBoxPointerItem.doneShowingNotificationStack();
             this._summaryBoxPointerItem = null;
-
-            if (this._reNotifyAfterHideNotification) {
-                this._onNotify(this._reNotifyAfterHideNotification.source, 
this._reNotifyAfterHideNotification);
-                this._reNotifyAfterHideNotification = null;
-            }
         }
 
         if (this._clickedSummaryItem)


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