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 698846 - Invalid IconView preferred size when cleaning sorted view
Invalid IconView preferred size when cleaning sorted view
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-04-25 14:56 UTC by Guillaume Desmottes
Modified: 2013-05-03 11:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test script (720 bytes, text/plain)
2013-04-25 14:56 UTC, Guillaume Desmottes
  Details
treemodelsort: destroy the root only if we are removing the latest row of the level (2.40 KB, patch)
2013-04-25 15:15 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2013-04-25 14:56:24 UTC
Created attachment 242423 [details]
test script

The attached test script raises the following warning. Patch on its way.

(a.out:10268): Gtk-WARNING **: GtkIconView 0x12aa110 reported min size 24 and natural size 6 in get_preferred_width(); natural size must be >= min size
Comment 1 Guillaume Desmottes 2013-04-25 15:15:17 UTC
Created attachment 242425 [details] [review]
treemodelsort: destroy the root only if we are removing the latest row of the level

GtkIconView doesn't ref the rows of the model so we have to make sure that a
level is actually empty before destroying it.
Comment 2 Xavier Claessens 2013-04-25 15:18:02 UTC
This issue seems related to commit f94e21be431127aa540accc55ced8a02967ca604 from Matthias Clasen, since 2004... CCing him.
Comment 3 Matthias Clasen 2013-04-27 03:55:53 UTC
I can't say I have any recollection of that change or of the treemodelsort code in general. The testcase makes sense, and the patch fixes it, and doesn't seem to break any of our other treeview test cases.
Comment 4 Guillaume Desmottes 2013-04-29 07:26:18 UTC
Should I just merge this fix or should I wait for a proper review of the patch?
Comment 5 Guillaume Desmottes 2013-05-03 11:06:35 UTC
Merged to master.

Attachment 242425 [details] pushed as c15a787 - treemodelsort: destroy the root only if we are removing the latest row of the level