A proposal for the behavior of the new MIME system in GNOME
Proposed user tasksThe MIME system for GNOME should focus on solving the following common user operations:
Axioms of the MIME systemThe MIME system is based on the proposed system at www.freedesktop.org. The current version, version 0.12, has pretty good traction on the lists, and will definitely be usable by the time GNOME 2.6 is released. The spec only covers determining the MIME-type from the file. There are a few proposals for the mapping of MIME-types to applications, but no formal start of a specification yet. I expect that this specification will involve placing supported MIME-types directly in each application's desktop file, as there is some consensus that this is the right way to do this.
As we need to have some idea of the constraints within which we design the user experience, I'm listing some of the rules we know we must work with.
Nautilus and the Context menu
The most common way a user opens a file will be to activate it in a nautilus pane, either by double clicking it, or pressing the enter key. This will open the application in the primary application. Additionally, the user can bring up the context menu and select the first menu item. This item should read: Open with <PRIMARY>, where <PRIMARY> is the human visible name of the application. This may need some reworking to get the wording translatable.
It is expected that most mime-types won't have many applications associated with them. In the common case, where there are fewer than four applications, we propose to put the applications in the main context menu. These items will be alphabatized, to keep the sorting stable. Here's an example of a menu with three items:
In the cases where there are a four or more applications associated with a particular file, a submenu will appear with all of the available applications. It will also be sorted alphabetically. At the bottom of the submenu is a separator, followed by an "Open With Other Application..." menu item. Here's an example of a menu with six items:
In the case where there is no known handler for the file, then the primary application is the "Open With Other Application..." menu item.
Change Default Application for a MIME-type
To change the default 'Open' application for a MIME-type, a tab will be added to the properties dialog of a file. This tab would have a list of all the known applications for that file's MIME-type. You could select one of the applications as the primary one for the MIME-type. As an example, here's what it could look like:
Additionally, there are 'Add' and 'Remove' buttons available to let the user add a type. It is expected that this won't be a common operation. The 'Add' button will bring up a dialog very similar to the 'Open with...' dialog the remove button will only allow you to remove applications that the user has added.
This is a small change from the rest of the property pages, as it is global in scope instead of just applying to that particular file. In other words, changing the default application of one particular MIME-type will effect all files of that type. The current "File types and programs" dialog will go away.
As this may seem a little strange to long-time GNOME users, some further rationalization might be necessary. The goal here is to hide the mechanics of the MIME system as much as possible. Rather than use the current approach of having actions on a MIME-type we make it an action on a file. Fundamentally, users don't think in terms of MIME-types and this design reflects that.
Open With Other Application
The "Open with other application..." dialog is launched from the both the context menu. It lets the user open a file with an application that isn't normally associated with the mime-type of this file, and is essentially identical to the one launched by the properties dialog when adding a new application.
The application used by this dialog to open the file will then be added to the list of available applications (if it is unique), and will be available in the context menu next time. It will not be made the default application unless there are no other applications that can handle that files MIME-Type available. It can be removed via the file's property box.
As a random side thought, it might be cool to integrate this with the 'Run dialog' a little. As an example, if you select some files in nautilus and press the keybinding to bring up the 'Run dialog', it would instead bring up the 'Open with...' dialog.
Unknown type filesIf the type of a file is application/octet-stream, we auto generate a type of application/x-extension-<EXTENSION>. If the file doesn't obviously have an extension, we use the filename. Note that only binary files will get this. All files who's first 256 values are valid UTF-8 will be listed as text/plain. Additionally, opening files of an unknown type will bring up the 'Open with...' dialog.
Other Operating SystemsFor comparison, here are screenshots of the MIME dialogs for two other common operating systems.