overview: Add public API to add search providers
Add a addSearchProvider() method, so extensions don't have to access the view selector directly, which is now a private property of the overview. https://bugzilla.gnome.org/show_bug.cgi?id=658113
This commit is contained in:
parent
d5314736de
commit
8b796e745d
@ -208,11 +208,11 @@ Overview.prototype = {
|
|||||||
this._viewSelector.addViewTab('applications', _("Applications"), appView.actor, 'system-run');
|
this._viewSelector.addViewTab('applications', _("Applications"), appView.actor, 'system-run');
|
||||||
|
|
||||||
// Default search providers
|
// Default search providers
|
||||||
this._viewSelector.addSearchProvider(new AppDisplay.AppSearchProvider());
|
this.addSearchProvider(new AppDisplay.AppSearchProvider());
|
||||||
this._viewSelector.addSearchProvider(new AppDisplay.SettingsSearchProvider());
|
this.addSearchProvider(new AppDisplay.SettingsSearchProvider());
|
||||||
this._viewSelector.addSearchProvider(new PlaceDisplay.PlaceSearchProvider());
|
this.addSearchProvider(new PlaceDisplay.PlaceSearchProvider());
|
||||||
this._viewSelector.addSearchProvider(new DocDisplay.DocSearchProvider());
|
this.addSearchProvider(new DocDisplay.DocSearchProvider());
|
||||||
this._viewSelector.addSearchProvider(new ContactDisplay.ContactSearchProvider());
|
this.addSearchProvider(new ContactDisplay.ContactSearchProvider());
|
||||||
|
|
||||||
// TODO - recalculate everything when desktop size changes
|
// TODO - recalculate everything when desktop size changes
|
||||||
this._dash = new Dash.Dash();
|
this._dash = new Dash.Dash();
|
||||||
@ -233,6 +233,10 @@ Overview.prototype = {
|
|||||||
this._relayout();
|
this._relayout();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
addSearchProvider: function(provider) {
|
||||||
|
this._viewSelector.addSearchProvider(provider);
|
||||||
|
},
|
||||||
|
|
||||||
setMessage: function(text, undoCallback, undoLabel) {
|
setMessage: function(text, undoCallback, undoLabel) {
|
||||||
if (this.isDummy)
|
if (this.isDummy)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user