Bug#629105: hydrogen: Purports to handle SVG files
Petter Reinholdtsen
pere at hungry.com
Thu Jun 2 19:43:12 UTC 2016
[Torquil Macdonald Sørensen]
> For a general *.xml file, I'd expect that the mest sensible would be that the
> file manager only proposes to open it in text editors, specialized XML viewers
> and editors. And there is nothing a file manager can do to avoid proposing to
> open such files in Hydrogen as long as the line MimeType=text/xml is in
> hydrogen.desktop?
I had a look at this, and with xfce today in testing, hydrogen is not proposed
as a application to use to open its own files when marking it in the file
manager. I believe this is a bug and related to the issue in this bug request.
When running 'file --mime-type' on a .h2song file, the mime type returned is
application/xml. This mime type is not listed in the hydrogen.desktop file.
But instead of just replacning text/xml with application/xml in the desktop
file, I propose to add a new file under /usr/share/mime/ specifying a mime
type for files ending in .h2song, and list this new mime type in the desktop
file.
The /usr/share/mime/packages/rosegarden.xml file look like this:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="audio/x-rosegarden">
<sub-class-of type="application/x-gzip"/>
<comment>Rosegarden project file</comment>
<glob pattern="*.rg"/>
</mime-type>
</mime-info>
I am not sure if there is a well known MIME type already for hydrogen h2song,
but if it is not, perhaps audio/x-hydrogen-song would work? Then I guess
something like this should go into /usr/share/mime/packages/hydrogen.xml:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="audio/x-hydrogen-song">
<sub-class-of type="application/xml"/>
<comment>Hydrogen Drum Machine project file</comment>
<glob pattern="*.h2song"/>
</mime-type>
</mime-info>
And the audio/x-hydrogen-song value be added to the hydrogen.desktop file.
--
Happy hacking
Petter Reinholdtsen
More information about the pkg-multimedia-maintainers
mailing list