[gnome-shell/wip/re-search-v2: 28/33] messageTray: show/hide message tray on search signals



commit aab648c5f2a3a32d7c809722689204e41389a008
Author: Tanner Doshier <doshitan gmail com>
Date:   Thu Aug 16 18:26:10 2012 -0500

    messageTray: show/hide message tray on search signals
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682050

 js/ui/messageTray.js |   11 ++++++++---
 js/ui/overview.js    |    2 ++
 2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 6fba5dd..493446f 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1507,7 +1507,7 @@ const MessageTray = new Lang.Class({
                 this._overviewVisible = true;
                 this._grabHelper.ungrab(); // drop modal grab if necessary
                 this.actor.add_style_pseudo_class('overview');
-                this._updateState();
+                this.show();
             }));
         Main.overview.connect('hiding', Lang.bind(this,
             function() {
@@ -1787,6 +1787,11 @@ const MessageTray = new Lang.Class({
         this._updateState();
     },
 
+    show: function() {
+        this._traySummoned = true;
+        this._updateState();
+    },
+
     _onNotify: function(source, notification) {
         if (this._summaryBoxPointerItem && this._summaryBoxPointerItem.source == source) {
             if (this._summaryBoxPointerState == State.HIDING) {
@@ -2033,14 +2038,14 @@ const MessageTray = new Lang.Class({
         }
 
         // Summary
-        let summarySummoned = this._pointerInSummary || this._overviewVisible ||  this._traySummoned;
+        let summarySummoned = this._pointerInSummary ||  this._traySummoned;
         let summaryPinned = this._pointerInTray || summarySummoned || this._locked;
         let summaryHovered = this._pointerInTray || this._pointerInSummary;
 
         let notificationsVisible = this._notificationState != State.HIDDEN;
         let notificationsDone = !notificationsVisible && !notificationsPending;
 
-        let summaryOptionalInOverview = this._overviewVisible && !this._locked && !summaryHovered;
+        let summaryOptionalInOverview = !this._locked && !summaryHovered;
         let mustHideSummary = (notificationsPending && (notificationUrgent || summaryOptionalInOverview))
                               || notificationsVisible || !Main.sessionMode.hasNotifications;
 
diff --git a/js/ui/overview.js b/js/ui/overview.js
index ef9201f..990dc01 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -305,9 +305,11 @@ const Overview = new Lang.Class({
         if (visible) {
             this._dash.show();
             this._thumbnailsBox.show();
+            Main.messageTray.show();
         } else {
             this._dash.hide();
             this._thumbnailsBox.hide();
+            Main.messageTray.hide();
         }
     },
 



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