Hi
I've hacked together a little program (attached) that creates freedesktop file type associations (eg. open .dev files with Dev-C++ when you double-click them in a file manager) from what Windows programs do in the registry (#13597).
Currently it works well, but has to be run explicitly to refresh the associations. Ideally we'd have something in Wine that automatically refreshes the associations when they change, but since they are done in the registry, what's the way to go here? Do it on every wineboot, or in some permanently running process (explorer?) that monitors the registry for changes?
Also what is a good way to invent a MIME type for an extension? Currently for a .ext extension I'm just using application/x-wine-ext.
Comments much appreciated. Damjan
On 15.01.2009 21:31, Damjan Jovanovic wrote:
Also what is a good way to invent a MIME type for an extension? Currently for a .ext extension I'm just using application/x-wine-ext.
For some extensions the system's fd.o mime database might already record a mime type. Perhaps you can somehow reverse lookup a mime type for an extension if none is specified in the registry.
-f.r.
2009/1/15 Damjan Jovanovic damjan.jov@gmail.com:
Hi
I've hacked together a little program (attached) that creates freedesktop file type associations (eg. open .dev files with Dev-C++ when you double-click them in a file manager) from what Windows programs do in the registry (#13597).
Currently it works well, but has to be run explicitly to refresh the associations. Ideally we'd have something in Wine that automatically refreshes the associations when they change, but since they are done in the registry, what's the way to go here? Do it on every wineboot, or in some permanently running process (explorer?) that monitors the registry for changes?
You could probably create it as a control panel applet. Here is the list of functionality that would be nice to see:
1. list and view the file types currently configured. 2. export the mime/file associations (selected and all) from Wine to the OS (your utility). 3. import mime/file associations (select/all) from the OS into Wine. 4. add, edit and remove entries from the Wine list.
I should be able to get a readme file from a Windows application opening in GEdit or GVim (3), as well as getting images opening in Photoshop (2).
Will it work to have more than one program associated with a mime type (e.g. Open with... Notepad, Notepad+, Visual Studio)?
Do you support different actions (e.g. some file associations register print, extract, etc. actions)?
Looks promising, - Reece
On Thu, Jan 15, 2009 at 11:14 PM, Reece Dunn msclrhd@googlemail.com wrote:
2009/1/15 Damjan Jovanovic damjan.jov@gmail.com:
Hi
I've hacked together a little program (attached) that creates freedesktop file type associations (eg. open .dev files with Dev-C++ when you double-click them in a file manager) from what Windows programs do in the registry (#13597).
Currently it works well, but has to be run explicitly to refresh the associations. Ideally we'd have something in Wine that automatically refreshes the associations when they change, but since they are done in the registry, what's the way to go here? Do it on every wineboot, or in some permanently running process (explorer?) that monitors the registry for changes?
You could probably create it as a control panel applet. Here is the list of functionality that would be nice to see:
- list and view the file types currently configured.
- export the mime/file associations (selected and all) from Wine to
the OS (your utility). 3. import mime/file associations (select/all) from the OS into Wine. 4. add, edit and remove entries from the Wine list.
I should be able to get a readme file from a Windows application opening in GEdit or GVim (3), as well as getting images opening in Photoshop (2).
We simply register a new MIME type and its filename extension, and then an application that opens that MIME type. It is the job of your desktop environment to configure the rest.
If the only handler for the new MIME type is the Wine application, that will become the default. If there is already another application for a given MIME type, the Wine app will be added to the right-click menu, but won't become the default until you configure it that way through some desktop-specific method (the "Open With..." option or the "Properties" menu or whatever).
Will it work to have more than one program associated with a mime type (e.g. Open with... Notepad, Notepad+, Visual Studio)?
Yes.
Do you support different actions (e.g. some file associations register print, extract, etc. actions)?
fd.o doesn't have a spec for that yet (http://www.freedesktop.org/wiki/Specifications/mime-actions-spec has been in the "requirements-gathering/early-planning" stage since at least 2004).
Explorer context menu integration (eg. "Extract" or "Create archive" for all file types) is a separate project, and neither fd.o nor the Portland project have any portable way to do that between different file managers and desktops yet. Some of these explorer integration apps also use shell namespace extensions, which would require major work to support (embedding Wine into file managers and the like).
Looks promising,
- Reece
Thank you Damjan