GNOME Bugzilla – Bug 674968
GtkTreeModel.iter_next and GtkTreeModel.iter_previous are not consistent in they results
Last modified: 2012-04-28 14:27:31 UTC
Created attachment 212975 [details] test case that shows both results (next and previous) in the console when you select an item Hello, I'm working on Browse Activity from the OLPC project[1], specifically in this ticket[2], and I found that the results of GtkTreeModel.iter_next and GtkTreeModel.iter_previous are not consistent. I mean, GtkTreeModel.iter_next returns None if there is no next item in the list and a GtkTreeIter object if there is. BUT, GtkTreeModel.iter_previous returns False if there is no previous item and True if there is. I think that GtkTreeModel.iter_previous should return None if there is no previous item in the list and a GtkTreeIter if there is, as GtkTreeModel.iter_next does. I attached a test case that shows this inconsistent behaviour. [1] http://git.sugarlabs.org/browse [2] http://bugs.sugarlabs.org/ticket/3473
I think this is fixed a couple of days ago: http://git.gnome.org/browse/pygobject/commit/?id=d37680bb9390426f7f58ea3d352c3e5e2106e978
THANKS! I applied the patch and re-built the source. After that I tested my app and it worked properly and the testcase as well. Thanks you so much. We can close this bug report. Please, change the resolution if you think that it's incorrect.
*** This bug has been marked as a duplicate of bug 660018 ***