.CtrlLib: FileSel X11 added media

git-svn-id: svn://ultimatepp.org/upp/trunk@2222 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-03-12 16:20:12 +00:00
parent 873c43aa3b
commit c3dbe9ed80

View file

@ -1359,7 +1359,7 @@ void FileSel::Serialize(Stream& s) {
netstack.Clear();
}
#endif
int version = 7;
int version = 9;
s / version;
String ad = ~dir;
s / activetype % ad;
@ -1391,7 +1391,12 @@ void FileSel::Serialize(Stream& s) {
s % sortext;
}
if(version >= 6) {
s % splitter;
if(version >= 9)
s % splitter;
else {
Splitter dummy;
s % dummy;
}
}
if(version >= 7) {
s % hidden;
@ -1523,6 +1528,14 @@ FileSel& FileSel::AddStandardPlaces()
AddPlace(root[i].filename, desc);
}
}
#ifdef PLATFORM_POSIX
root = filesystem->Find("/media/*");
for(int i = 0; i < root.GetCount(); i++) {
String fn = root[i].filename;
if(*fn != '.' && fn.Find("floppy") < 0)
AddPlace("/media/" + fn, fn);
}
#endif
#ifdef PLATFORM_WIN32
AddPlaceSeparator();
AddPlaceRaw("\\", CtrlImg::Network(), t_("Network"));