[Gossip-dev] re-design of new account assistant

Mikael Hallendal micke at imendio.com
Wed Sep 27 16:21:05 CEST 2006


Xavier Claessens wrote:

Hi,

Sorry for not replying to this the first round. Agree that it makes
sense to work on this on HEAD rather than the Telepathy branch as it
would be useful right away and even if we don't switch to Telepathy in
the future.

>> For add-account I have some implementation questions. We want one
>> GtkWidget for each known protocol plus one for unknown. Those widgets
>> must be used in the GtkAssistant AND in the account-dialog to avoid code
>> duplications. How to implement that using Glade ? What I have in mind
>> (but not sure it's the right way):
>>
>>   - For each GtkWidget we needed, making a GtkWindow containing it in
>> the glade.
>>
>>   - A new Class GossipAddAccount inheriting from GtkWidget (or
>> GtkContainer, like that it can contain the GtkWidget readed from the
>> glade). We can put this object in a page of the GtkAssistant and it
>> provides a signal like "complete" which says when information are filled
>> by the user. It will also keep a GHashTable with pairs param_name and
>> value. And having a function gossip_add_account_param_foreach() like
>> that we can get values filled by the user and put it in the
>> GossipAccount.

I don't think GossipAddAccount is the best of names since it would be
used for editing an account as well. It doesn't have to inherit a
GtkWidget but could just return a container containing all the widgets
(hbox/vbox/table) from the _new function.

Ie, for example:

GtkWidget *  gossip_account_settings_icq_new (...);

Depends a bit if you think we would need common properties/signals (such
as account-updated) on all settings widgets.

I would probably go with subclassing GObject and have a "get_widget"
function on it though.

Best Regards,
  Mikael Hallendal

-- 
Imendio AB, http://www.imendio.com/


More information about the Gossip-dev mailing list