Bug 171538

Summary: "Open with" should be by file type first, mime type as fallback
Product: [Frameworks and Libraries] kdelibs Reporter: mcas <kubuntu>
Component: generalAssignee: David Faure <faure>
Status: REPORTED ---    
Severity: wishlist CC: faure, woebbeking
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description mcas 2008-09-23 16:56:59 UTC
Version:            (using KDE 3.5.10)
OS:                Linux
Installed from:    Ubuntu Packages

This wish was reported on the ubuntu bug tracker under: https://bugs.edge.launchpad.net/ubuntu/+source/kdebase/+bug/139346

Often MIME types are incorrect on files, especially XML files. For example, an OPF file (which is part of many digital books) is an XML file, but is often encoded as text/plain. I want to open it with kxmleditor (always), so I right click, "open with", and choose ~"always do this" so that any time I click on an OPF again it opens in kxmleditor. This is fine, but now all of a sudden ALL text/plain files open in kxmleditor (even foo.txt, etc). This is clearly wrong, and counterintuitive. Even if the mime type *is* correct, there are different kinds of XML (for example) that I might want to open in different applications.

I think the strategy should be that "open with" looks to see if it has a mapping for the file type *first*, and then only secondly at the mime type. Additionally, when you click "always do this", there should be a dialog that says:

Which of the following should always be opened with _kxmleditor_:
[ ] all text files
[X] all .opf files

[Save] [Cancel]
Comment 1 David Faure 2008-11-27 13:57:03 UTC
Yes, we should dynamically create a mimetype if the current extension isn't known.