Closed keygenqt closed 1 month ago
thank you so much for adding this feature
Using localStorage is okay (in theory using GSettings would be better but probably not worth the trouble).
But I would like to prevent it from leaking into other contexts, if possible (preferably each tool should have a separate origin). That's mainly why I haven't gotten around to fixing this. I think I attempted to set a different origin by setting the URL to foliate:selection-tool
... but apparently that doesn't work.
But maybe it doesn't matter. But perhaps it should at least use a different URI scheme, to separate it from the main foliate:
scheme.
Now that's ok. I don't really understand GJS, as I understand the problem Gtk.Popover + Gtk.DropDown/select is not new https://gitlab.gnome.org/GNOME/gtk/-/issues/5568. I fixed Popover by replacing select with buttons and add saving via localStorage. Maybe I didn't do everything perfectly, but it works =)
So in the end I decided to fix it myself with 02c5727abde5f40695f4ecd3d6b3dbb300d09b92. It uses GSettings instead of localStorage.
As for language selection, the main layout is the same as before:
But now it's possible to filter the languages:
Added saving of language selection for translation, it is very inconvenient to select a new translation language each time. In addition to this, there is a bug related to Gtk.Popover & select (after selecting a language, the window can only be closed with focus on select, I have not yet figured out how to overcome this, it looks like a gtk bug).
If it is possible to save the state in the application without using localStorage, I will be glad if you tell me.