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

Bruce Steers bsteers4 at gmail.com
Sun Dec 10 22:51:44 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.
>

from what i can tell it's gio that supports the standard... (not that i
know anything about gio it's just xdg will report a gio error for a non
existent name)

$ gio info computer:///
display name: Computer
name: /
type: directory
uri: computer:///
attributes:
  standard::type: 2
  standard::name: /
  standard::display-name: Computer
  standard::icon: computer, computer-symbolic
  standard::content-type: inode/directory
  standard::symbolic-icon: computer-symbolic, computer
  id::filesystem: computer:
  access::can-write: FALSE
  access::can-delete: FALSE
  access::can-trash: FALSE
  metadata::annotation:
  metadata::caja-icon-view-auto-layout: true
  metadata::caja-icon-view-tighter-layout: false
  metadata::nemo-icon-view-auto-layout: true

also seems to be a recent:///
Cannot seem to find any specification/standard list of others though :(

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231210/336fddc0/attachment-0001.htm>


More information about the User mailing list