[Gambas-user] Desktop.Open, new portal method breaks computer:/// and trash://

Benoît Minisini benoit.minisini at gambas-basic.org
Sun Dec 10 22:09:55 CET 2023


Le 10/12/2023 à 22:07, Bruce Steers a écrit :
> new Portal method for Desktop.Open breaks compputer:/// and trash:///
> 
> it works the old xdg way.
> I modified Desktop.Open to look like this...
> 
> Static Public Sub {Open}(Url As String, Optional {Wait} As Boolean)
> 
>   Dim XDGOnly As Boolean = Url = "computer:///" Or Url = "trash:///"
> 
>    Url = File.RealPath(Url)
> 
>    If DesktopPortal.Enabled And If Not XDGOnly Then
>      DesktopPortal.OpenURI(Url)
>    Else
>      Main.RunXdgUtil("xdg-open", [Url], {Wait})
>    Endif
> 
> End
> 
> 
> Respects
> BruceS
> 

It's not a solution as:

- 'xdg-utils' scripts are deprecated.

- AFAIK, no standard says something about "computer://" and "trash://".

-- 
Benoît Minisini.



More information about the User mailing list