This is my first foray into mime-types. I am trying to add a new .xml file to
/usr/share/mime/packages:

=====================================================================================
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>

        <mime-type type="text/x-matlab">
                <comment>MATLAB script/function</comment>
                <sub-class-of type="text/plain"/>
                <magic priority="10">
                        <match value="%" type="string" offset="0"/>
                </magic>
                <magic priority="50">
                        <match value="function" type="string" offset="0"/>
                </magic>
                <glob pattern="*.m" weight="60"/>
                <alias type="text/x-octave"/>
                <generic-icon name="matlab-m"/>
        </mime-type>

        <mime-type type="image/x-matlab-fig">
                <comment>MATLAB figure</comment>
                <magic priority="50">
                        <match value="MATLAB" type="string" offset="0"/>
                </magic>
                <glob pattern="*.fig" weight="60"/>
                <generic-icon name="matlab-fig"/>
        </mime-type>

        <mime-type type="application/x-matlab-data">
                <comment>MATLAB data file</comment>
                <magic priority="50">
                        <match value="MATLAB" type="string" offset="0"/>
                </magic>
                <glob pattern="*.mat" weight="60"/>
                <generic-icon name="matlab-mat"/>
        </mime-type>

</mime-info>
=====================================================================================

1) Is it "legal" to define text/x-matlab here since it's already in freedesktop.org.xml? If so, am I adding to the definition, or completely overriding it? Which def would take priority?

2) I'm having trouble with the generic-icon feature. My icon for the .mat file works fine, but the icons for .m and .fig files are not working. The icons are in /usr/share/icons/hicolor/{16x16...256x256}/mimetypes/*.png.
_______________________________________________
xdg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xdg

Reply via email to