search: Make sure to destroy old provider displays when we unregister

When we unregistered providers, like when we refreshed the list of
active remote providers, we would forget to destroy the old provider
display after the fact. This left an empty "skeleton" provider display
still in the search results that would never be filled in. Make sure
to destroy it properly.

https://bugzilla.gnome.org/show_bug.cgi?id=728597
This commit is contained in:
Jasper St. Pierre 2014-04-21 23:34:11 -04:00
parent f9c83bccb6
commit a83b9ed6d7

View File

@ -68,6 +68,9 @@ const SearchSystem = new Lang.Class({
_unregisterProvider: function (provider) { _unregisterProvider: function (provider) {
let index = this._providers.indexOf(provider); let index = this._providers.indexOf(provider);
this._providers.splice(index, 1); this._providers.splice(index, 1);
if (provider.display)
provider.display.destroy();
}, },
getProviders: function() { getProviders: function() {