Re: Questions about the migration from GConf to GSettings/DConf



Hi Milan,

Thanks for your comprehensive response.

On Mon, 2015-07-20 at 09:04 +0200, Milan Crha wrote:
Briefly grepping the evolution-activesync code, the keys being read
from the GConf look like:
  /apps/activesyncd/accounts/<email>/<key1>
  /apps/activesyncd/accounts/<email>/<key2>
  ...
so you can have a relocatable schema with { key1, key2, ... } and
"attach" it under /apps/activesyncd/accounts/<email>. That feels 
pretty
straightforward, and if I understand your text properly then you know
it. The thing you face is to know the list of configured accounts.

I would create a 'list' key with a list of known accounts in
/apps/activesyncd/accounts/, which will contain the <email> of each
configured accounts, and an existing path in GSettings. I saw this
approach being used in another project, I think it was gtk+.

That sounds like a good solution to me; thanks.

. I don't have the perfect solution yet, so I'm here to see if 
anyone could help me.

The evolution(-data-server) also used to store its account settings
into GConf, but then moved away from that idea and instead of migrating
account settings into GSettings it uses its own ESourceRegistry. You
can create tree of ESource-s there, each can have its own extension,
where it stores its data. Maybe it would work better than the
GSettings. See how evolution-ews stores its settings on an ESource for
an example (it uses an ESourceCollection for the parent ESource).

Currently, the activesyncd dæmon is independent of Evolution. It
provides a DBus API which is used both from Evolution (for email), and
from SyncEvolution (for contacts/calendar).

So I'm a little reluctant to make it depend on ESource for
configuration.

Alternatively, maybe, create your own API on top of a GKeyFile and
store the account information in it?

Perhaps. I note GOA does something like this for its account storage.
But I think I like your first option better. Thanks again.

-- 
David Woodhouse                            Open Source Technology Centre
David Woodhouse intel com                              Intel Corporation

Attachment: smime.p7s
Description: S/MIME cryptographic signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]