[Gambas-user] FileView and Files ".desktop"

Benoît Minisini gambas at ...1...
Sun May 24 21:04:55 CEST 2015


Le 24/05/2015 20:35, herberth guzman a écrit :
> Hi Benoit
>
> Benoit,  Fabien created a class called DesktopApps, that class is what
> allows me to show my panel applications ("Innova").

I don't know what that class is.

>
> I am a rookie and I find it hard.
> My work is slow and long.
> I want to convert  ("Innova") at a Desktop in the future.
>
> To display the contents of my Desktop unify Class_FileView with
> Class_DesktopApps to make it more attractive for the user.
>
> Attached a picture.
>
> Questions?
>
> 1.- FileView  can show the icons("png") related of one file ".desktop", and
> Run.
> If this is possible could you give me an example of how to do please.

The example is the Gambas source code of FileView.

To get the desktop file associated with a file you use the 
DesktopMime.FromFile() method.

It returns a DesktopMime object that represents the desktop file. Then 
you have a GetIcon() method to get the icon associated with that desktop 
file.

You should run carefully the freedesktop desktop file specifications to 
understand everything.

Regards,

-- 
Benoît Minisini




More information about the User mailing list