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 674587 - treemodelsort: allow iter_previous() to go past the second item
treemodelsort: allow iter_previous() to go past the second item
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2012-04-22 20:38 UTC by Carlos Garnacho
Modified: 2012-04-28 06:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.02 KB, patch)
2012-04-22 20:38 UTC, Carlos Garnacho
reviewed Details | Review
treemodelsort: fix iter_previous so it can go back to the first item (3.12 KB, patch)
2012-04-28 06:00 UTC, Matthias Clasen
committed Details | Review
WIP: make GtkNotebook window-draggable (1.84 KB, patch)
2012-04-28 06:00 UTC, Matthias Clasen
committed Details | Review

Description Carlos Garnacho 2012-04-22 20:38:17 UTC
Created attachment 212569 [details] [review]
patch

the iter_previous() impl of GtkTreeModelSort does first fetch the previous GSequence element, and then check whether it's the first one, that has to be inverted so it can go as far as the first item
Comment 1 Matthias Clasen 2012-04-23 14:04:27 UTC
Review of attachment 212569 [details] [review]:

Can you add a test that shows the issue ?

gtk/tests/sortmodel.c 

would be the canonical place for such a test, I guess
Comment 2 Matthias Clasen 2012-04-23 14:37:41 UTC
Review of attachment 212569 [details] [review]:

Can you add a test that shows the issue ?

gtk/tests/sortmodel.c 

would be the canonical place for such a test, I guess
Comment 3 Matthias Clasen 2012-04-28 06:00:23 UTC
The following fixes have been pushed:
6764413 treemodelsort: fix iter_previous so it can go back to the first item
b3a66c5 WIP: make GtkNotebook window-draggable
Comment 4 Matthias Clasen 2012-04-28 06:00:26 UTC
Created attachment 213013 [details] [review]
treemodelsort: fix iter_previous so it can go back to the first item

It was getting the previous element, then checking whether it was the
first one, that has to be inverted so it doesn't stop on the second
item.
Comment 5 Matthias Clasen 2012-04-28 06:00:28 UTC
Created attachment 213014 [details] [review]
WIP: make GtkNotebook window-draggable

https://bugzilla.gnome.org/show_bug.cgi?id=672427