Re: [AD] file selector behavior |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Wed, 16 Aug 2000, Vincent Penquerc'h wrote:
> The file selector displays files in a strange way on Linux.
> Files are sorted in case insensitivity and directories are
> displayed first regardless of names.
> I guess case insensitivity is the DOS default, but directories
> are not displayed first by DOS dir command
> Any chance this could be changed ? When looking for my valkin2
> directory in the grabber, I automatically go to the end of the
> list :) Or maybe a few more months and I'll get the habit of
> not doing so ;)
I browsed sources and as far as I can see, there is no sorting in fsel.c,
file.c, misc/ufile.c or libc.c (all of these source files affect file
selector). I also browsed linux kernel sources and there is no sorting in
ext2 filesystem. Directories on first places are only coincidence. Try 'ls
-f' and if it gives you another listing, then there is something strange.
Maybe there should be sorting in fsel.c (on line 610 there is call to
for_each_file(), which calls fs_flist_putter() as a callback routine). So
there could be some sorting of generated listbox after that line. I'm not
very familiar with Allegro GUI, so you may code it freely. :-)
Have a nice day.
Stepan Roh