Re: File chooser API for formats in Save mode

On Mon, 23 Feb 2004 23:18:57 -0500, Havoc Pennington wrote:

> On Mon, 2004-02-23 at 18:18, Federico Mena Quintero wrote:
>> void gtk_file_chooser_add_save_format (GtkFileChooser *chooser,
>> 				       gint            id,
>> 				       const gchar    *name,
>> 				       GdkPixbuf      *small_icon,
>> 				       GdkPixbuf      *large_icon);
> This is the sort of function that always ends up having
> add_save_format_with_foo() to get more arguments - maybe varargs or a
> struct would be a good idea, or perhaps it's overkill.
> Shouldn't the icon be themeable...
> Perhaps use a MIME type string instead of an ID? Perhaps knowing the MIME
> type is even useful somehow.

Yep. From the MIME type you can get to a textual description of the type
(translated for the user's language), a themed icon (using the icon theme spec) and even a list of file extensions for
that type (to change the type as you type, if that's what you want).

> Hmm, with gnome-vfs can't you derive the name and icon from a MIME type
> name (wouldn't you want to, rather than putting the icon in every app?)

Also using the shared MIME database and the icon theme spec, assuming we
don't want a GNOME dependency for GTK:


(scroll right to the bottom of the first link to find the mapping from
MIME names to icon names)

Thomas Leonard
tal00r at	tal197 at
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1

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