I re-checked my code and I think I fixed it. It was a problem of sorting
(bad sorting, of course). Now it appears to work find.

Thanks for your advices

Best regards

---------- Forwarded message ----------
From: Fernando Apesteguía <[EMAIL PROTECTED]>
Date: Aug 17, 2006 6:34 PM
Subject: Fwd: GtkTreeView, GtkListStore and more...
To: gtk-app-devel-list@gnome.org

Thanks,
I'll take it into account, but it doesn't fix the problem. The iter is not
incremented... I don't know why. The compilation shows no errors as the
debug terminal does not.

Can you point me to an example on how to traverse a GtkListStore?

Thanks


---------- Forwarded message ----------
From: Iago Rubio <[EMAIL PROTECTED]>
Date: Aug 17, 2006 6:14 PM
Subject: Re: GtkTreeView, GtkListStore and more...
To: gtk-app-devel-list@gnome.org

On Thu, 2006-08-17 at 17:43 +0200, Fernando Apesteguía wrote:

> for(....){
>    ...
>    if(should_be_deleted)
>         gtk_list_store_remove(model,&iter);
> ....
> gtk_tree_model_iter_next(GTK_TREE_MODEL(model),&iter);
> }

Try:

   if(should_be_deleted)
        gtk_list_store_remove(model, &iter);
   else
        gtk_tree_model_iter_next(GTK_TREE_MODEL(model),&iter);

gtk_list_store_remove() updates the iter to point to the next element,
so you should call gtk_tree_model_iter_next if the list item have not
been deleted. Otherwise you're moving the iter twice - one on remove,
second on  gtk_tree_model_iter_next.

Cheers.
--
Iago Rubio

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to