[gnome-shell] remoteSearch: Fix remote search providers
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] remoteSearch: Fix remote search providers
- Date: Thu, 21 Sep 2017 14:53:56 +0000 (UTC)
commit f5a28c2f24398bbd2284513460945c71396059b4
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Sep 19 23:58:29 2017 +0200
remoteSearch: Fix remote search providers
Commit 289f982949c2 broke all remote providers when adding support for
non-auto-started search providers: Whether the provider should be
auto-started needs to be known in the constructor, so setting the
property on the constructed object doesn't work.
https://bugzilla.gnome.org/show_bug.cgi?id=787986
js/ui/remoteSearch.js | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js
index a7be926..de09ae9 100644
--- a/js/ui/remoteSearch.js
+++ b/js/ui/remoteSearch.js
@@ -98,6 +98,13 @@ function loadRemoteSearchProviders(searchSettings, callback) {
return;
}
+ let autoStart = true;
+ try {
+ autoStart = keyfile.get_boolean(group, 'AutoStart');
+ } catch(e) {
+ // ignore error
+ }
+
let version = '1';
try {
version = keyfile.get_string(group, 'Version');
@@ -106,9 +113,9 @@ function loadRemoteSearchProviders(searchSettings, callback) {
}
if (version >= 2)
- remoteProvider = new RemoteSearchProvider2(appInfo, busName, objectPath);
+ remoteProvider = new RemoteSearchProvider2(appInfo, busName, objectPath, autoStart);
else
- remoteProvider = new RemoteSearchProvider(appInfo, busName, objectPath);
+ remoteProvider = new RemoteSearchProvider(appInfo, busName, objectPath, autoStart);
remoteProvider.defaultEnabled = true;
try {
@@ -117,13 +124,6 @@ function loadRemoteSearchProviders(searchSettings, callback) {
// ignore error
}
- remoteProvider.autoStart = true;
- try {
- remoteProvider.autoStart = keyfile.get_boolean(group, 'AutoStart');
- } catch(e) {
- // ignore error
- }
-
objectPaths[objectPath] = remoteProvider;
loadedProviders.push(remoteProvider);
} catch(e) {
@@ -191,12 +191,12 @@ function loadRemoteSearchProviders(searchSettings, callback) {
var RemoteSearchProvider = new Lang.Class({
Name: 'RemoteSearchProvider',
- _init: function(appInfo, dbusName, dbusPath, proxyInfo) {
+ _init: function(appInfo, dbusName, dbusPath, autoStart, proxyInfo) {
if (!proxyInfo)
proxyInfo = SearchProviderProxyInfo;
let g_flags = Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES;
- if (remoteProvider.autoStart)
+ if (autoStart)
g_flags |= Gio.DBusProxyFlags.DO_NOT_AUTO_START_AT_CONSTRUCTION;
else
g_flags |= Gio.DBusProxyFlags.DO_NOT_AUTO_START;
@@ -319,8 +319,8 @@ var RemoteSearchProvider2 = new Lang.Class({
Name: 'RemoteSearchProvider2',
Extends: RemoteSearchProvider,
- _init: function(appInfo, dbusName, dbusPath) {
- this.parent(appInfo, dbusName, dbusPath, SearchProvider2ProxyInfo);
+ _init: function(appInfo, dbusName, dbusPath, autoStart) {
+ this.parent(appInfo, dbusName, dbusPath, autoStart, SearchProvider2ProxyInfo);
this.canLaunchSearch = true;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]