searchDisplay: Remove clearDisplayForProvider

Since the two paths that call this want to keep the actor in two different
states, it makes sense to just call the one function that's the same between
both individually.

https://bugzilla.gnome.org/show_bug.cgi?id=693836
This commit is contained in:
Jasper St. Pierre 2013-02-08 17:47:37 -05:00
parent e602199bfb
commit 5ab4c484a5

View File

@ -417,12 +417,6 @@ const SearchResults = new Lang.Class({
} }
}, },
_clearDisplayForProvider: function(provider) {
let meta = this._metaForProvider(provider);
meta.resultDisplay.clear();
meta.actor.hide();
},
reset: function() { reset: function() {
this._searchSystem.reset(); this._searchSystem.reset();
this._statusBin.hide(); this._statusBin.hide();
@ -489,7 +483,8 @@ const SearchResults = new Lang.Class({
let meta = this._metaForProvider(provider); let meta = this._metaForProvider(provider);
if (providerResults.length == 0) { if (providerResults.length == 0) {
this._clearDisplayForProvider(provider); meta.resultDisplay.clear();
meta.actor.hide();
meta.resultDisplay.setResults([], []); meta.resultDisplay.setResults([], []);
this._maybeSetInitialSelection(); this._maybeSetInitialSelection();
this._updateStatusText(); this._updateStatusText();
@ -503,7 +498,7 @@ const SearchResults = new Lang.Class({
provider.canLaunchSearch; provider.canLaunchSearch;
provider.getResultMetas(results, Lang.bind(this, function(metas) { provider.getResultMetas(results, Lang.bind(this, function(metas) {
this._clearDisplayForProvider(provider); meta.resultDisplay.clear();
meta.actor.show(); meta.actor.show();
// Hiding drops the key focus if we have it // Hiding drops the key focus if we have it