Re: [AD] file selector behavior - call me stupid |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Yes, call me stupid, because there is sorting in fsel.c on lines 534-549
(CVS version of course) :
for (c=0; c<flist->size; c++) {
if (ugetat(flist->name[c], -1) == OTHER_PATH_SEPARATOR) {
if (attrib & FA_DIREC)
if (ustrfilecmp(s, flist->name[c]) < 0)
break;
}
else {
if (attrib & FA_DIREC)
break;
if (ustrfilecmp(s, flist->name[c]) < 0)
break;
}
}
for (c2=flist->size; c2>c; c2--)
flist->name[c2] = flist->name[c2-1];
This answers all your questions (directories first and insensitivness).
Could be easily modified, for example case sensitivity on systems other
than DOS/Win and disabling of sorting directories first (just remove test
for FA_DIREC).
Have a nice day.
Stepan Roh
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 ;)
>
> --
> Lyrian
>