MIME Activation

David Faure dfaure at trolltech.com
Tue Apr 22 15:57:03 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 14 April 2003 12:45, Angus Lees wrote:
> the way this has been dealt with in the past was for apps to ignore
> mailcap for certain mime types.  a typical example is netscape
> (version 4 and earlier at least) which had:
> 
>   certain mime types marked as "internal" which it handled internally
>   (text/html, image/gif, etc of course, also other formats supported
>   by plugins) without consulting mailcap files,
> 
>   a gui for users to define overrides (which it wrote out to
>   ~/.mailcap),
> 
>   and then would fallback to the system /etc/mailcap

Sounds awful to me ;)

Really, this is much too specific to apply to the "karbon can import PS" issue.
It doesn't help opening a file from a file manager, since it wouldn't know about
those "internal" associations. (Konqueror doesn't only launch the most
preferred app when left-clicking, it also offers all associated applications
in the RMB popup menu, that's one of the differences with most applications
that use /etc/mailcap).

> > So my request would be that there is an "initial preference" number
> > per application+mimetype combination.
> > Then we could say things like:
> > Karbon+application/x-vnd.kde.karbon = 10
> > Karbon+application/postscript=2
> > KGhostview+application/postscript=10
> 
> if this does have to be user configurable beyond the above simple
> mechanism, i'd be inclined to just have mailcap files specific to such
> apps, which was inserted in the search order before the normal
> mailcap.

How does that help, when clicking on a file in the file manager?
It needs to access this information too.

> users could even achieve something similar on a case-by-case basis by
> setting MAILCAP appropriately before running the app.

Sounds very user friendly ;)

> i would hope the need for such complicated setups is rare.

I'm afraid you are wrong about that. It happens every time someone
clicks on a .ps file in KDE, for instance. It happens for every application that
can import files that are not of its native format (like plain text in a word
processor, or the above PS-file-in-karbon case). Although you want to
let the user choose to do that, you still want to ensure that the default
binding for such files is a better handler (e.g. text editor or PS viewer 
respectively). This is why the initial preference applies to an application+mimetype
couple, not only to an application.

- -- 
David FAURE, faure at kde.org, sponsored by TrollTech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
How to write a Makefile.am for KDE/Qt code:
http://developer.kde.org/documentation/other/makefile_am_howto.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+pVg/72KcVAmwbhARAnUhAJwORFiaedKkqLnuM0KpkDuEUeHQlwCgpSWG
ZFYqRCbKin8F6PkAH3Jd63o=
=vjTo
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list