messageTray, viewSelector: show/hide message tray on search signals
https://bugzilla.gnome.org/show_bug.cgi?id=682050
This commit is contained in:
parent
6538f60322
commit
4590b33f2e
@ -1736,6 +1736,11 @@ const MessageTray = new Lang.Class({
|
|||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
show: function() {
|
||||||
|
this._traySummoned = true;
|
||||||
|
this._updateState();
|
||||||
|
},
|
||||||
|
|
||||||
_onNotify: function(source, notification) {
|
_onNotify: function(source, notification) {
|
||||||
if (this._summaryBoxPointerItem && this._summaryBoxPointerItem.source == source) {
|
if (this._summaryBoxPointerItem && this._summaryBoxPointerItem.source == source) {
|
||||||
if (this._summaryBoxPointerState == State.HIDING) {
|
if (this._summaryBoxPointerState == State.HIDING) {
|
||||||
@ -1978,7 +1983,7 @@ const MessageTray = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Summary
|
// Summary
|
||||||
let summarySummoned = this._pointerInSummary || this._overviewVisible || this._traySummoned;
|
let summarySummoned = this._pointerInSummary || this._traySummoned;
|
||||||
let summaryPinned = this._pointerInTray || summarySummoned || this._locked;
|
let summaryPinned = this._pointerInTray || summarySummoned || this._locked;
|
||||||
let summaryHovered = this._pointerInTray || this._pointerInSummary;
|
let summaryHovered = this._pointerInTray || this._pointerInSummary;
|
||||||
|
|
||||||
@ -1986,7 +1991,7 @@ const MessageTray = new Lang.Class({
|
|||||||
this._notificationState == State.SHOWN);
|
this._notificationState == State.SHOWN);
|
||||||
let notificationsDone = !notificationsVisible && !notificationsPending;
|
let notificationsDone = !notificationsVisible && !notificationsPending;
|
||||||
|
|
||||||
let summaryOptionalInOverview = this._overviewVisible && !this._locked && !summaryHovered;
|
let summaryOptionalInOverview = !this._locked && !summaryHovered;
|
||||||
let mustHideSummary = (notificationsPending && (notificationUrgent || summaryOptionalInOverview))
|
let mustHideSummary = (notificationsPending && (notificationUrgent || summaryOptionalInOverview))
|
||||||
|| notificationsVisible || !Main.sessionMode.hasNotifications;
|
|| notificationsVisible || !Main.sessionMode.hasNotifications;
|
||||||
|
|
||||||
|
@ -244,12 +244,20 @@ const Overview = new Lang.Class({
|
|||||||
this.searchActive = true;
|
this.searchActive = true;
|
||||||
this._dash.hide();
|
this._dash.hide();
|
||||||
this._thumbnailsBox.hide();
|
this._thumbnailsBox.hide();
|
||||||
|
Main.messageTray.hide();
|
||||||
}));
|
}));
|
||||||
this._viewSelector.connect('search-cancelled', Lang.bind(this,
|
this._viewSelector.connect('search-cancelled', Lang.bind(this,
|
||||||
function() {
|
function() {
|
||||||
this.searchActive = false;
|
this.searchActive = false;
|
||||||
this._dash.show();
|
this._dash.show();
|
||||||
this._thumbnailsBox.show();
|
this._thumbnailsBox.show();
|
||||||
|
// search-cancelled is emitted if we leave the overview
|
||||||
|
// directly from searching. That means the message tray will
|
||||||
|
// be shown when we reach the workspace. Don't do this, only
|
||||||
|
// show the message tray on search-cancelled if we are still
|
||||||
|
// in the overview/not transitioning out of it.
|
||||||
|
if (this.visible && !this.animationInProgress)
|
||||||
|
Main.messageTray.show();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.connect('app-drag-begin',
|
this.connect('app-drag-begin',
|
||||||
|
Loading…
Reference in New Issue
Block a user