getting-things-gnome / gtg

Getting Things GNOME! trunk
https://wiki.gnome.org/Apps/GTG
GNU General Public License v3.0
553 stars 166 forks source link

Look into using GSettings for preferences #499

Open diegogangl opened 3 years ago

diegogangl commented 3 years ago

GTG currently uses a custom ini system with a somewhat hacky type system. On the other hand Gtk has GSettings which are schema based and come with several nice features.

This issue is open to research into whether it makes sense for us.

From the chat:

Leio:

it's nice in that you can bind things to object properties and have things all dynamically change everywhere; though I guess you can hook that up with INI system too

and then of course the benefits (and drawbacks according to some "purists") of a registry-like thing, which allows for stuff like changing semi-hidden options in dconf-editor (or cli) and stuff reacting live in running app, etc

making it work with a local schema (for launch.sh purposes) is... well, thinking about it, no work at all, because launch.sh currently does a local meson install

but doable also for the "uninstalled" case (local-gtg that I made too)

easy enough - needed for test suites too; standard practices with meson ini has the benefit of just grabbing it along with your xml's in a backup or to other machine or your nekohayo sync system for poor-multimachine gtg

Neui:

gsettings also supports multiple backends, and one of them is a keyfile (like the .desktop ini-like file) (also see https://developer.gnome.org/gio/stable/running-gio-apps.html )

diegogangl commented 3 years ago

Here's how to use them with plugins (Thanks to Neui for pointing it out): https://developer.gnome.org/gio/unstable/gio-GSettingsSchema-GSettingsSchemaSource.html#GSettingsSchemaSource