[Gossip-dev] [Telepathy] rework of the UI
Xavier Claessens
xclaesse at gmail.com
Mon Sep 11 18:00:00 CEST 2006
Le lundi 11 septembre 2006 à 09:28 +0100, Martyn Russell a écrit :
> > For account parameters in a GHashTable I understand the problem which is
> > we don't know what kind of informations should be saved in the account,
> > but ignoring GossipAccount's properties will certainly lead to many many
> > bugs. What I suggest:
> >
> > Removing all GossipAccount's properties and add this API:
> > gossip_account_get_property (GossipAccount* account, gchar *property)
> > {return g_hash_table_lookup (params, property);}
> > gossip_account_set_property (...) {...}
> > To keep the actual API gossip_account_set_*() should uses the hash
> > table. For example:
> > gossip_account_set_resource(account, resource){g_hash_table_insert
> > (account->params, "resource", resource)}
> > So we should convert all actual account properties to the corresponding
> > Telepathy hash table element.
>
> This is no small task. If you look at all the places that use the
> gossip_account_() API using:
>
> grep -ir --include='*.c' gossip_account_ ./
>
> You will see that there are quite a few changes that would need doing.
> Also, there are some parameters of GossipAccount which do not need
> removing, like "name" and "auto_connect" which are more user preferences
> for an account than protocol specifics. Perhaps to some extent "id" too?
Ok so here is what I'm doing:
I always use the GHashTable for parameters that are not user config
even if we don't use telepathy. gossip_account_get_*() will return the
value from the hash table and gossip_account_set_*() will change it.
Except for: type, name, enabled, auto_connect and use_proxy which are
user configuration and don't have equivalent in the telepathy's hash
table.
Like that the GossipAccount API is preserved and can word with and
without telepathy. I'm not done with the change, there many things to do
in this module but I hope to propose the patch tomorrow if there is no
objection for this approche.
I think (hope) tones of bug will be fixed with that change. I already
fixed all warnings printed in the output (at least all I've seen so
far).
Xavier Claessens.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.imendio.com/pipermail/gossip-dev/attachments/20060911/bed08006/attachment.pgp
More information about the Gossip-dev
mailing list