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 698398 - Improper description of GtkTreeModel "rows-reordered" iter
Improper description of GtkTreeModel "rows-reordered" iter
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
3.6.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-04-19 19:34 UTC by Dimitar Zhekov
Modified: 2014-01-22 06:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
docs: fix improper description of GtkTreeModel "rows-reordered" iter (1.16 KB, patch)
2014-01-22 06:23 UTC, William Jon McCann
committed Details | Review

Description Dimitar Zhekov 2013-04-19 19:34:51 UTC
As of gtk+ 3.6, the documentation for GtkTreeModel "rows-reordered" says:

"iter : a valid GtkTreeIter pointing to the node whose"

The sentence is incomplete (should be "whose children have been reordered"), and not entirely correct as well: if you reorder the top-level elements, such iter can not be valid, because it will have to point above the top-level. 

GtkTreeStore has an internal root element, so the actual iter in this case can be used for some operations (for example iter_next and iter_previous will correctly return false, because root->next and root->prev are always NULL), but other operations crash or emit warnings. If there is a chance that the top-level elements are being reordered, one should always check for path depth == 0 first.
Comment 1 William Jon McCann 2014-01-22 06:23:15 UTC
Created attachment 266947 [details] [review]
docs: fix improper description of GtkTreeModel "rows-reordered" iter
Comment 2 William Jon McCann 2014-01-22 06:23:45 UTC
Attachment 266947 [details] pushed as 89a51bd - docs: fix improper description of GtkTreeModel "rows-reordered" iter