[gnome-shell] fingerprint: Use makeProxyWrapper for fprintManager
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] fingerprint: Use makeProxyWrapper for fprintManager
- Date: Mon, 8 Feb 2021 21:38:47 +0000 (UTC)
commit 824cdc9177a5ba7a813265a493c6f024543edd58
Author: Razze <razzeee gmail com>
Date: Sat Jan 30 20:10:03 2021 +0100
fingerprint: Use makeProxyWrapper for fprintManager
The reason this wasn't using the Gio.DBus.makeProxyWrapper() convenience API is that it passes custom
flags to the proxy, and that wasn't supported by the wrapper at the time.
As this is now possible, this commit migrates us to the new API.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1572>
.../net.reactivated.Fprint.Manager.xml | 18 ++++++++++++
data/gnome-shell-dbus-interfaces.gresource.xml | 1 +
js/gdm/fingerprint.js | 33 ----------------------
js/gdm/util.js | 12 ++++++--
js/js-resources.gresource.xml | 1 -
5 files changed, 29 insertions(+), 36 deletions(-)
---
diff --git a/data/dbus-interfaces/net.reactivated.Fprint.Manager.xml
b/data/dbus-interfaces/net.reactivated.Fprint.Manager.xml
new file mode 100644
index 0000000000..21e03f2c03
--- /dev/null
+++ b/data/dbus-interfaces/net.reactivated.Fprint.Manager.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE node PUBLIC
+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+ <interface name="net.reactivated.Fprint.Manager">
+
+ <method name="GetDevices">
+ <arg type="ao" name="devices" direction="out">
+ </arg>
+ </method>
+
+ <method name="GetDefaultDevice">
+ <arg type="o" name="device" direction="out">
+ </arg>
+ </method>
+
+ </interface>
+</node>
diff --git a/data/gnome-shell-dbus-interfaces.gresource.xml b/data/gnome-shell-dbus-interfaces.gresource.xml
index e740700390..c705a22840 100644
--- a/data/gnome-shell-dbus-interfaces.gresource.xml
+++ b/data/gnome-shell-dbus-interfaces.gresource.xml
@@ -2,6 +2,7 @@
<gresources>
<gresource prefix="/org/gnome/shell/dbus-interfaces">
<file preprocess="xml-stripblanks">net.hadess.SensorProxy.xml</file>
+ <file preprocess="xml-stripblanks">net.reactivated.Fprint.Manager.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.Application.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.bolt1.Device.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.bolt1.Manager.xml</file>
diff --git a/js/gdm/util.js b/js/gdm/util.js
index af13574668..bcf8a514c8 100644
--- a/js/gdm/util.js
+++ b/js/gdm/util.js
@@ -6,13 +6,16 @@ const { Clutter, Gdm, Gio, GLib } = imports.gi;
const Signals = imports.signals;
const Batch = imports.gdm.batch;
-const Fprint = imports.gdm.fingerprint;
const OVirt = imports.gdm.oVirt;
const Vmware = imports.gdm.vmware;
const Main = imports.ui.main;
+const { loadInterfaceXML } = imports.misc.fileUtils;
const Params = imports.misc.params;
const SmartcardManager = imports.misc.smartcardManager;
+const FprintManagerIface = loadInterfaceXML('net.reactivated.Fprint.Manager');
+const FprintManagerProxy = Gio.DBusProxy.makeProxyWrapper(FprintManagerIface);
+
Gio._promisify(Gdm.Client.prototype,
'open_reauthentication_channel', 'open_reauthentication_channel_finish');
Gio._promisify(Gdm.Client.prototype,
@@ -138,7 +141,12 @@ var ShellUserVerifier = class {
this._updateDefaultService.bind(this));
this._updateDefaultService();
- this._fprintManager = Fprint.FprintManager();
+ this._fprintManager = new FprintManagerProxy(Gio.DBus.system,
+ 'net.reactivated.Fprint',
+ '/net/reactivated/Fprint/Manager',
+ null,
+ null,
+ Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES);
this._smartcardManager = SmartcardManager.getSmartcardManager();
// We check for smartcards right away, since an inserted smartcard
diff --git a/js/js-resources.gresource.xml b/js/js-resources.gresource.xml
index 30582aad01..45b5de4362 100644
--- a/js/js-resources.gresource.xml
+++ b/js/js-resources.gresource.xml
@@ -3,7 +3,6 @@
<gresource prefix="/org/gnome/shell">
<file>gdm/authPrompt.js</file>
<file>gdm/batch.js</file>
- <file>gdm/fingerprint.js</file>
<file>gdm/loginDialog.js</file>
<file>gdm/oVirt.js</file>
<file>gdm/credentialManager.js</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]