After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674968 - GtkTreeModel.iter_next and GtkTreeModel.iter_previous are not consistent in they results
GtkTreeModel.iter_next and GtkTreeModel.iter_previous are not consistent in t...
Status: RESOLVED DUPLICATE of bug 660018
Product: pygobject
Classification: Bindings
Component: introspection
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-27 14:53 UTC by Manuel Kaufmann
Modified: 2012-04-28 14:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case that shows both results (next and previous) in the console when you select an item (1.79 KB, text/x-python)
2012-04-27 14:53 UTC, Manuel Kaufmann
Details

Description Manuel Kaufmann 2012-04-27 14:53:42 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
Comment 1 Timo Vanwynsberghe 2012-04-27 15:16:41 UTC
I think this is fixed a couple of days ago: http://git.gnome.org/browse/pygobject/commit/?id=d37680bb9390426f7f58ea3d352c3e5e2106e978
Comment 2 Manuel Kaufmann 2012-04-27 15:50:07 UTC
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.
Comment 3 Martin Pitt 2012-04-28 14:27:31 UTC

*** This bug has been marked as a duplicate of bug 660018 ***