overview: Add API to remove search providers
As extensions are now expected to provide a "disable" function, they need to remove search providers they added. Implement the removal functionality and add a public removeSearchProvider() method. https://bugzilla.gnome.org/show_bug.cgi?id=657548
This commit is contained in:

committed by
Florian Müllner

parent
8b796e745d
commit
595be5083c
@ -356,6 +356,14 @@ SearchSystem.prototype = {
|
||||
this._providers.push(provider);
|
||||
},
|
||||
|
||||
unregisterProvider: function (provider) {
|
||||
let index = this._providers.indexOf(provider);
|
||||
if (index == -1)
|
||||
return;
|
||||
provider.searchSystem = null;
|
||||
this._providers.splice(index, 1);
|
||||
},
|
||||
|
||||
getProviders: function() {
|
||||
return this._providers;
|
||||
},
|
||||
|
Reference in New Issue
Block a user