Re: GNOME and the File selection dialog box




On Sat, 29 Aug 1998, Miguel de Icaza wrote:
> 
>      - Optionally let the programmer provide a number of recognized
>        file types to load.  Probably just a list of extensions that
>        the program recognizes.
>

Why not take a cue from Scheme and let the programmer pass in a filter
function?

typedef gboolean (*GnomeFileFilter) (const gchar*);
 
Then provide a default that checks against a regexp.

>      - Provide a way for the programmer to specify an
>        auto-type-select- upon-user-selecting-file feature.  By default
>        we could provide a callback that would do regexp matching on
>        the file, if the user clicks on a file with a ".jpg" extension,
>        we would auto-select "JPEG file (*.jpg)" on the file type
>        region. 
>

Here you could have a "file_selected" signal that takes the filename as
arg... then the programmer could update the preview, set the file type
menu, etc. in a callback.
 
Sounds cool.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]