Re: File selector talk writeup



Hi Owen,

On Wed, 2003-02-12 at 12:23, Owen Taylor wrote:
> http://people.redhat.com/otaylor/fosdem2003/file-selector.html
> 
> Has a writeup of the talk I gave on Sunday at FOSDEM.

Hi Owen,

thanks for posting this, it is very nice.

I think I agree on almost everything you wrote, but I have a few
comments/questions on my own...

* Filtering.

  I don't think much freedom should be given to the programmer in
  this.  The dialog API should either go the OS X way (specify what 
  types are allowed to be selected, and only show files of those 
  types to the user), or the Windows way (specify a set of groups 
  of types like "JPEG files", "PNG files", "Image files" etc and 
  let the user pick).  Of course, the user should be allowed to do
  pattern-based filtering, but I don't see a reason to make that
  programmatically controlled.

  Allowing the programmer to make complicated custom filters (e.g.
  via merging simple filters or allowing filter callbacks) is
  unnecessary, and also increases the chance that the programmer does
  something unexpected and confusing (we know how we are).

  Besides, if one really wants total customization, it is possible
  to write a different implementation for the underlying "file system"
  interface.

  (Also, the filter probably makes the most sense in the Open dialog 
  and slightly less sense in the Save dialog, and I think I like the 
  OS X way of filtering more than the Windows way.)

* Addition of simple controls

  It is mentioned in the writeup that it should be possible to add a
  simple control like "Open read-only" to the dialog.  But custom
  widgets in the file chooser are kinda evil (since they end up being
  inconsistent across applications, and programmers like to do any
  sorts of funny things with them); so it would probably be better
  come up with a more strict interface than "add a control to the
  no-constraints zone".

  For example, we could lock down what kinds of controls are allowed
  go there and add specific interfaces for them, without allowing any
  further customization.  Right now I can only think of two: "open
  read only" (for the open dialog) and "save in format X" (for the
  save dialog).  I'd like the API to have explicit calls to handle
  these cases, but no fancy do-it-yourself hooks.

* Other things

  - Is it really necessary to have a separate, embeddable version of
    the dialog (i.e. the GtkWidget) instead of just the GtkDialog?  I
    can't think of a sane reason why you would want to embed it, so
    I'd stick with just the GtkDialog myself...

  - MIME types.  How is a GtkFileChooserSimple going to know about the
    file types?  Adding something to do MIME type recognition in GTK
    doesn't sound fun nor good.

  - There should be a special mode for selecting directories.
    (Although, the Windows custom of using a tree control is probably 
    not a good idea.)

  - For bookmarks and recent directories, we probably need specs on
    freedesktop.org?

* Helping out

  What is the best way to help at this point?  Would it be helpful if
  I started to write up some APIs?

-- Ettore



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