Re: [Evolution-hackers] Rethinking account management
- From: Matthew Barnes <mbarnes redhat com>
- To: evolution-hackers gnome org
- Subject: Re: [Evolution-hackers] Rethinking account management
- Date: Thu, 30 Dec 2010 11:12:29 -0500
Another status update:
After much consideration I decided to drop GSettings from the equation
and just access key files directly. The key file part of the design is
working out well but I've been fighting with GSettings every step of the
way. It's not that that GSettings is bad, but it's very much designed
for dconf and not key files. Especially the way I'm using key files.
The straw that broke the camel's back was in trying to figure out how to
localize the display names of built-in top-level key files like "On This
Computer" and "On LDAP Servers". The GSettings API has no equivalent to
g_key_file_get_locale_string() so I was falling back to a similar hacky
solution as e_source_list_ensure_group(). But with GSettings out of the
way we can have the built-in key files translated through intltool just
as we would for desktop files, and call g_key_file_get_locale_string()
to get the appropriate localized display name.
End result (this the 'system' key file):
I don't have translations yet for the other key files (the translations
I need are all in Evolution, not E-D-S) but you get the idea. Note the
key file syntax looks normal again and doesn't use GVariant quoting.
Changes to the API I posted earlier  are minimal since the GSettings
interaction was pretty well hidden. Obviously e_source_get_settings()
is gone, as are the schema files. The schema for a key file group is
instead derived from the GParamSpec structures of the corresponding
ESourceExtension subclass. More about that later.
][Date Next] [Thread Prev