Re: [Telepathy] rework of the UI

Xavier Claessens <[email protected]>
Newsgroups gmane.comp.gnome.gossip.devel
Message-ID <1158014597.4923.61.camel@zdra-desktop>
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

_______________________________________________
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)

iD8DBQBFBeaF6dEBUn2qPAMRAkpvAJ4sh2wRfAvYFEp8wayi3im8L4nhUgCfYerm
9ETchcjGIWGRdIU9U4tXcTg=
=oAr6
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.