Giter Site home page Giter Site logo

Comments (11)

probonopd avatar probonopd commented on June 17, 2024 1

SSR is using https://doc.qt.io/qt-5/qdesktopservices.html#openUrl

https://github.com/MaartenBaert/ssr/blob/5f50ceff93cbdc1eab8ad09af880f5b8ffb28702/src/GUI/PageDone.cpp#L54-L57

[static]bool QDesktopServices::openUrl(const QUrl &url)
Opens the given url in the appropriate Web browser for the user's desktop environment, and returns true if successful; otherwise returns false.

If the URL is a reference to a local file (i.e., the URL scheme is "file") then it will be opened with a suitable application instead of a Web browser.

I think this is not about "show in file manager", and is not using /org/freedesktop/FileManager1 -- "show in file manager" highlights the file in question in the file manager.

from filer.

probonopd avatar probonopd commented on June 17, 2024 1

the Open folder button opens the folder that contains the screen recording in a new tab in Dolphin.

Yes, but this ticket is about applications being able to not only open the folder but also select the file in the file manager. Filer does not implement the protocol needed for this yet.

Do you need a separate issue for applications that should show the folder but not select the file?

Not yet. This stuff is expected to work only once we have a proper "open with" database/implementation.

from filer.

probonopd avatar probonopd commented on June 17, 2024

https://github.com/linuxdeepin/dde-file-manager/search?q=dbusfilemanager1
seems to be relatively straightforward.

from filer.

probonopd avatar probonopd commented on June 17, 2024

Nautilus implements it, XFCE file manager doesn't.

image

from filer.

grahamperrin avatar grahamperrin commented on June 17, 2024

… also (for example) this Open folder button in multimedia/simplescreenrecorder:

image

Other non-browser apps affected by this issue include:

  • … I have seen a few in recent weeks, I'll list some here …

from filer.

grahamperrin avatar grahamperrin commented on June 17, 2024

Thanks … with KDE Plasma on FreeBSD 14.0-CURRENT, the Open folder button opens the folder that contains the screen recording in a new tab in Dolphin.

Do you need a separate issue for applications that should show the folder but not select the file?

from filer.

probonopd avatar probonopd commented on June 17, 2024

Looks like @Ashish-Bansal had sent a patch for KDE Dolphin that implements this.

https://phabricator.kde.org/source/dolphin/browse/master/src/dbusinterface.cpp

Can we port this to Filer? Possibly somewhere around

if(dbus.registerService(serviceName)) {

from filer.

probonopd avatar probonopd commented on June 17, 2024

Did I ever mention that I find D-Bus way too complicated? ;-)

Added
4c1f261

But the wrong methods get exported to D-Bus under the org.freedesktop.FileManager1 service as shown by QDBusViewer below:

  • Why is there Application/org.filer.application with methods like desktopPreferences?
  • Why is there MenuBar?

All these things we were already exporting under the D-Bus org.filer.Filer Service.
But under the org.freedesktop.FileManager1 we want to export the methods needed by the File Manager DBus Interface:

  • Why is there not /org/freedesktop/FileManager1 with methods like ShowFolders, ShowItems, and ShowItemProperties?

image

In my personal opinion, D-Bus being too complicated starts right with the fact that there is org.freedesktop.FileManager1 and /org/freedesktop/FileManager1 and that the two are not one and the same. As we can see, this complicates things immensely because now one needs to ensure (how?) that /org/freedesktop/FileManager1 (and only it) actually gets published under org.freedesktop.FileManager1. Why?

from filer.

probonopd avatar probonopd commented on June 17, 2024

What I seem to be missing entirely is how to tell Qt "publish the Qt method DBusInterface::ShowFolders(const QStringList& uriList, const QString& startUpId) as the D-Bus method ShowFolders under /org/freedesktop/FileManager1 under org.freedesktop.FileManager1. Exactly there and only there.

from filer.

probonopd avatar probonopd commented on June 17, 2024

Thanks @zyga for the following explanation:

I don't know Qt but it's fairly simple if you think about it the following way.

  • Any client can connect to the bus and publish objects with paths.
  • Any object can offer one or more interface.
  • All methods and properties belong to an interface.
  • A client can claim a bus name.
  • Anyone trying to find a given bus name, object path and interface can trigger bus activation, starting the providing service.
  • Interface is a personality. Each object can present arbitrary many. That’s the idea. Method Foo and property Bar are only meaningful if you add the interface (personality) name to it. You can have any number of methods Foo as long as the interface is different.

Maybe if I meditate long enough over it, then one day I will understand and appreciate the concepts behind D-Bus ;-)

from filer.

probonopd avatar probonopd commented on June 17, 2024

This works:

gdbus call --session --dest org.freedesktop.FileManager1 --object-path /org/freedesktop/FileManager1 --method org.freedesktop.FileManager1.ShowItems '["file:///Applications"]' ""

It will open a Filer window at / and highlight the Applications folder therein.

Thanks @mszoek.

from filer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.