Bug 408244 - "Open Containing Folder" feature only works when Dolphin is already running
Summary: "Open Containing Folder" feature only works when Dolphin is already running
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: VHI grave
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL: Erstellung des Ein-/Ausgabemoduls nic...
Keywords: regression
: 408483 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-06-03 09:17 UTC by Kai Uwe Broulik
Modified: 2020-03-16 21:58 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.08.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2019-06-03 09:17:19 UTC
SUMMARY
After the recent dolphin "open everything in new tabs" changes the "Open containing folder" feature no longer works.

STEPS TO REPRODUCE
Use "open containing folder" feature anywhere, e.g. krunner, kfind, notifications, ...
1. Search for a file in KRunner
2. Click the "Open containing folder" button

OBSERVED RESULT
Nothing happens. A dolphin --daemon process spawns that doesn't do anything. Afterwards you cannot even open any new Dolphin windows.

EXPECTED RESULT
The containing folder is opened and the file highlighted

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.16.80
KDE Frameworks Version: 5.58
Qt Version: 5.12.0
Comment 1 Nate Graham 2019-06-05 15:45:31 UTC
Works for me when Dolphin is already running; it correctly opens a new tab to hold the folder that opens showing the selected file. It's only when Dolphin is already that this is broken.
Comment 2 Kai Uwe Broulik 2019-06-06 07:00:59 UTC
Right. It's probably the daemonized version that is DBus-activated that can't deal with the new "open a window" requests.
Comment 3 Elvis Angelaccio 2019-06-10 20:14:53 UTC
Git commit 7df5fc8edb54153f877eed4690e77968a1b804ba by Elvis Angelaccio.
Committed on 10/06/2019 at 20:13.
Pushed by elvisangelaccio into branch 'master'.

Do not match daemonized dolphin instances

Summary:
`dolphin --daemon` does not have the `/dolphin/Dolphin_1` dbus path,
because it doesn't have any DolphinMainWindow.

Checking if the QDBusInterface is valid is not enough, we also need to look for dbus errors.

Test Plan:
1. Make sure there is a `dolphin --deamon` process around.
2. Start another dolphin process.

Reviewers: broulik, ngraham, feverfew

Reviewed By: feverfew

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21666

M  +1    -1    src/global.cpp

https://commits.kde.org/dolphin/7df5fc8edb54153f877eed4690e77968a1b804ba
Comment 4 Nate Graham 2019-06-10 21:18:45 UTC
This does not actually fix the bug:
1. Open Dolphin
2. Use that Dolphin window to navigate to an image
3. Open the image in Gwenview
4. in Gwenview, go to {File > Open Containing Folder}

Nothing happens.
Comment 5 Nate Graham 2019-06-13 04:11:02 UTC
*** Bug 408483 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2019-06-22 13:47:12 UTC
Git commit d2506ffa63812fd0d8e9de248d7f3dd94ec2bf38 by Nate Graham, on behalf of Alexander Saoutkin.
Committed on 22/06/2019 at 13:47.
Pushed by ngraham into branch 'master'.

Open new instance of Dolphin if no URLs are given

Summary:
Related: bug 408387
FIXED-IN: 19.08.0

Currently Dolphin only opens a new instance of itself in the following two scenarios:
1. No other Dolphin instances ( D21666 deals with not matching daemonized instances) are currently running.
2. A new instance is explicitly asked for via:  `dolphin --new-window`

A third scenario is needed to fix this bug:
3. If no URLs are passed in as arguments then open a new instance.

This patch adds this third scenario.

Test Plan:
STEPS TO REPRODUCE
1. Open Dolphin
2. Right-click on Dolphin's Task Manager Entry and click "Start New Instance"
3. A new instance is created.

As my system stuff is not built on master I am unable to replicate the bug (and can't confirm whether this fixes it), hence I'll rely on @ngraham to confirm whether this patch fixes the issue.

Reviewers: ngraham, elvisangelaccio

Reviewed By: ngraham, elvisangelaccio

Subscribers: elvisangelaccio, ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D21691

M  +2    -2    src/global.cpp
M  +5    -5    src/main.cpp

https://commits.kde.org/dolphin/d2506ffa63812fd0d8e9de248d7f3dd94ec2bf38
Comment 7 Elvis Angelaccio 2019-08-11 10:20:41 UTC
Reopening since I can still reproduce this issue.

Fix in https://phabricator.kde.org/D23087
Comment 8 Elvis Angelaccio 2019-08-11 13:56:43 UTC
Git commit aeba47648d8b4b43ad0f8e237cfc95b8a4bd60ac by Elvis Angelaccio.
Committed on 11/08/2019 at 10:18.
Pushed by elvisangelaccio into branch 'Applications/19.08'.

Do not match daemonized dolphin instances: part 2

Summary:
`dolphin --daemon` does not have the `/dolphin/Dolphin_1` dbus path,
because it doesn't have any DolphinMainWindow.

Checking if the QDBusInterface is valid is not enough, we also need to look for dbus errors.

This should have been part of commit 7df5fc8edb54153f. Not sure how I missed it.
FIXED-IN: 19.08.0

Test Plan:
1. Make sure the new "Open new folders in tabs" setting is enabled.
2. Run `dolphin --deamon` and make sure is the only dolphin process around.
3. Call the `org.freedesktop.FileManager1.ShowFolders` method from QDbusViewer.

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D23087

M  +1    -1    src/global.cpp

https://commits.kde.org/dolphin/aeba47648d8b4b43ad0f8e237cfc95b8a4bd60ac
Comment 9 Elvis Angelaccio 2020-03-16 21:58:11 UTC
Git commit fa806d48dafec0c47141381740a5d7604293d32d by Elvis Angelaccio.
Committed on 16/03/2020 at 21:38.
Pushed by elvisangelaccio into branch 'release/20.04'.

Exclude daemonized processes from Dolphin::attachToExistingInstance()

Summary:
`dolphin --daemon` does not have the `/dolphin/Dolphin_1` dbus path,
because it doesn't have any DolphinMainWindow.

Instead of working around this issue (as we did in D21666 and D25510),
just exclude these processes from the list of dbus instances checked by
`Dolphin::attachToExistingInstance()`.

Test Plan: Same test plan as in D21666 and D25510

Reviewers: #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D26213

M  +12   -2    src/dbusinterface.cpp
M  +13   -0    src/dbusinterface.h
M  +1    -1    src/global.cpp
M  +3    -1    src/global.h
M  +1    -0    src/main.cpp

https://commits.kde.org/dolphin/fa806d48dafec0c47141381740a5d7604293d32d