[Github-comments] [geany/geany] Start porting to GSettings (#1257)

elextr notifications at xxxxx
Sat Oct 8 02:33:57 UTC 2016


> > And if you are going to select stuff, at least make it a switch on an enum, not a series of strcmps :)

> GSettings deals in string keys, though it's possible (probable even) that it turns them into GQuarks for faster comparisons.

Almost certainly, IIUC its a hash table, and quarks (derived from the schema) are used as the hash values of strings.

But hopefully there will be enough commonality to have a few types of callback to do most of the settings, with the user_data controlling them, and the few which are unique can always have their own specific callback to avoid both switches or comparisons.  

If that doesn't work out then fall back to a callback per setting, but if I were doing that it would be riddled with cut and paste errors :)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1257#issuecomment-252397307
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20161007/b8255cfa/attachment.html>


More information about the Github-comments mailing list