Re: Major changes happening at the get_headers method of TnyMsgFolderIface
- From: Philip Van Hoof <spam pvanhoof be>
- To: tinymail-devel-list gnome org
- Subject: Re: Major changes happening at the get_headers method of TnyMsgFolderIface
- Date: Wed, 31 May 2006 17:25:20 +0200
On Tue, 2006-05-30 at 11:26 +0200, Philip Van Hoof wrote:
Upcoming commit
> #define MDL(o) TNY_MSG_HEADER_LIST_MODEL(o)
> GtkTreeView *header_view = ...
> GtkTreeModel *header_model, *sortable, *oldsortable;
>
> TnyListIface *model = TNY_LIST_IFACE (
> tny_msg_header_list_model_new ());
>
> tny_msg_folder_iface_get_headers (folder, model, FALSE);
You will no longer have to do this method.
> header_model = GTK_TREE_MODEL (model);
>
> tny_msg_header_list_model_set_folder (MDL (model), folder);
This method will (assuming you want to get new headers anyway) do it for
you already. So you can simply remove the get_headers method in your ui
code.
> oldsortable = gtk_tree_view_get_model (header_view);
>
> if (oldsortable && GTK_IS_TREE_MODEL_SORT (oldsortable))
> {
> GtkTreeModel *oldmodel = gtk_tree_model_sort_get_model
> (GTK_TREE_MODEL_SORT (oldsortable));
> if (oldmodel)
> g_object_unref (G_OBJECT (oldmodel));
> g_object_unref (G_OBJECT (oldsortable));
> }
>
> sortable = gtk_tree_model_sort_new_with_model (header_model);
> gtk_tree_view_set_model (header_view, sortable);
I'm making changes to the TnyMsgFolderIface ->get_folders method. It
will soon return a TnyListIface that can't add folders (only
internally).
--
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
http://www.pvanhoof.be - http://www.x-tend.be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]