Fix "Select Drive" in file selector
Add HDD icon for /. HFS Volumes have icon
This commit is contained in:
parent
54baf87bb0
commit
6c1e011de7
@ -729,7 +729,6 @@ void Read_list_of_drives(T_Fileselector *list, byte name_length)
|
||||
drive_index++;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
{
|
||||
//Sous les différents unix, on va mettre
|
||||
@ -742,7 +741,7 @@ void Read_list_of_drives(T_Fileselector *list, byte name_length)
|
||||
struct mount_entry* next;
|
||||
|
||||
char * home_dir = getenv("HOME");
|
||||
Add_element_to_list(list, "/", Format_filename("/",name_length,2), 2, ICON_NONE);
|
||||
Add_element_to_list(list, "/", Format_filename("/",name_length-1,2), 2, ICON_HDD);
|
||||
list->Nb_directories++;
|
||||
if(home_dir)
|
||||
{
|
||||
@ -763,11 +762,13 @@ void Read_list_of_drives(T_Fileselector *list, byte name_length)
|
||||
icon = ICON_FLOPPY_3_5; // Only a guess...
|
||||
else if (strcmp(mount_points_list->me_type, "ext2fs") == 0)
|
||||
icon = ICON_HDD; // Only a guess...
|
||||
else if (strcmp(mount_points_list->me_type, "hfs") == 0)
|
||||
icon = ICON_HDD; // Only a guess...
|
||||
|
||||
if(mount_points_list->me_dummy == 0 && strcmp(mount_points_list->me_mountdir,"/") && strcmp(mount_points_list->me_mountdir,"/home"))
|
||||
{
|
||||
Add_element_to_list(list, mount_points_list->me_mountdir,
|
||||
Format_filename(mount_points_list->me_mountdir, name_length, 2), 2, icon);
|
||||
Format_filename(mount_points_list->me_mountdir, name_length + (icon==ICON_NONE?0:-1), 2), 2, icon);
|
||||
list->Nb_directories++;
|
||||
}
|
||||
next = mount_points_list -> me_next;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user