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 313562 - Files aren't sorted in the standard order
Files aren't sorted in the standard order
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.9.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2005-08-15 20:25 UTC by Sebastien Bacher
Modified: 2007-01-11 13:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Bacher 2005-08-15 20:25:31 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"
Comment 1 Daniel Holbach 2006-12-22 15:43:55 UTC
Bug URL is now: https://launchpad.net/distros/ubuntu/+source/gthumb/+bug/36212
Comment 2 Michael Chudobiak 2007-01-10 20:03:37 UTC
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


Comment 3 Michael Chudobiak 2007-01-10 20:07:43 UTC
See also:

compare_by_display_name

in:

http://svn.gnome.org/viewcvs/nautilus/trunk/libnautilus-private/nautilus-file.c?view=markup

- Mike
Comment 4 Michael Chudobiak 2007-01-10 20:33:27 UTC
Fixed in the development version (svn rev 1260). The fix will be available in the next major release. Thank you for your bug report.
Comment 5 Michael Chudobiak 2007-01-11 13:04:03 UTC
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