Implementation of iter_children method of GtkTreeModel interface on TnyGtkHeaderListModel class.



Hi,

May be iter_children method, defining on GtkTreeModel interface, was not 
very usefuls for TnyGtkHeaderListModel class, because its a plani list 
and rows has not children. However, gtk_tree_model_filter_refilter 
operation needs to call this function.    

This patch implements that function using the already implemented 
iter_n_children method. 



-- 
Javier Fernández García-Boente
Ingeniero en Informática                 
mailto:jfernandez igalia com                    
Igalia http://www.igalia.com
Telf. +34 981 91 39 91  
Fax.  +34 981 91 39 49
 
Index: libtinymailui-gtk/tny-gtk-header-list-model.c
===================================================================
--- libtinymailui-gtk/tny-gtk-header-list-model.c	(revision 2200)
+++ libtinymailui-gtk/tny-gtk-header-list-model.c	(working copy)
@@ -476,7 +476,19 @@
 	return retval;
 }
 
+static gboolean                                                                                                                                                             
+tny_gtk_header_list_model_iter_children (GtkTreeModel *tree_model,
+					 GtkTreeIter  *iter,
+					 GtkTreeIter  *parent) 
+{                                                                                                                                                                           
+	gboolean retval = FALSE;
 
+	retval = tny_gtk_header_list_model_iter_nth_child (tree_model, iter, parent, 0);
+	
+	return retval;
+}
+
+
 static void
 tny_gtk_header_list_model_tree_model_init (GtkTreeModelIface *iface)
 {
@@ -489,6 +501,7 @@
 	iface->iter_next = tny_gtk_header_list_model_iter_next;
 	iface->iter_has_child = tny_gtk_header_list_model_iter_has_child;
 	iface->iter_n_children = tny_gtk_header_list_model_iter_n_children;
+	iface->iter_children = tny_gtk_header_list_model_iter_children;
 	iface->iter_nth_child = tny_gtk_header_list_model_iter_nth_child;
 
 	return;


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