From 5ab4c484a5a42b6b840857dce9418a319886e5d5 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 8 Feb 2013 17:47:37 -0500 Subject: [PATCH] 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 --- js/ui/searchDisplay.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js index 40d29cc7b..8dbd00e63 100644 --- a/js/ui/searchDisplay.js +++ b/js/ui/searchDisplay.js @@ -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() { this._searchSystem.reset(); this._statusBin.hide(); @@ -489,7 +483,8 @@ const SearchResults = new Lang.Class({ let meta = this._metaForProvider(provider); if (providerResults.length == 0) { - this._clearDisplayForProvider(provider); + meta.resultDisplay.clear(); + meta.actor.hide(); meta.resultDisplay.setResults([], []); this._maybeSetInitialSelection(); this._updateStatusText(); @@ -503,7 +498,7 @@ const SearchResults = new Lang.Class({ provider.canLaunchSearch; provider.getResultMetas(results, Lang.bind(this, function(metas) { - this._clearDisplayForProvider(provider); + meta.resultDisplay.clear(); meta.actor.show(); // Hiding drops the key focus if we have it