[gnome-shell] view-selector: add support for disable-external search setting



commit f25832d1b6c63e9c1d302163f36054c87500d740
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Nov 1 16:18:12 2012 -0400

    view-selector: add support for disable-external search setting
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687491

 js/ui/viewSelector.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index bee5bd7..d9cf053 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -96,6 +96,7 @@ const ViewSelector = new Lang.Class({
 
         this._searchSettings = new Gio.Settings({ schema: Search.SEARCH_PROVIDERS_SCHEMA });
         this._searchSettings.connect('changed::disabled', Lang.bind(this, this._reloadRemoteProviders));
+        this._searchSettings.connect('changed::disable-external', Lang.bind(this, this._reloadRemoteProviders));
         this._searchSettings.connect('changed::sort-order', Lang.bind(this, this._reloadRemoteProviders));
 
         // Default search providers
@@ -440,9 +441,13 @@ const ViewSelector = new Lang.Class({
     },
 
     _shouldUseSearchProvider: function(provider) {
+        // the disable-external GSetting only affects remote providers
         if (!provider.isRemoteProvider)
             return true;
 
+        if (this._searchSettings.get_boolean('disable-external'))
+            return false;
+
         let appId = provider.appInfo.get_id();
         let disable = this._searchSettings.get_strv('disabled');
         return disable.indexOf(appId) == -1;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]