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

2012-01-19 Thread cobines
2012/1/18 Krzysztof :
> 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
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2012-01-18 Thread Krzysztof
Another problem. I know path to current icons, but icons are named
like "office-spreadsheet" not by extension and can be in svg format :/
. So it seems that I must include icons of popular extensions in my
application and do it by my self anyway.

2012/1/11 Krzysztof :
> This is exactly what I needed! Thanks to all
>
> 2012/1/11 cobines :
>> Take a look at the unit here:
>>
>> http://doublecmd.svn.sourceforge.net/viewvc/doublecmd/trunk/src/platform/unix/uunixicontheme.pas
>> --
>> cobines
>> ___
>> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2012-01-11 Thread Krzysztof
This is exactly what I needed! Thanks to all

2012/1/11 cobines :
> Take a look at the unit here:
>
> http://doublecmd.svn.sourceforge.net/viewvc/doublecmd/trunk/src/platform/unix/uunixicontheme.pas
> --
> cobines
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2012-01-11 Thread cobines
Take a look at the unit here:

http://doublecmd.svn.sourceforge.net/viewvc/doublecmd/trunk/src/platform/unix/uunixicontheme.pas
--
cobines
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2012-01-10 Thread Daniel Gaspary
On Mon, Jan 9, 2012 at 18:45, Krzysztof  wrote:
> I need to load icon associated by file extension. On windows I done
> this by WinAPI function ExtractAssociatedIcon(). On linux is not so
> easy, because we have GNOME, KDE, XFCE, LXDE etc, but I noticed that
> icons are stored in this same place

I believe that file/dir locations are ruled by freedesktop
specifications.I have found this:

http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html#s2_layout
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2012-01-09 Thread Michael Van Canneyt



On Mon, 9 Jan 2012, Krzysztof wrote:


Hi,

I need to load icon associated by file extension. On windows I done
this by WinAPI function ExtractAssociatedIcon(). On linux is not so
easy, because we have GNOME, KDE, XFCE, LXDE etc, but I noticed that
icons are stored in this same place (like /home/[account]/.icons/ or
/usr/share/icons), so there is a chance to locate it, but how can I
get path to icons which user using currently? Exists any
GetEnvironmentVariable or something like this?


Not to my knowledge. 
You'll have to look in the settings files/directories of the GUI (GNOME/KDE/XFCE)


Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2012-01-09 Thread Krzysztof
Hi,

I need to load icon associated by file extension. On windows I done
this by WinAPI function ExtractAssociatedIcon(). On linux is not so
easy, because we have GNOME, KDE, XFCE, LXDE etc, but I noticed that
icons are stored in this same place (like /home/[account]/.icons/ or
/usr/share/icons), so there is a chance to locate it, but how can I
get path to icons which user using currently? Exists any
GetEnvironmentVariable or something like this?

Regards
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal