Icons for new mime-types.

The dedicated forum for PCMan File Manager - http://wiki.lxde.org/en/PCManFM
Locked
johnfound
Posts: 6
Joined: Mon Jun 03, 2013 6:44 pm
Contact:

Icons for new mime-types.

Post by johnfound »

I want to register new mime-types for my program. So, I created needed .xml files:

x-asmsrc.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="text/x-asmsrc">
  <comment>ASM source code</comment>
  <glob pattern="*.asm"/>
  <glob pattern="*.inc"/>
  <glob pattern="*.frm"/>
</mime-type>
</mime-info>
and
x-freshproject.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-freshproject">
  <comment>Fresh IDE project</comment>
  <magic priority="50">
    <match type="string" offset="0" value="FNPr\r\n\x1a\n" />
  </magic>
  <glob pattern="*.fpr"/>
</mime-type>
</mime-info>
I have two icon files as well: x-asmsrc.png and x-freshproject.png

Then I am calling:

Code: Select all

xdg-icon-resource install --context mimetypes --size 16 ./x-asmsrc.png text-x-asmsrc
xdg-icon-resource install --context mimetypes --size 16 ./x-freshproject.png application-x-freshproject
and then

Code: Select all

xdg-mime install x-asmsrc.xml
xdg-mime install x-freshproject.xml
As a result, these two mime types are properly installed and used when the file type is displayed in the file manager (any). I can assign default application and the files are properly opened on double click, etc.

But the problem! In PCManFM, only application/x-freshproject files are displayed with the proper icon. text/x-asmsrc are displayed with the generic text file icon.
In other file managers tested the text/x-asmsrc files are displayed with the correct icon "x-asmsrc.png" icon.

What are the reasons for such behavior? What I can make to fix it?

Regards
LStranger
Posts: 49
Joined: Sat Nov 05, 2011 5:48 pm

Re: Icons for new mime-types.

Post by LStranger »

What version of pcmanfm do you use? Check if you use stable version, preferable last released one.
Locked