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
@ -210,6 +210,11 @@ SearchTab.prototype = {
|
||||
this._searchResults.createProviderMeta(provider);
|
||||
},
|
||||
|
||||
removeSearchProvider: function(provider) {
|
||||
this._searchSystem.unregisterProvider(provider);
|
||||
this._searchResults.destroyProviderMeta(provider);
|
||||
},
|
||||
|
||||
startSearch: function(event) {
|
||||
global.stage.set_key_focus(this._text);
|
||||
this._text.event(event, false);
|
||||
@ -563,6 +568,10 @@ ViewSelector.prototype = {
|
||||
|
||||
addSearchProvider: function(provider) {
|
||||
this._searchTab.addSearchProvider(provider);
|
||||
},
|
||||
|
||||
removeSearchProvider: function(provider) {
|
||||
this._searchTab.removeSearchProvider(provider);
|
||||
}
|
||||
};
|
||||
Signals.addSignalMethods(ViewSelector.prototype);
|
||||
|
Reference in New Issue
Block a user