[gnome-shell/wip/message-tray: 26/32] messageTray: Be able to "switch" notifications



commit d2adf49ae1181258a023e9f3c38687cff41c31b2
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Aug 16 13:39:34 2012 -0400

    messageTray: Be able to "switch" notifications
    
    If you click on a summary item while another is up, we should
    swap without an extra click.

 js/ui/messageTray.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 0dab900..7c1709a 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1621,10 +1621,8 @@ const MessageTray = new Lang.Class({
     _onSummaryItemClicked: function(summaryItem, button) {
         if (summaryItem.source.handleSummaryClick()) {
             this._setClickedSummaryItem(null);
-        } else if (!this._clickedSummaryItem) {
-            this._setClickedSummaryItem(summaryItem, button);
         } else {
-            this._setClickedSummaryItem(null);
+            this._setClickedSummaryItem(summaryItem, button);
         }
 
         this._updateState();
@@ -2261,9 +2259,11 @@ const MessageTray = new Lang.Class({
         }
 
         this._summaryBoxPointerState = State.HIDING;
-        this._setClickedSummaryItem(null);
         this._unlock();
 
+        if (this._summaryBoxPointerItem == this._clickedSummaryItem)
+            this._setClickedSummaryItem(null);
+
         if (this._summaryBoxPointerItem.source.notifications.length == 0) {
             this._summaryBoxPointer.actor.hide();
             this._hideSummaryBoxPointerCompleted();



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