[Gambas-user] Get the default file manager
Bruce Steers
bsteers4 at gmail.com
Sun Feb 18 06:12:22 CET 2024
On Sun, 18 Feb 2024 at 01:10, System64 Development <64xcode at gmail.com>
wrote:
> Finally approach the problem as follows:
>
> If
> DesktopFile.FromMime("inode/directory")[0].Categories.Exist("FileManager")
> Then
> DesktopFile.FromMime("inode/directory")[0].Run(User.Home)
>
> Endif
>
> Thanks to all
>
> Best regards.
>
> Martin
>
That wouldn't work for me.
If i use this code...
Dim hDFA As DesktopFile[] = DesktopFile.FromMime("inode/directory") ' get
the whole list
For Each hdf As DesktopFile In hDFA
If Not hdf.Categories.Exist("FileManager") Then Continue ' skip if no
FileManager category.
Print hdf.GenericName
Print hDF.ProgramName
Print hdf.Categories.Join(";")
Print
Next
I get the following results...
nautilus
GNOME;GTK;Utility;Core;FileManager
File Manager
dolphin
Qt;KDE;System;FileTools;FileManager
File Manager
pcmanfm-qt
FileManager;Utility;Core;Qt
File Manager
pcmanfm
System;FileTools;FileManager;Utility;Core;GTK
File Manager
thunar
System;Core;GTK;FileTools;FileManager
that's 5 programs that have FileManager as a category.
and my default file manager caja is not one of them.
caja is one of the results but it has no categories set.
But if it works for you then fair enough i guess :)
Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20240218/9b42e9b4/attachment.htm>
More information about the User
mailing list