Re: Major changes happening at the get_headers method of TnyMsgFolderIface

On Tue, 2006-05-30 at 01:56 +0200, Philip Van Hoof wrote:
> The API would change from the current one to something like this:
> void tny_msg_folder_iface_get_headers (TnyMsgFolderIface *self,
> 	 TnyListIface *headers, gboolean refresh);
> And in a Gtk+ context it would be used like this:
> TnyListIface *model = tny_msg_header_list_model_new ();
> tny_msg_folder_iface_get_headers (folder, model, TRUE);
> gtk_tree_view_set_model (treeview, GTK_TREE_MODEL (model));

It's implemented in Subversion. There's one reference count wrong which
will be fixed tomorrow.

Check tny-summary-window.c if you'd like to know how to use it (don't do
the extra g_object_unref on the model, I added that unref for testing
purposes (there's an extra yet unknown ref on the model, which I will
fix tomorrow).

You can still launch the uncache method on the folder type, but that one
will no longer perform the uncaching or removal of header instances. The
uncache method will still clearup memory (if the implementation uses
memory, which in case of the libtinymail-camel implementation, it does).

The removal of header instances happens upon switching the model of the
GtkTreeView (as the original model is unreferences once, it will
destruct itself -- the finalize takes care of destructing the header

Philip Van Hoof, software developer at x-tend 
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
work: vanhoof at x-tend dot be -

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