I noticed an additional problem, and fundamentally it is a design problem in the xdgmime library. The order in which icons should be checked is as follows:
- XDG icon specified by the user
- specific mimetype icon
- legacy specific mimetype icon (gnome-mime-...)
- XDG generic icon
- foo-x-generic
The problem is that there is no way to tell what we actually get from XDG - whether it is an user override or a generic icon. My fix will unfortunately cause XDG generic icons to always be ignored, beacuse the name from the generic-icons file is only returned if there's no name defined in the icons file. I don't know how to fix this properly yet, but I'll work on this.
I noticed an additional problem, and fundamentally it is a design problem in the xdgmime library. The order in which icons should be checked is as follows:
- XDG icon specified by the user
- specific mimetype icon
- legacy specific mimetype icon (gnome-mime-...)
- XDG generic icon
- foo-x-generic
The problem is that there is no way to tell what we actually get from XDG - whether it is an user override or a generic icon. My fix will unfortunately cause XDG generic icons to always be ignored, beacuse the name from the generic-icons file is only returned if there's no name defined in the icons file. I don't know how to fix this properly yet, but I'll work on this.