Re: GtkFileChooser filter API
- From: Owen Taylor <otaylor redhat com>
- To: Michael Meeks <michael ximian com>
- Cc: Gtk Hackers <gtk-devel-list gnome org>
- Subject: Re: GtkFileChooser filter API
- Date: 21 Jul 2003 16:07:36 -0400
On Fri, 2003-07-18 at 04:26, Michael Meeks wrote:
> On Thu, 2003-07-17 at 21:50, Owen Taylor wrote:
> > void gtk_file_filter_add_custom (GtkFileFilter *filter,
>
> ...
>
> > 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.
>
> So - I'm not sure that having a callback API is an incredibly massive
> problem for a component based solution - there are several ways to make
> it more efficient - by chunking the filenames for the IPC. I would
> however prefer to minimise the use of it by ensuring it's not the only
> way.
Certainly, I don't want it to be the only way ... if nothing else,
it's not a convenient way to write it for the application programmer.
[...]
> Also given the proliferation of duplicate mime types for the same file
> type, it's nice to have (as you suggest):
>
> GtkFileFilter *filter = gtk_file_filter_new ();
> gtk_file_filter_set_name (filter, "an Excel spreadsheet");
> gtk_file_filter_add_mime_type (filter, "x-application/excel");
> gtk_file_filter_add_mime_type (filter, "x-vnd/foo-excel");
This is probably mostly useful if you have the MIME type coming over
the file access protocol; when the backend is actually sniffing
directly, we should will get fairly predictable MIME type names.
> etc.
>
> Having said that - making the common case easier for your users implies
> that gtk+/glib has to do the foot-work to ensure that the mime-type is
> actually correct / exists [ but presumably it's better for gtk+ to get
> that right than the user to suffer ].
The way that the two backends now in CVS do it are:
- Unix backend - uses the emerging freedesktop.org MIME type spec.
- gnome-vfs backend - ask gnome-vfs.
When gnome-vfs is switched over to the freedesktop.org spec, these
should hopefully give more or less identical results. The main possible
reason why they wouldn't be the same is different decisions as
whether to MIME-sniff contents.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]