From 9f3a9f8f2c619e9b9f49e818434dc6569eea66d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 25 Oct 2022 03:51:30 +0200 Subject: [PATCH] gdm/util: Do not use gjs GDBus proxy wrapper for fprint manager It only adds more complexity, while we can handle it all manually quite easier now. Part-of: --- js/gdm/util.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/js/gdm/util.js b/js/gdm/util.js index 3ea91d2bb..5ff74b660 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -14,8 +14,8 @@ import {loadInterfaceXML} from '../misc/fileUtils.js'; import * as Params from '../misc/params.js'; import * as SmartcardManager from '../misc/smartcardManager.js'; -const FprintManagerIface = loadInterfaceXML('net.reactivated.Fprint.Manager'); -const FprintManagerProxy = Gio.DBusProxy.makeProxyWrapper(FprintManagerIface); +const FprintManagerInfo = Gio.DBusInterfaceInfo.new_for_xml( + loadInterfaceXML('net.reactivated.Fprint.Manager')); const FprintDeviceIface = loadInterfaceXML('net.reactivated.Fprint.Device'); const FprintDeviceProxy = Gio.DBusProxy.makeProxyWrapper(FprintDeviceIface); @@ -125,12 +125,15 @@ export class ShellUserVerifier extends Signals.EventEmitter { this._updateDefaultService.bind(this)); this._updateDefaultService(); - this._fprintManager = new FprintManagerProxy(Gio.DBus.system, - 'net.reactivated.Fprint', - '/net/reactivated/Fprint/Manager', - null, - null, - Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES); + this._fprintManager = new Gio.DBusProxy({ + g_connection: Gio.DBus.system, + g_name: 'net.reactivated.Fprint', + g_object_path: '/net/reactivated/Fprint/Manager', + g_interface_name: FprintManagerInfo.name, + g_interface_info: FprintManagerInfo, + g_flags: Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES, + }); + this._fprintManager.init(null); this._smartcardManager = SmartcardManager.getSmartcardManager(); // We check for smartcards right away, since an inserted smartcard