From kde-core-devel Mon Apr 08 09:36:04 2002 From: Marc Mutz Date: Mon, 08 Apr 2002 09:36:04 +0000 To: kde-core-devel Subject: Re: mimetypes for zipped files X-MARC-Message: https://marc.info/?l=kde-core-devel&m=101827045320859 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday 07 April 2002 11:50, aleXXX wrote: > It would be for most cases enough if we had only typical cases, like > [gb]zipped man pages, info pages, texts, maybe html files. > > Do you have another suggestion which can be implemented without major > problems for KDE 3.x ? Recognizing that compression is an encoding and not a mime type, I'd suggest that KMimeType be amended with static methods findEffectiveByFoo( QString & variant, ... ) for every findByFoo( ... ), where "variant" is a compression or other encoding applied to the data and the mimeType returned is the "inner" type. So findByPath( "hello.html.gz", 0, true, true ) returns "application/x-gzip" while findEffectiveByPath( variant, "hello.html.gz", 0, true, true ) would return "text/html" and variant == "x-gzip". This is backwards compat with existing programs and BC. For KDE 4, the old findByFoo methods should be removed from the API and the findEffectiveByFoo be renamed to findByFoo. This makes it possible to have per-variant overlays for icons. It also gets rid of the problem that backup files are not properly recognized and prompt the user with "open with..." when clicked. Just use variant == "x-backup-file". Another thing that is badly needed is allowing aliases for mimetypes. That one should be pretty easy. So x-world/x-vrml would be an alias for the (preferred) model/vrml and text/xhtml would be an alias for text/xhtml+xml. That would smooth the transition from "x-" mimetypes to "vnd." mimetypes where it has already been done (IIRC e.g. MSWord has both). And a last thing that falls into the "nice to have (for KMail)" realm: having queryable default cte's per mimetype. - -- Marc Mutz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8sWSE3oWD+L2/6DgRAuUkAJ4rg9BukiLOpsigRLezNKUA+LJDvwCdGotQ YsHp0dlZ1gvYFD3iFMCu38w= =yu3r -----END PGP SIGNATURE-----