[fpc-pascal] How to get path to current theme icons on linux?

cobines cobines at gmail.com
Fri Jan 20 04:08:02 CET 2012


2012/1/18 Krzysztof <dibo20 at wp.pl>:
> Another problem. I know path to current icons, but icons are named
> like "office-spreadsheet" not by extension and can be in svg format :/

Read this:

http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html

There is a file "globs" that "contains a mapping from names to MIME types".

Therefore you can map for example "pdf" to "x-office-spreadsheet".

Look at sample code in function TPixMapManager.LoadMimeIconNames in

http://doublecmd.svn.sourceforge.net/viewvc/doublecmd/trunk/src/platform/upixmapmanager.pas

Once you have MIME name look here how to find the icon location in the
icon theme:

http://doublecmd.svn.sourceforge.net/viewvc/doublecmd/trunk/src/platform/uicontheme.pas

--
cobines



More information about the fpc-pascal mailing list