Sorry, I don't know if it's possible with Linux.
But even for Windows, having the same functionality for the Lazarus version of the TOpenDialog class requires some additional code.
[...]
Yes, it definitely would need considerable extra code, and as you point out, it looks like it even works in different ways across different versions of Windows.
I think it should be reported as a feature request.
The implementation does not depend on OS (Linux) but on widgetset (GTK2, QT, etc.). I don't know how well the dialogs of each widgetset support this filtering.
A patch that implements it for even one widgetset would be nice. The other widgetsets can be added later.
Good point. Although I'm not sure either wether that's a feature that every widgetset supports

(which may mean it's undoable in the LCL I guess).
So with content you mean, for instance, all xml files (or rather text files with markup encoding) within a directory irrespectively from the filename? I've never seen such a dialog. And as a user I'd expect a dialog with filter option, maybe fuzzy in terms of 'all picture' which is filter='*.png|*.bmp|*.jpg', but with the opportunity to show all files. Wouldn't your users be confused when content is only shown partially? That's why I think your ides is an "abuse". Of course, it depends on scope, audience, and expertise. Alternatively you could create your own file dialog that is clearly discriminated from the standard dialog.
With content I mean peeking into the file, using
file magic so to speak, in the XML example I might read the first five bytes and decide it's being included in the list if they're
<?xml.
Look at Revelation, for example, to see such a dialog; but you won't notice any difference with a
traditional dialog. It has two filters: "Revelation files", which shows files with the appropriate MIME type, no matter what their extension is, and "All files", which of course shows all files.
Continuing with your examples, imagine an "all picture" filter that was 'filter=*.*', when such a filter was selected, the OpenDialog would get a list of all the files in the directory, and would be able to allow or reject each file based on their contents (e.g. if the JPEG has extension JPE or JPEG -both
valid-, they'd also be included). Of course there would be an "all files" filter that would show every single file, everyone expects that

EDIT:
I would agree with outlyer. Such filter would be helpful. Though there is a convention to name JPEG files with using .jpg "extension", it is not required. Many "formatted" files have a "magic word" inside that tells about their format better than the extension tells.
So, a filter would look 'Image files', 'JPEG, PNG, BMP, GIF, TIFF...'.
Well, you beated me to that answer
