[gnome-shell/wip/fmuellner/dont-autostart-bolt: 15/15] thunderbolt: Do not auto start boltd
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/dont-autostart-bolt: 15/15] thunderbolt: Do not auto start boltd
- Date: Mon, 25 Jun 2018 14:17:56 +0000 (UTC)
commit 5fe349d5ba0d81e79d6b9d5fa2a128cc706e818e
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Feb 26 19:21:43 2018 +0100
thunderbolt: Do not auto start boltd
The service is expected to be activated by systemd when a thunderbolt
device is plugged in, so no need to have it auto-started with the
session.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/54
js/ui/status/thunderbolt.js | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/js/ui/status/thunderbolt.js b/js/ui/status/thunderbolt.js
index 98e81dbf3..0c543190c 100644
--- a/js/ui/status/thunderbolt.js
+++ b/js/ui/status/thunderbolt.js
@@ -49,7 +49,6 @@ const BoltDeviceInterface = '<node> \
</interface> \
</node>';
-const BoltClientProxy = Gio.DBusProxy.makeProxyWrapper(BoltClientInterface);
const BoltDeviceProxy = Gio.DBusProxy.makeProxyWrapper(BoltDeviceInterface);
/* */
@@ -78,6 +77,7 @@ var AuthMode = {
ENABLED: 'enabled'
};
+const BOLT_DBUS_CLIENT_IFACE = 'org.freedesktop.bolt1.Manager';
const BOLT_DBUS_NAME = 'org.freedesktop.bolt';
const BOLT_DBUS_PATH = '/org/freedesktop/bolt';
@@ -87,22 +87,26 @@ var Client = new Lang.Class({
_init() {
this._proxy = null;
- new BoltClientProxy(
- Gio.DBus.system,
- BOLT_DBUS_NAME,
- BOLT_DBUS_PATH,
- this._onProxyReady.bind(this)
- );
+ let nodeInfo = Gio.DBusNodeInfo.new_for_xml(BoltClientInterface);
+ Gio.DBusProxy.new(Gio.DBus.system,
+ Gio.DBusProxyFlags.DO_NOT_AUTO_START,
+ nodeInfo.lookup_interface(BOLT_DBUS_CLIENT_IFACE),
+ BOLT_DBUS_NAME,
+ BOLT_DBUS_PATH,
+ BOLT_DBUS_CLIENT_IFACE,
+ null,
+ this._onProxyReady.bind(this));
this.probing = false;
},
- _onProxyReady(proxy, error) {
- if (error !== null) {
- log('error creating bolt proxy: %s'.format(error.message));
- return;
- }
- this._proxy = proxy;
+ _onProxyReady(o, res) {
+ try {
+ this._proxy = Gio.DBusProxy.new_finish(res);
+ } catch(e) {
+ log('error creating bolt proxy: %s'.format(e.message));
+ return;
+ }
this._propsChangedId = this._proxy.connect('g-properties-changed',
this._onPropertiesChanged.bind(this));
this._deviceAddedId = this._proxy.connectSignal('DeviceAdded', this._onDeviceAdded.bind(this));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]