Re: File selector talk writeup



On Sat, Feb 15, 2003 at 12:28:17PM -0500, Ettore wrote:
> On Fri, 2003-02-14 at 11:46, Owen Taylor wrote:
> > A mime type spec is one of the most important things that needs
> > to be standardized by freedesktop.org (crucial for ISVs). At 
> > that point, putting MIME type sniffing in the GTK+ stack wouldn't
> > be unreasonable.
> 
> Yeah, but it would duplicate a lot of functionality with GNOME VFS...
> 
> Maybe there is a way to push the MIME type handling part of GNOME VFS
> down the stack so GTK can depend on it?  Maybe it could go into GLib?

Pushing sniffing that far down has some nice elements, but will
create tension with the different use cases.  For something like
nautilus you can trade accuracy for speed, it absolutely must be
able to churn through lots of files.  For document-centric apps the
trade off is reversed.  The application needs to make the best
possible guess about what type of file it needs to open.  It can do
plenty of preprocessing for that single data blob.

To add to the fun the prevalence of extension based typing makes it
useful to be able to guess which mime type a user means based solely
on extension.  For example a 'Save As' dialog defaults to type
'auto' and does the right thing when a user enters foo.xls.

Couple in the difficulty of pinning down some common types, strictly
by file-magic headers and it seems like this is a morass that would
ideally be handled separately from the file dialog.

I hope to do some work on sniffing in libgsf at some point.



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