1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 11:46:14 +02:00

FileDialog must only pick regular files.

Thanks to Ayla for finding and fixing.
This commit is contained in:
Maarten ter Huurne 2010-07-26 04:43:03 +02:00
parent 4738f4b232
commit 1237c59cfe
2 changed files with 10 additions and 0 deletions

View File

@ -42,3 +42,12 @@ FileDialog::~FileDialog()
{
delete fl;
}
bool FileDialog::exec() {
bool ret = BrowseDialog::exec();
if (ret && fl->isDirectory(selected)) {
// FileDialog must only pick regular files.
ret = false;
}
return ret;
}

View File

@ -33,6 +33,7 @@ public:
FileDialog(GMenu2X *gmenu2x, const string &text, const string &filter="",
const string &file="", const string &title = "File Dialog");
virtual ~FileDialog();
bool exec();
};
#endif /*INPUTDIALOG_H_*/