overview, viewSelector: Don't use two signals for checking the app button

Just one will do.
This commit is contained in:
Jasper St. Pierre 2012-10-15 16:36:05 -04:00
parent 7d3ea1ac68
commit 0a8713770b
2 changed files with 11 additions and 15 deletions

View File

@ -261,17 +261,16 @@ const Overview = new Lang.Class({
Main.messageTray.show();
}));
this._viewSelector.connect('apps-button-checked', Lang.bind(this,
function() {
this.appsActive = true;
function(vs, checked) {
this.appsActive = checked;
if (checked) {
this._thumbnailsBox.hide();
Main.messageTray.hide();
}));
this._viewSelector.connect('apps-button-unchecked', Lang.bind(this,
function() {
this.appsActive = false;
} else {
this._thumbnailsBox.show();
if (this.visible && !this.animationInProgress)
Main.messageTray.show();
}
}));
this.connect('app-drag-begin',

View File

@ -216,10 +216,7 @@ const ViewSelector = new Lang.Class({
},
_onShowAppsButtonToggled: function() {
if(this._showAppsButton.checked)
this.emit('apps-button-checked');
else
this.emit('apps-button-unchecked');
this.emit('apps-button-checked', this._showAppsButton.checked);
if (this.entryNonEmpty)
this.reset();