Tudmotu / gnome-shell-extension-clipboard-indicator

The most popular clipboard manager for GNOME, with over 1M downloads
https://extensions.gnome.org/extension/779/clipboard-indicator/
MIT License
865 stars 166 forks source link

Fix UTF8_STRING in registry.txt renders extension unresponsive on Gnome 46 (Wayland) #480

Closed Snorch closed 2 months ago

Snorch commented 3 months ago

The idea of the fix comes from @gentoo-root, @AmeyaVS and @alephnull comments in the original issue:

Changing "UTF8_STRING" to "text/plain;charset=utf-8" in registry.txt seems to be fixing the problem after reloading the extension.

So let's use this.isText() instead of mimetype.startsWith('text/')) in fromJSON text checking.

Without this patch "Text will be here" appears in the tray and extension is unresponsive.

Fixes: #459

Tudmotu commented 3 months ago

Thank you for this, will test it out and release in the next few days 🙏

TriplEight commented 3 months ago

I faced this bug with "Text will be here" and unresponsive extension v62. Then I found fixes https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator/issues/459#issuecomment-2044686278 and https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator/issues/459#issuecomment-2138858968.

So I first checked what was in ~/.cache/clipboard-indicator@tudmotu.com/registry.txt and it was empty! The bug is reproducible in this state. The workaround would be:

To improve the fix I'd recommend checking/restoring the structure of registry.txt.

Tudmotu commented 2 months ago

Apologies for the delay. Pushed to e.g.o. Thank you! :pray: