Re: handling of mime-types wrote:

> On Mon, 3 May 1999, Nathan Clegg wrote:
> > I am writing an application which interprets some mime types.  I want to
> > use the default and user-defined mime-types and handlers found in the
> > gnome control center.  I am confused as to the layout of files in the
> Why not just use one of the mime funcions provide in gnome-libs (from
> libgnome/gnome-mime.h):
> const char  *gnome_mime_type                    (const gchar* filename);
> const char  *gnome_mime_type_or_default         (const gchar *filename,
>                                                  const gchar *defaultv);
> const char  *gnome_mime_type_of_file            (const char *existing_filename);
> const char  *gnome_mime_type_or_default_of_file (const char
> *existing_filename,
>                                                  const gchar *defaultv);
> const char  *gnome_mime_type_from_magic         (const gchar *filename);

I also was in need of this info.  All this works great (ie. I can get the app and
the mime-type), but now I want to take the mime associated action.  All I can find
are the libgnome/gnome-exec commands which seem to require parsing on my part (ie.
looking for the %f in the command line and replacing it, calling based on whether
the prog needs to run in a shell).   Is there a function somewhere that will take a
file name and execute the mime associated app all in one go?


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