mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Merge branch 'hide-hidden-files' of https://github.com/agateau/aseprite into agateau-hide-hidden-files
This commit is contained in:
commit
15618c4fde
@ -84,6 +84,7 @@ public:
|
||||
|
||||
bool isFolder() const;
|
||||
bool isBrowsable() const;
|
||||
bool isHidden() const;
|
||||
|
||||
std::string getKeyName() const;
|
||||
std::string getFileName() const;
|
||||
@ -313,6 +314,17 @@ bool FileItem::isBrowsable() const
|
||||
return is_folder;
|
||||
}
|
||||
|
||||
bool FileItem::isHidden() const
|
||||
{
|
||||
ASSERT(this->displayname != NOTINITIALIZED);
|
||||
|
||||
#ifdef _WIN32
|
||||
return false;
|
||||
#else
|
||||
return this->displayname[0] == '.';
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string FileItem::getKeyName() const
|
||||
{
|
||||
ASSERT(this->keyname != NOTINITIALIZED);
|
||||
|
@ -68,6 +68,7 @@ namespace app {
|
||||
|
||||
virtual bool isFolder() const = 0;
|
||||
virtual bool isBrowsable() const = 0;
|
||||
virtual bool isHidden() const = 0;
|
||||
|
||||
virtual std::string getKeyName() const = 0;
|
||||
virtual std::string getFileName() const = 0;
|
||||
|
@ -497,7 +497,9 @@ void FileList::regenerateList()
|
||||
it=m_list.begin();
|
||||
it!=m_list.end(); ) {
|
||||
IFileItem* fileitem = *it;
|
||||
if (!fileitem->isFolder() &&
|
||||
if (fileitem->isHidden())
|
||||
it = m_list.erase(it);
|
||||
else if (!fileitem->isFolder() &&
|
||||
!fileitem->hasExtension(m_exts.c_str())) {
|
||||
it = m_list.erase(it);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user