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:
parent
4738f4b232
commit
1237c59cfe
@ -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;
|
||||
}
|
||||
|
@ -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_*/
|
||||
|
Loading…
Reference in New Issue
Block a user