FileListComponent

i,m using the FileListComponent and i noticed that on windows the directories and files are sorted mac style, all mixed. i could not find a magic method in FileListComponent or in DirectoryContentsList that would sort this, or am i going to have to do this dirty work? :wink:

also i need to be able to drag files from the browser, i guess i need to sub class the FileListItemComponent to do this? i have not looked at drag and drop so i gues i should do that first …

It’s commented-out, line 225 of DirectoryContentsList.cpp. I couldn’t decide which way to do it, but perhaps conditionally compiling that bit on windows might be a good idea.

And yes, you’ll need to do some custom jiggery-pokery to enable dragging and dropping.

#ifdef JUCE_WIN32
	if (first->isDirectory != second->isDirectory)
        return first->isDirectory ? -1 : 1;
#endif

works like a charm :wink:

on the linux side, the order seems to be like the alphabetical order. there will be an option to let the user decide in which order to sort the files ? also in linux side when i open up my home, i have to browse all my dot files (that are hidden on linux) before i can reach the real visible files. could be good to have an option here also to select hidden files to be sorted as well (taking into account the platform of course)…

yep, those would all be good options…