remoteSearch: exclude content from hidden apps

Some apps may be configured as NoDisplay=true, but still install
a search provider.
Like we do elsewhere, exclude them from showing up in the UI.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/568
This commit is contained in:
Simon Schampijer 2017-11-09 18:01:58 +01:00 committed by Cosimo Cecchi
parent d8825e0d12
commit 3cbdf4f9a5

View File

@ -89,6 +89,8 @@ function loadRemoteSearchProviders(searchSettings, callback) {
try { try {
let desktopId = keyfile.get_string(group, 'DesktopId'); let desktopId = keyfile.get_string(group, 'DesktopId');
appInfo = Gio.DesktopAppInfo.new(desktopId); appInfo = Gio.DesktopAppInfo.new(desktopId);
if (!appInfo.should_show())
return;
} catch (e) { } catch (e) {
log('Ignoring search provider ' + path + ': missing DesktopId'); log('Ignoring search provider ' + path + ': missing DesktopId');
return; return;