Re: Connecting and account management



On Fri, 2007-07-27 at 10:02 +0200, Sergio Villar Senin wrote:
> Philip Van Hoof wrote:
> 
> > The attached patch attacks a few of these problems already. It also
> > deals with things that we'll need in future. For example letting the
> > connection itself happen on the individual queues of each store account
> > instance, in stead of in random threads.
> 
> That would be nice, because right now, if you have an account that
> requires a lot of time to connect, the other accounts will be waiting
> for a long time to connect despite having no problem.

Indeed. The patch solves this.

> > 
> > It also makes connecting happen reliably yet in parallel with other
> > accounts. This improves the amount of time needed "to go online".
> > 
> > This means that we can't detect when ALL accounts are connected. We can
> > only detect when ONE account's connection state has changed.
> 
> Well this seems a MUA developer business, looks easy to manage at the
> application side, and removes some annoying side effects, for example
> the full reload of the folder store tree model when the connection
> status of one account has changed.

Indeed. This happens automatically after the patch. The model will
refresh itself when one account's connection status changed.

> > This is why there are significant adaptations to the folder store tree
> > model too: the changes cope with connection state changes. The changes
> > assume that if a store account goes online, it's possible that new
> > folders will be available. Especially the first time the account is
> > used, will this pull-in not yet seen folders.
> 
> Mmm, does this mean that the model will listen for changes in the
> connection status of store accounts?

Yes (look at the patch). It's a model for accounts, this means that the
model can use all of that what it's a model for (account) 's API to
fulfil being that model.

> > This means that it's not needed to have a accounts-reloaded handler
> > anymore. It is, however, now needed to add the created accounts manually
> > to the TnyGtkFolderStoreTreeModel instance, as soon as you created it.
> 
> I don't really understand this. Currently he already have to do it. We
> create the StoreTreeModel and then we call
> tny_account_store_get_accounts passing the treemodel as second argument
> to get the accounts from the store account.


The treemodel takes care of this. Follow the code. You can still fill up
the treemodel this way (that didn't change), but after this initial fill
up you will have to, or can, add recently created accounts (with the
wizard) manually to it (you don't have to reload all, what Modest is
doing).



-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://www.pvanhoof.be/blog







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]