Finally fixed the in-folder-C create folders A and B move B in A, bug



After two nights and half a day of searching for this one, after I
decided to replace the observers's infrastructure from TnyList to GList
with weak pointers (although this was also needed, and actually
unrelated). I finally found the problem that we had when (and most
people probably don't know) ...

You create in a root folder C two subfolders A and B, and then you move
B into A. 

The problem was that B was not visible anymore (until you restart the
application).

The reason was that _tny_camel_folder_new was used in stead of the
factory tny_camel_store_account_factor_folder. The code that moves the
folder asks for a list of sub folders, which used the factory to make
folder instances (sub folder instances). Therefore did the model get the
instance created by the factory.

The factory doesn't know about instances that got created by
_tny_camel_folder_new directly, it only knows about instances that it
created itself.

So the folder was represented by two instances. Only one of the two was
being observed by the model.


Please carefully review:

http://tinymail.org/trac/tinymail/changeset/2931


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






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