mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-27 10:36:27 +02:00
The method FileLister::browse() now takes an optional boolean argument.
If set to "false", the previous list of files/directories won't be cleared when browsing another directory. It will allow us to have file choosers that list files contained on different directories.
This commit is contained in:
parent
3db5844f3c
commit
d8204706d7
@ -65,10 +65,12 @@ void FileLister::setFilter(const string &filter)
|
||||
this->filter = filter;
|
||||
}
|
||||
|
||||
void FileLister::browse()
|
||||
void FileLister::browse(bool clean)
|
||||
{
|
||||
directories.clear();
|
||||
files.clear();
|
||||
if (clean) {
|
||||
directories.clear();
|
||||
files.clear();
|
||||
}
|
||||
|
||||
if (showDirectories || showFiles) {
|
||||
DIR *dirp;
|
||||
|
@ -36,7 +36,7 @@ private:
|
||||
|
||||
public:
|
||||
FileLister(const string &startPath = "/boot/local", bool showDirectories = true, bool showFiles = true);
|
||||
void browse();
|
||||
void browse(bool clean = true);
|
||||
|
||||
unsigned int size();
|
||||
unsigned int dirCount();
|
||||
|
Loading…
Reference in New Issue
Block a user