It would be nice if the FileDialog could provide a simple filtering mechanism.
I have attached two patches to do this.
The first patch provides a very simple and crude filter mechanism (simply set
path_filter to a function that returns a bool - True => file/dir is shown,
False => it is hidden).
The second patch extends this to provide an file-extension filter by accepting
a simple list as argument for the constructor. Example being:
ext_f = [
("Images", ("jpg", "jpeg", "png")),
("Audio", ("mp3", "wav")),
("Text files", "txt"),
]
dialog = FileDialog(value="path/to/resources", ext_filter=ext_f)
The user can then choose the relevant filter from a "drop-down" box (a Select
in pgu terms).
Original issue reported on code.google.com by NThykier@gmail.com on 7 Dec 2012 at 1:09
Original issue reported on code.google.com by
NThykier@gmail.com
on 7 Dec 2012 at 1:09Attachments: