overview, viewSelector: show/hide workspaces and message tray on apps button
This commit is contained in:
parent
7785710964
commit
7d3ea1ac68
@ -142,6 +142,7 @@ const Overview = new Lang.Class({
|
||||
this.animationInProgress = false;
|
||||
this._hideInProgress = false;
|
||||
this.searchActive = false;
|
||||
this.appsActive = false;
|
||||
|
||||
// During transitions, we raise this to the top to avoid having the overview
|
||||
// area be reactive; it causes too many issues such as double clicks on
|
||||
@ -259,6 +260,19 @@ const Overview = new Lang.Class({
|
||||
if (this.visible && !this.animationInProgress)
|
||||
Main.messageTray.show();
|
||||
}));
|
||||
this._viewSelector.connect('apps-button-checked', Lang.bind(this,
|
||||
function() {
|
||||
this.appsActive = true;
|
||||
this._thumbnailsBox.hide();
|
||||
Main.messageTray.hide();
|
||||
}));
|
||||
this._viewSelector.connect('apps-button-unchecked', Lang.bind(this,
|
||||
function() {
|
||||
this.appsActive = false;
|
||||
this._thumbnailsBox.show();
|
||||
if (this.visible && !this.animationInProgress)
|
||||
Main.messageTray.show();
|
||||
}));
|
||||
|
||||
this.connect('app-drag-begin',
|
||||
Lang.bind(this, function () {
|
||||
@ -270,6 +284,8 @@ const Overview = new Lang.Class({
|
||||
if (this.searchActive) {
|
||||
this._dash.hide();
|
||||
this._thumbnailsBox.hide();
|
||||
} else if (this.appsActive) {
|
||||
this._thumbnailsBox.hide();
|
||||
}
|
||||
}));
|
||||
this.connect('app-drag-end',
|
||||
@ -277,6 +293,8 @@ const Overview = new Lang.Class({
|
||||
if (this.searchActive) {
|
||||
this._dash.hide();
|
||||
this._thumbnailsBox.hide();
|
||||
} else if (this.appsActive) {
|
||||
this._thumbnailsBox.hide();
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -216,6 +216,11 @@ const ViewSelector = new Lang.Class({
|
||||
},
|
||||
|
||||
_onShowAppsButtonToggled: function() {
|
||||
if(this._showAppsButton.checked)
|
||||
this.emit('apps-button-checked');
|
||||
else
|
||||
this.emit('apps-button-unchecked');
|
||||
|
||||
if (this.entryNonEmpty)
|
||||
this.reset();
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user