GNOME Bugzilla – Bug 313562
Files aren't sorted in the standard order
Last modified: 2007-01-11 13:04:03 UTC
This bug has been opened here: https://bugzilla.ubuntu.com/show_bug.cgi?id=13223 "In nautilus and the GNOME file->open windows, files are sorted with leading zeroes ignored (eg 18, 019, 20); in gthumb they aren't (019, 18, 20). There are other inconsistencies, but I can't figure out the sorting rules used... It's irrelevant anyway, the point is that the inconsistency is annoying when I'm trying to sort images"
Bug URL is now: https://launchpad.net/distros/ubuntu/+source/gthumb/+bug/36212
Hmm... I think gth_sort_by_filename_but_ignore_path in libgthumb/gth-sort-utils.c needs to be changed to use g_utf8_collate_key_for_filename () instead of the simpler strcasecmp. g_utf8_collate_key_for_filename tries to handle numbering "intelligently"... See http://developer.gnome.org/doc/API/2.2/glib/glib-Unicode-Manipulation.html#g-utf8-collate-key-for-filename - Mike
See also: compare_by_display_name in: http://svn.gnome.org/viewcvs/nautilus/trunk/libnautilus-private/nautilus-file.c?view=markup - Mike
Fixed in the development version (svn rev 1260). The fix will be available in the next major release. Thank you for your bug report.
One comment: sorting by name will be a little slower now, but I don't see any noticeable difference on my systems. Does it bother anyone else? It could be sped up by caching the collation keys, at the expense of added complexity. - Mike