Bug 460997 - Highlight downloaded file in file manager using D-Bus org.freedesktop.FileManager1.ShowItems
Summary: Highlight downloaded file in file manager using D-Bus org.freedesktop.FileMan...
Status: REOPENED
Alias: None
Product: Falkon
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Juraj
URL:
Keywords:
: 442712 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-10-25 21:36 UTC by probono
Modified: 2024-11-13 20:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 24.12.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description probono 2022-10-25 21:36:46 UTC
SUMMARY

When double-clicking on a downloaded file in the Downloads window, the file manager should open the window that contains the file and highlight the file.

STEPS TO REPRODUCE
1.  Download a file
2. From the Downloads window, double-click the downloaded file

OBSERVED RESULT

Currently it only opens the folder without highlighting the file.

EXPECTED RESULT

When double-clicking on a downloaded file in the Downloads window, the file manager should open the window that contains the file and highlight the file.

SOFTWARE/OS VERSIONS

Falkon 3.2.0 package on FreeBSD 13.1

ADDITIONAL INFORMATION

To achieve this, D-Bus org.freedesktop.FileManager1.ShowItems can be used. Example:

% dbus-send --session \
          --print-reply \
          --dest=org.freedesktop.FileManager1 \
          /org/freedesktop/FileManager1 \
          org.freedesktop.FileManager1.ShowItems \
              array:string:"file:/etc/os-release" string:""

This should open the file manager at /etc and highlight the os-release file.

Of course this can be done in Qt rather than using the dbus-send command line tool; the above is just an example to illustrate the concept. If D-Bus is not available or the call fails, then Falkon could always fall back to the current method of opening the folder.
Comment 1 Juraj 2023-01-29 11:34:14 UTC
*** Bug 442712 has been marked as a duplicate of this bug. ***
Comment 2 Bug Janitor Service 2024-10-02 08:07:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/falkon/-/merge_requests/87
Comment 3 Juraj 2024-11-06 22:14:23 UTC
Git commit 37441945c43c2b20b5a79a9675ac0fc1be1220ff by Juraj Oravec.
Committed on 06/11/2024 at 22:07.
Pushed by jurajo into branch 'master'.

Use KIO::OpenFileManagerWindowJob to open folder
FIXED-IN: 24.12.0

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>

M  +5    -4    CMakeLists.txt
M  +1    -0    src/lib/CMakeLists.txt
M  +4    -16   src/lib/downloads/downloaditem.cpp
M  +30   -0    src/lib/tools/qztools.cpp
M  +2    -0    src/lib/tools/qztools.h

https://invent.kde.org/network/falkon/-/commit/37441945c43c2b20b5a79a9675ac0fc1be1220ff
Comment 4 Juraj 2024-11-13 20:54:16 UTC
The first implementation with KIO would bring too many required dependencies.