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

Bruce Steers bsteers4 at gmail.com
Sun Dec 10 22:07:12 CET 2023


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231210/dcf26c91/attachment.htm>


More information about the User mailing list