[Gambas-user] Desktop.Open, new portal method breaks computer:/// and trash://
Bruce Steers
bsteers4 at gmail.com
Sun Dec 10 22:32:56 CET 2023
On Sun, 10 Dec 2023 at 21:10, Benoît Minisini <
benoit.minisini at gambas-basic.org> wrote:
> 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.
>
That's a shame, because xdg-open computer:/// and trash:/// work on all the
systems i've tried.
I guess i'll just have to keep the xdg scripts in my application
Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231210/6a93023d/attachment.htm>
More information about the User
mailing list