Re: [Telepathy] rework of the UI
Xavier Claessens <[email protected]>
| Newsgroups | gmane.comp.gnome.gossip.devel |
|---|---|
| Message-ID | <1157990401.4923.48.camel@zdra-desktop> |
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.
_______________________________________________
Gossip-dev mailing list
[email protected]
http://lists.imendio.com/mailman/listinfo/gossip-dev
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQBFBYgA6dEBUn2qPAMRAqW2AKCL2SxI9+GrSyYDmA47BTMYvSfZ/gCeOXSr 5ohgiOLGTRgPOkJG/3Ty2oA= =Wt1U -----END PGP SIGNATURE-----