After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 643023 - Allow users to install new search providers
Allow users to install new search providers
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-23 00:07 UTC by Bastien Nocera
Modified: 2012-08-28 19:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Enable local search providers (2.04 KB, patch)
2011-05-24 16:28 UTC, Michael Ekstrand
reviewed Details | Review
Update search providers for local & all system dirs (2.40 KB, patch)
2011-08-23 23:45 UTC, Michael Ekstrand
none Details | Review

Description Bastien Nocera 2011-02-23 00:07:52 UTC
The code in js/ui/search.js only loads the OpenSearch providers from the gnome-shell datadir, not from the user's datadir:

let file = Gio.file_new_for_path(global.datadir + '/search_providers');

This means I cannot install my own OpenSearch providers as a normal user.

(I wanted to add an IMDb search)
Comment 1 Michael Ekstrand 2011-05-24 16:28:45 UTC
Created attachment 188482 [details] [review]
Enable local search providers

I've attached a small patch that scans ${global.userdatadir}/search_providers for search providers in addition to the global location.  This patch is against 3.0.1 shipped in Fedora, but it applies to git master as well with small offsets.

I would like to see the search providers show up in a different order (in particular, it seems useful to have user-local ones first, or alphabetize all of them), but that seems like a task for a separate patch, particularly since it will involve dealing correctly with ordering the final results from two async requests.
Comment 2 Jasper St. Pierre (not reading bugmail) 2011-08-03 20:00:58 UTC
Review of attachment 188482 [details] [review]:

You should add your patches with the result of git format-patch.

::: gnome-shell-3.0.1.orig/js/ui/search.js
@@ +308,3 @@
+        this._providers = [];
+        let names = global.settings.get_strv(DISABLED_OPEN_SEARCH_PROVIDERS_KEY);
+        this._scanProviders(names, global.datadir);

You need to iterate through all system data dirs. Use GLib.get_system_data_dirs().

See ExtensionSystem.loadExtensions for a similar case.
Comment 3 Michael Ekstrand 2011-08-23 23:45:51 UTC
Created attachment 194538 [details] [review]
Update search providers for local & all system dirs

I've updated the patch to search all system data dirs in addition to the user data dir.  It is also now in git format-patch format.

Unfortunately, I have not yet had an opportunity to test it, as installing a Fedora 16 VM has been unexpectedly difficult.
Comment 4 Florian Müllner 2012-08-28 19:14:53 UTC
Support for open-search providers has been removed from the shell - according to the design, those should be provided by the (yet non-existent) Web search provider.