Re: Sorting order for filenames
- From: Matthew Thomas <mpt myrealbox com>
- To: Ole Laursen <olau hardworking dk>
- Cc: nautilus-list gnome org
- Subject: Re: Sorting order for filenames
- Date: Sat, 21 May 2005 01:10:47 +1200
Ole Laursen wrote:
...
Now, it turns out that the problem can be fixed by making a custom
collate key generation function (instead of using g_utf8_collate_key).
I've made one that fixes both the above problem with dots and also
sorts numbers better, e.g. as
file1.txt
file2.txt
file10.txt
The algorithm sorts files with small basenames before files with large
basenames and small numbers before large ones. The cleanest solution
seems to be to put the function in glib, but it was suggested in the
above bug report that I asked here first for comments on the sorting
algorithm.
...
I'm not a Nautilus developer, but that sorting looks pretty cool to me.
Well done. (I wish Apache did the same thing in its directory listings.)
--
Matthew Thomas
http://mpt.net.nz/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]