Skip to content

Suggestions for improving FileDialog (filtering) #33

@GoogleCodeExporter

Description

@GoogleCodeExporter
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

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions