Re: GtkFileChooser filter API
- From: Arnaud Charlet <charlet ACT-Europe FR>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list gnome org
- Subject: Re: GtkFileChooser filter API
- Date: Fri, 18 Jul 2003 08:25:27 +0200
> This is a bit conceptually cleaner and you could even allow custom
> derivation from GtkFileFilter if you did that. I'm not sure it's worth
> the complexity however.
Having to do a derivation to add its own non pattern filter looks heavy.
> A different way to allow custom filters without the derivation
> thing going on would be:
>
> ===
> gboolean (*GtkFileFilterFunc) (const gchar *filename,
> const gchar *uri,
> const gchar *mime_type,
> gpointer data);
>
> void gtk_file_filter_add_custom (GtkFileFilter *filter,
> GtkFileFilterFunc func,
> gointer data,
> GDestroyNotify notify);
That's a more classical C approach indeed.
> Any sort of custom filter system will cause difficulties for
> an out-of-process implementation of GtkFileChooser; that's not
> something I'm particularly interested in, but there have been
> requests to leave the possibility open for the future.
There is clearly a need for having custom filters, and I don't see how
the pattern or mime type params address this need. For instance, a filter
may very well need to read parts of the contents of a file to decide
whether the file matches some specific criteria (e.g. presence of some
specific function name in a specific language file).
Arno
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]