Bug 183429 - open externally called folder in new tab
Summary: open externally called folder in new tab
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: unspecified Linux
: HI wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
Keywords: usability
: 206505 215702 216656 243032 266683 306904 342175 391254 (view as bug list)
Depends on:
Reported: 2009-02-06 14:46 UTC by piemonkey
Modified: 2023-04-06 13:33 UTC (History)
32 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.08.0

One folder, two ways (10.09 KB, image/png)
2020-06-20 21:16 UTC, andydecleyre

Note You need to log in before you can comment on or make changes to this bug.
Description piemonkey 2009-02-06 14:46:55 UTC
Version:           1.2 (using 4.2.00 (KDE 4.2.0), Kubuntu packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.27-11-generic

I'm really glad that Dolphin now uses tabs, I appreciate that this must have been fairly time consuming to implement. Now that they do work, I feel that there is a feature missing, the ability to open externally called folders in a new tab, rather than in a new window. For example if I have dolphin open, and then put in a usb stick, and open it using the Device notifier, currently it opens a new window, I'd like to have the option of always opening these in a new tab.

I don't know how hard this would be to do, Konqueror does it, so maybe you could adapt their code...
Comment 1 Frank Reininghaus 2009-09-06 21:11:57 UTC
*** Bug 206505 has been marked as a duplicate of this bug. ***
Comment 2 lexual 2009-10-27 13:29:11 UTC
I completely agree with this bug.

Given that dolphin now has tabs & split view, I think default behaviour should be one instance, and user can explicitly ask for additional windows.
Comment 3 Frank Reininghaus 2009-11-29 21:45:38 UTC
*** Bug 216656 has been marked as a duplicate of this bug. ***
Comment 4 m.wege 2010-02-13 16:37:53 UTC
*** Bug 215702 has been marked as a duplicate of this bug. ***
Comment 5 Frank Reininghaus 2010-06-30 15:19:35 UTC
*** Bug 243032 has been marked as a duplicate of this bug. ***
Comment 6 Frank Reininghaus 2011-02-20 20:29:41 UTC
*** Bug 266683 has been marked as a duplicate of this bug. ***
Comment 7 Nick Shaforostoff 2012-04-19 22:23:32 UTC
can be done as a dbus action. (and don't forget about possibility to select specific elements)

also it would be cool if dolphin exhibited all the locations it is viewing, allowing select specific tab. (to avoid opening dplicate window)
Comment 8 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:20:02 UTC
Resetting assignee to default as per bug #305719
Comment 9 Frank Reininghaus 2012-09-17 08:54:42 UTC
*** Bug 306904 has been marked as a duplicate of this bug. ***
Comment 10 Martín Cigorraga 2012-09-17 09:24:50 UTC
@Frank thanks for the duplicate, as usual I did a search for anything relating before posting the new bug/wishlist but alas! as usual -I'm afraid- I didn't found anything and ended opening a new report.
Comment 11 m.wege 2012-12-28 10:21:46 UTC
Still valid in 4.9.4
Comment 12 Michael D 2013-02-05 09:45:37 UTC
Still valid in 4.10 RC3 too. Any application which supports tabs should support opening new instances as new tabs.
Comment 13 Denis Prost 2013-02-13 09:39:36 UTC
I agree. Old KDE 3 users were used to get this feature with konqueror.
Sure, one can still use konqueror with KDE 4 but IMHO dolphin is much more user-friendly as a file manager.
Comment 14 Martín Cigorraga 2013-02-14 01:55:26 UTC
I'm somewhat new to the GNU/Linux scene so I never used KDE3 before - although I'm dying to give Trinity a try.

Now - please put your hand on your heart: is really out there anything that is _remotely_ as powerful and flexible as Dolphin is?
I certainly never saw anything like Dolphin on Windows (Explorer? Meh!), MacOS (Finder!? Come on, PLEASE!) or any other platform, including F/LOSS.

And I'm not biased at all here: while I'm indeed a KDE SC die-hard a honest and objective review of any other graphic file administrator for any other platform/DE out there will reveal that Dolphin is by far the most powerful, feature rich, flexible and stable GUI file manager.

I still remember how angry were some people when Dolphin did it's debut as Konqueror's successor...
Comment 15 Denis Prost 2013-02-14 04:43:02 UTC
I totally agree, it's just that it could be even better with that feature.
Comment 16 Martín Cigorraga 2013-02-15 04:21:48 UTC
Of course, it would be a leap ahead.
Comment 17 Milan Knížek 2013-02-17 10:00:44 UTC
It would be even better if it can be checked, which folders are already open and in which panel (via dbus or so) and then put that corresponding panel in front instead of opening a new - duplicated - one.
Comment 18 Denis Prost 2013-02-17 13:56:58 UTC
I second this (if that does not imply too many complications, of course)
Comment 19 Martín Cigorraga 2013-02-17 19:49:51 UTC
Indeed this would be the expected behaviour, I hope this feature will make its way to Dolphin.
Comment 20 Frank Reininghaus 2013-02-18 08:26:32 UTC
(In reply to comment #19)
> I hope this feature will make its way to Dolphin.

I agree that this feature might be nice, but obviously, someone has to work on it to make it happen. Patches welcome!

If anyone volunteers to work on it, please send a message to the kfm-devel list to discuss how this could be implemented. Thanks.
Comment 21 Martín Cigorraga 2013-02-18 13:27:58 UTC
"I agree that this feature might be nice, but obviously, someone has to work on it to make it happen. Patches welcome!"
If I only knew C++...

Thanks for your work on Dolphin, Frank, it's quite an amazing tool.
Comment 22 SME 2013-11-30 18:25:19 UTC
KDE 4.11.x and this "bug" is still alive ... just a reminder. Guys, please, no more eye-candy and animations in KDE - instead, please, spend some time on this simple but powerful feature ...
Comment 23 Denis Prost 2013-11-30 19:54:59 UTC
I second this comment.
you, KDE devs, already did a great work on dolphin. 
This is, to me, the only main feature missing.
Comment 24 Unknown 2014-04-25 15:05:58 UTC
Dear kde developers: Pleaaaase, please do this!
Comment 25 Christoph Feck 2014-12-24 02:09:51 UTC
*** Bug 342175 has been marked as a duplicate of this bug. ***
Comment 26 MB 2015-09-17 05:42:59 UTC
Just voting for this feature as well -- also for having a context menu to copy/paste files across opened tabs.
(Just switched to KDE5 on Manjaro, and I'm extremely impressed. Very high quality environment with the best suite of core utilities. Fantastic job!)
Comment 27 zeta 2017-05-30 15:31:13 UTC
Whoever implements this please make it so the dolphin instance to be used is:
 - one binded to current activity
 - if not found, one binded to all activities
 - if not found, new instance belonging to current activity
I would really really really like having a single dolphin instance per activity.
Comment 28 Mark Constable 2017-10-22 07:01:07 UTC
No one has posted this link so here it is for the record. I have no idea if it's suitable for this particular use case solution but it's probably close and could be the foundation of a real solution...

Comment 29 Nate Graham 2018-03-01 22:29:38 UTC
*** Bug 391254 has been marked as a duplicate of this bug. ***
Comment 30 intika 2018-06-14 05:04:50 UTC
Based on 
https://github.com/FadySGhatas/kde-dolphin-single-instance and 

i implemented this feature & more... 

Feel free to pull request, edit etc... the solution is good and work as expected but its not perfect so i am not submitting a patch feel free to do so.
Comment 31 Nate Graham 2019-03-19 16:04:59 UTC
This appears to be a popular feature, because no fewer than three people have now submitted patches to implement it!

- https://phabricator.kde.org/D16648
- https://phabricator.kde.org/D19150
- https://phabricator.kde.org/D19883

We don't need any more for now. :) The Dolphin maintainer will sort out this situation and hopefully get one of them merged! Thanks everyone.
Comment 32 Elvis Angelaccio 2019-05-30 20:45:37 UTC
Git commit 27e3907a3daf9a63d05c00a0ff746de6cfdf2bdf by Elvis Angelaccio, on behalf of Alexander Saoutkin.
Committed on 30/05/2019 at 20:40.
Pushed by elvisangelaccio into branch 'master'.

Open externally called files/directories in new tabs

FIXED-IN: 19.08.0
GUI: new cli argument --new-window

Externally called files/directories are opened in a a new tab of an instance of Dolphin that already exists. If any of the given URIs are already open in a tab, then those tabs are activated instead of a new tab being opened.  If there is no instance then the files/directories are opened in a new window. The newly opened file/directory has its tab activated, and consequently, the window is also activated.

When the user clicks "Open In New Window" or "Detach Tab", the files/directories are opened in a new window.

Test Plan:
Before testing, set the default file manager in system settings as the newly built Dolphin executable.
One must also include the new dolphin executable in the $PATH, otherwise some functions will attempt to open the system dolphin instead of the new one.

Furthermore, running two different versions of Dolphin (in particular, where one does not have this patch included) can result in bugs appearing, in particular, new tabs not opening as old instances will not recognise the DBus commands sent to it. However, I see no reason why a user will have two different versions of Dolphin (apart from people like us :D).

Open directories with the help of auxillary programs (i.e. a browser). The files/directories should appear in a new window if an instance does not exist. If an existence already exists, then a new tab should be opened and activated in that instance and the window activated.
Use QDBusViewer to open folders/items by calling the ShowFolders/ShowItems methods in org.freedesktop.FileManager1 of the Dolphin instance.
When a user chooses to "Open In New Window"/"Detach Tab" then the files/directories should be opened in a new window.

Reviewers: #dolphin, elvisangelaccio

Subscribers: zzag, dfaure, fvogt, fikrim, magar, fbg13, davidedmundson, kwin, ngraham, elvisangelaccio, anthonyfieroni, kfm-devel

Tags: #dolphin

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

M  +1    -0    CMakeLists.txt
M  +1    -0    src/CMakeLists.txt
M  +11   -2    src/dbusinterface.cpp
M  +27   -0    src/dolphinmainwindow.cpp
M  +33   -0    src/dolphinmainwindow.h
M  +22   -2    src/dolphintabwidget.cpp
M  +6    -0    src/dolphintabwidget.h
M  +82   -2    src/global.cpp
M  +6    -0    src/global.h
M  +18   -5    src/main.cpp

Comment 33 andydecleyre 2019-12-12 18:23:19 UTC
Can we get this to work when no paths are provided to dolphin, such as when launching via a menu, dock, panel, krunner, or global shortcut? The implicit path is whatever dolphin's open-at-launch path is. 

I was looking forward to this feature but had no idea it was implemented, because its activation conditions overlap with my usage either very little or not at all.
Comment 34 andydecleyre 2020-05-03 19:58:44 UTC
Alright, I still think this should be re-opened until it works with the Global Shortcuts item for Dolphin, but I've given up and set a custom shortcut via the khotkeys kcm, specifying the (now doubly-configured) launch path in the command as a workaround.
Comment 35 andydecleyre 2020-06-20 21:15:01 UTC
In addition to my already stated reason for believing this is not yet resolved, it seems the is-already-open detection is too picky in some way:

1. I launch dolphin with a hotkey, configured so that I can get access to this feature as it's currently implemented, which runs the command:

dolphin ~/Downloads

2. I navigate to ~/Videos by editing the location bar

3. I launch vokoscreen-ng and click the "Folder" button

This opens another tab open to ~/Videos, adjacent to the first tab open to that same folder. Further clicks of the button re-focus that second tab.

I notice that each tab uses a different icon; I'll attach a screenshot.

This doesn't happen if I choose the folder from the dropdown, left of the location bar, nor if I go Up and click into the Videos folder. In those cases, no second tab is opened; the first and only is focused.
Comment 36 andydecleyre 2020-06-20 21:16:27 UTC
Created attachment 129556 [details]
One folder, two ways