[Gossip-dev] final account rework
Xavier Claessens
xclaesse at gmail.com
Tue Oct 3 11:19:10 CEST 2006
Le dimanche 01 octobre 2006 à 21:59 +0200, Xavier Claessens a écrit :
> Le dimanche 01 octobre 2006 à 18:46 +0200, Xavier Claessens a écrit :
> > Hi,
> >
> > I'm working on protocol specific UI for creating and editing accounts
> > [1]. This work is made for HEAD and will be very useful for telepathy.
> >
> > One of the goal of this is removing the deprecated
> > gossip_account_[get,set]_*() API and use instead the new API
> > gossip_account_param_set(). I'm surprised there is not many places where
> > the deprecated API is used, most of it is in my new
> > gossip-account-jabber.[ch] module, that's why I'm thinking about
> > removing this API completely now.
> >
> > For that I need one think: the protocol should create new accounts with
> > default values for all parameters. Something like
> > GossipAccount *gossip_protocol_create_account (GossipProtocol*);
> > With telepathy it is already the protocol that creates new accounts and
> > it already sets all parameters with default values (Eitan correct me if
> > I miss understood the code). In telepathy we directly call
> > gossip_telepathy_cmgr_new_account_from_protocol
> > from protocol/telepathy/ which violate the libgossip abstraction.
> >
> > Is that a good idea if I implement all that in my next big account
> > rework ? Maybe it's better to make many little patches than one big ?
> >
> > btw, new_account_window_get_account_info() has changed in last commit in
> > the THELEPATHY branch and don't have the telepathy specific code
> > anymore ! what happened ?
> >
> > Xavier Claessens.
> >
> > [1] http://bugzilla.gnome.org/show_bug.cgi?id=358099
>
>
> Here is a patch. Like that we can create a new account with all default
> values for a particular protocol using:
> gossip_session_new_account (session, GOSSIP_ACCOUNT_TYPE_JABBER);
> It still needs a little work to not use properties in g_object_new but
> uses gossip_account_param_set_full() instead, like that we can set a
> flag for each parameter, this flag can be used in the UI to sort
> optional parameters that can be hidden in a "advanced"
> tab/dialog/expander or whatever will be the nicer way.
>
> Like always this is not very useful for HEAD but will be very cool for
> telepathy. The patch is for HEAD since it doesn't depend directly on
> telepathy.
>
> What do you think about ?
>
> Xavier.
Ok so the work is continuing. The goal of this patch [1] is to get rid
of gossip_account_set_* API. The problem that is solved with this patch
is if we don't uses gossip_account_set_password for example we don't
know what's the type of the "password" parameter. So we need to create
all parameters with gossip_account_param_new when creating a new
GossipAccount object. Once the parameters created with the good type and
flag we can easily change the value with gossip_account_param_set which
has the same syntax than g_object_set.
I need some feedback to know if it's the right way to solve the problem.
Thanks,
Xavier.
[1] http://users.skynet.be/Zdra/gossip-account.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/20061003/aecc2a62/attachment.pgp
More information about the Gossip-dev
mailing list