[gnome-bluetooth/wip/hadess/icade: 4/4] settings-widget: Prepare for future error reporting




commit 2b8cf369dd719aa61cebe803be6bc2d75b671b6b
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Sep 20 17:21:47 2020 +0200

    settings-widget: Prepare for future error reporting
    
    We should be reporting some of the pairing errors better than we are.
    Make some notes as to what those errors are.

 lib/bluetooth-settings-widget.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index ac1c9baa..8577b0f4 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -917,7 +917,11 @@ create_callback (GObject      *source_object,
                turn_off_pairing (user_data, path);
 
                dbus_error = g_dbus_error_get_remote_error (error);
-               if (g_strcmp0 (dbus_error, "org.bluez.Error.AuthenticationCanceled") != 0) {
+               if (g_strcmp0 (dbus_error, "org.bluez.Error.AuthenticationFailed") == 0) {
+                       //FIXME pairing failed because we entered the wrong code
+               } else if (g_strcmp0 (dbus_error, "org.bluez.Error.AuthenticationCanceled") == 0) {
+                       //FIXME pairing was cancelled
+               } else {
                        //FIXME show an error?
                        /* translators:
                         * The ā€œ%sā€ is the device name, for example:


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