[Gossip-dev] [Telepathy] rework of the UI
Xavier Claessens
xclaesse at gmail.com
Tue Sep 12 00:43:17 CEST 2006
Le lundi 11 septembre 2006 à 18:00 +0200, Xavier Claessens a écrit :
> 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.
Here is what I have so far [1].
1) code cleanup in many places
2) removes those modules and merge changes in normal module:
gossip-new-account-window-telepathy.[ch]
gossip-accounts-dialog-telepathy.[ch]
3) As said GossipAccount uses the GHashTable for
gossip_account_get/set_*(). Rework the whole API.
4) Removes GossipAccountParamFlags to simplify the code. It's useless
for now but should be added back in some way later I think.
--> The DTD doesn't validate for account xml files, I don't understand
why, is there a guru of xml here to fix that ?
--> ssl doesn't seems to work here, didn't check why, yet.
Comments are welcome,
Xavier Claessens.
[1] http://users.skynet.be/Zdra/gossip-tp-reword.patch
-------------- 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/20060912/5ff4bc0b/attachment.pgp
More information about the Gossip-dev
mailing list