* Use the left triangle char for parent directory instead of '<-'
* Make sure parent directory is alway listed first, even when some dir names start with ! (yes, I do use that, as a trick to make sure they list first) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1963 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
d4d57f750d
commit
ba46f1fd21
@ -221,7 +221,7 @@ char * Format_filename(const char * fname, word max_length, int type)
|
|||||||
|
|
||||||
if (strcmp(fname,PARENT_DIR)==0)
|
if (strcmp(fname,PARENT_DIR)==0)
|
||||||
{
|
{
|
||||||
strcpy(result,"<-PARENT DIRECTORY");
|
strcpy(result,"\x11 PARENT DIRECTORY");
|
||||||
// Append spaces
|
// Append spaces
|
||||||
for (c=18; c<max_length-1; c++)
|
for (c=18; c<max_length-1; c++)
|
||||||
result[c]=' ';
|
result[c]=' ';
|
||||||
@ -665,14 +665,17 @@ void Sort_list_of_files(T_Fileselector *list)
|
|||||||
// Ensuite, on vérifie si les deux éléments sont bien dans l'ordre ou
|
// Ensuite, on vérifie si les deux éléments sont bien dans l'ordre ou
|
||||||
// non:
|
// non:
|
||||||
|
|
||||||
// Si l'élément courant est un fichier est que le suivant est
|
// Drives go at the top of the list, and files go after them
|
||||||
// un répertoire -> need_swap
|
|
||||||
if ( current_item->Type < next_item->Type )
|
if ( current_item->Type < next_item->Type )
|
||||||
need_swap=1;
|
need_swap=1;
|
||||||
// Si les deux éléments sont de même type et que le nom du suivant
|
// If both elements have the same type, compare the file names, if
|
||||||
// est plus petit que celui du courant -> need_swap
|
// current is alphabetically before, we need to swap, unless it is
|
||||||
|
// parent directory, which should always go first
|
||||||
else if ( (current_item->Type==next_item->Type) &&
|
else if ( (current_item->Type==next_item->Type) &&
|
||||||
(FILENAME_COMPARE(current_item->Full_name,next_item->Full_name)>0) )
|
(((FILENAME_COMPARE(current_item->Full_name,next_item->Full_name)>0) &&
|
||||||
|
(FILENAME_COMPARE(current_item->Full_name, PARENT_DIR) != 0)) ||
|
||||||
|
(FILENAME_COMPARE(next_item->Full_name, PARENT_DIR) == 0))
|
||||||
|
)
|
||||||
need_swap=1;
|
need_swap=1;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user