overview: Load RemoteSearchProviders

Allow applications to register search providers by dropping a keyfile
into a well-known directory. For now, initialize all found providers;
long term, we probably want to give users the ability to restrict the
set of active search providers.

https://bugzilla.gnome.org/show_bug.cgi?id=663125
This commit is contained in:
Florian Müllner
2011-12-15 14:46:12 +01:00
parent f6749fb204
commit 34c6ff9645
2 changed files with 58 additions and 0 deletions

View File

@ -21,6 +21,7 @@ const MessageTray = imports.ui.messageTray;
const Panel = imports.ui.panel;
const Params = imports.misc.params;
const PlaceDisplay = imports.ui.placeDisplay;
const RemoteSearch = imports.ui.remoteSearch;
const Tweener = imports.ui.tweener;
const ViewSelector = imports.ui.viewSelector;
const Wanda = imports.ui.wanda;
@ -210,6 +211,9 @@ const Overview = new Lang.Class({
this.addSearchProvider(new DocDisplay.DocSearchProvider());
this.addSearchProvider(new ContactDisplay.ContactSearchProvider());
// Load remote search providers provided by applications
RemoteSearch.loadRemoteSearchProviders(Lang.bind(this, this.addSearchProvider));
// TODO - recalculate everything when desktop size changes
this._dash = new Dash.Dash();
this._group.add_actor(this._dash.actor);