Re: File chooser API for formats in Save mode
- From: Jody Goldberg <jody gnome org>
- To: Federico Mena Quintero <federico ximian com>
- Cc: GTK+ development mailing list <gtk-devel-list gnome org>
- Subject: Re: File chooser API for formats in Save mode
- Date: Tue, 24 Feb 2004 09:47:15 -0500
On Mon, Feb 23, 2004 at 05:18:45PM -0600, Federico Mena Quintero wrote:
> Hi,
>
> Seth's new design for the file chooser calls for a combo box that
> displays available formats for saving:
>
> http://www.gnome.org/~seth/filechooser-spec/
>
> We need an API for that. My proposed API is this:
>
> void gtk_file_chooser_add_save_format
> void gtk_file_chooser_remove_save_format
> void gtk_file_chooser_set_save_format
> gint gtk_file_chooser_get_save_format
A few things.
1) Couldn't we just use a TreeModel and supply a minimum set of
required fields ? That would give apps more flexibility to store
related things (eg a pointer to a handler)
2) Seth's design seems to mandate using a simple combo for the
types. That list an get fairly large and I've actually been
meaning to move to something that supported nested types.
Excel -> XP/2000/97
95
XP/2000/97 and 95
HTML -> XHTML
HTML 4
Configurable
TeX -> LATeX
...
And obviously a recently used feature would be added by apps.
As an extension for Seth to consider we've had a few situations
where users want to save the parameters associated with a recent
export (eg save as text with some seperator, and specific quoting
convention). Then reuse the config as if it were a new type.
There should be room to display those too.
3) As noted in other messages handling extensions smoothly would be
nice.
3.1) We should display filename == 'foo' rather than 'foo.xls'
if the extension matches the extension for the currently
selected type. Do we really need more than one extension
per type ? An xls is different from an xlt
3.2) If a user enters foo.gnumeric the type should change to
reflect that, and the extensions should be visible (to
avoid them typing and having the text disappear)
The gimp and gnumeric handle this differently right now.
We define a type 'auto' and only do suffix based selection
when that is enabled. Otherwise we use the selected type
with the entered suffix, and check that the chosen suffix
does not match another type. (saving foo.foo is ok, but
saving foo.xls in gnumeric format is not)
3.3) Be wary of completion. Right now if there is are files
foo.xls and foo.gnumeric in the target directory and we
enter a name of 'foo' the dialog tries to complete and
displays foo<highlight>.</highlight>
> The file chooser would show the large_icon as the selected item in the
> combo, and the small_icons in the actual popup menu.
Presumably we could easily pass one or the other and get things
scaled ?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]