gnome-shell-extension-gsconnect
gnome-shell-extension-gsconnect copied to clipboard
Use KDE Connect's verification codes
Fixes #1091
Still TODO:
- Diagnose segfaults in the daemon
- Figure out if the UTF-8 errors are a problem
- Display verification codes in the notification (right now you need to have the preferences window open)
- Clean up the style
- Clean up the .ui file diff that Glade made a mess of
- Fix the verification code computation so it actually works
Some notes on the segfaults: they seem to happen during the pairing process. I think there's a race condition or something like that during the verification code computation. Most of the time I just get Segmentation fault (core dumped)
, but occasionally I get a longer assertion error:
GLib:ERROR:../glib/gchecksum.c:1618:g_checksum_update: code should not be reached
Bail out! GLib:ERROR:../glib/gchecksum.c:1618:g_checksum_update: code should not be reached
Aborted (core dumped)
The UTF-8 errors come from the preferences pane and all look like this:
(gsconnect-preferences:335958): Gjs-CRITICAL **: 01:53:39.208: JS ERROR: TypeError: malformed UTF-8 character sequence at offset 0
@/var/home/alex/.local/share/gnome-shell/extensions/[email protected]/gsconnect-preferences:114:21
Also, I used Unicode 🔑 instead of an icon because I couldn't find a suitable icon in what Glade said was available. If there's a better way, let me know.
One more thing - this is basically my first time writing anything approaching GTK/GObject/etc. code, so please review with extra scrutiny. I might have broken everything!
Diagnose segfaults in the daemon
You can run the daemon with GDB if necessary. Let me know if that's something you want help with and after I can add it to the contributing document.
Figure out if the UTF-8 errors are a problem
These are fine to leave and not related to your PR. It's just a corner-case in GJS and GDBus related to virtual functions.
Display verification codes in the notification (right now you need to have the preferences window open)
I think that the combined verification code is what needs to be shown in the notification, at least I think that's what Android does. I think the older keys are effectively being deprecated.
Closing this as completed, since it was brought home by @daniellandau in #1493 and is now merged. Thanks @strugee !
Whoops. Premature close, as there's more to this PR than what went in with #1493. Reopening, and attempting to reconcile with the current main
branch HEAD.
attempting to reconcile with the current
main
branch HEAD.
That actually wasn't hard at all, in terms of actual change conflicts. Whether the code on this branch is still compatible with the main
source is another matter, which I guess the CI will at least help us determine...
Hey, sorry for disappearing - life got in the way :-)
Glad to hear my work was useful for #1493.