Bug 469271 - Double click on folder from desktop opens not only that folder but also random unrelated ones
Summary: Double click on folder from desktop opens not only that folder but also rando...
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 22.12.3
Platform: Manjaro Linux
: NOR major
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-02 15:30 UTC by php4fan
Modified: 2024-04-18 15:37 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description php4fan 2023-05-02 15:30:10 UTC
STEPS TO REPRODUCE
1. Close all Dolphin windows
2. Open a new dolphin window, and in it, several tabs where you open several folders, let's say they are folders X, Y and Z
3. Create two folders in your Desktop: call them A and B
4. Double click on folder A in the desktop.
=> this opens a new Dolphin window with a single tab (or no tabs depending on how you call it) with folder A (so now you have two Dolphin windows open, one with several tabs showing folders X, Y, Z, and one with only one tab showing folder A)
5. Close the Dolphin window that is showing folder A
6. From the desktop, double-click on folder B

EXPECTED RESULT

This should open a new Dolphin window, with only one tab (or no tabs depending on how you want to call it) showing the contents of folder B

OBSERVED RESULT

The new folder window has two tabs, with folders A and B. Dolphin remembers the folders that you have opened as tabs in the last Dolphin window that you closed, and reopens all of them in addition to the new one you double-clicked.

You can now repeat, by closing this new window, and double-clicking on a third folder C from the desktop, and the newly opened window will have three tabs with folders A, B and C.

And this will happen even if in the meantime you have deleted some of the folders. You'll have a Dolphin window with tabs for folders that no longer exist!!


This is a regression that appeared relatively recently, like a few months ago or so. I was too lazy to report it until now, but I hit it every single day every few minutes and it's tremendously annoying and confusing. It kills productivity and makes my life miserable.

I haven't found any workaround to avoid this. Every time I close the window opened from the desktop, I previously make sure to close every single tab in it, so that at least it doesn't accumulate an infinitely growing number of tabs. But this doesn't prevent me from always systematically having two tabs instead of one every time (and having to close them one by one so I don't get three next time).




Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.1.23-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-1065G7 CPU @ 1.30GHz
Memory: 7.3 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Plus Graphics
Manufacturer: LENOVO
Product Name: 81WE
System Version: IdeaPad 3 15IIL05
Comment 1 Alfonso Murolo 2023-05-02 18:56:38 UTC
I could reproduce this on Arch. 
It is, to my eyes, kind-of intended since in the settings of Dolphin there is one which seems to control exactly this.
I am wondering however what is the rationale behind a *default* of reopening the tabs of the last process.. can anybody shed some light?
I admit I find this behaviour slightly odd too.
Comment 2 php4fan 2023-05-02 19:29:51 UTC
> It is, to my eyes, kind-of intended since in the settings of Dolphin there is one which seems to control exactly this.

Are you talking about the one under "Startup -> New windows -> Show on startup"
which has two options:
- Folders, tabs, and window state from last time
- [a specific folder]

But this one also applies when I close all Dolphin windows and then launch Dolphin from scratch. When I do so, of course I do want it to reopen my last window with the tabs that I had in it. If I change that setting, it will apply in this case too, and I don't want that. So that's a reasonable default (but I do see the need for a setting, i.e. I understand why others may prefer to always start from a given folder).

But when I open a new window BY DOUBLE CLICKING ON A SPECIFIC FOLDER on the desktop, it makes no sense to open _additional_ tabs that are from *SOME* previously closed window. Especially when I already have another window open. The concept of "last time" is not even well defined in this situation.

It seems to be using the same setting for unrelated situations.

And indeed I checked that changes this setting does make the issue go away. But again, it's not an acceptable workaround.
Comment 3 php4fan 2023-08-29 14:38:46 UTC
Why is this being ignored?
Comment 4 Jonathan Wakely 2024-01-26 19:17:07 UTC
> Especially when I already have another window open. The concept of "last time" is not even well defined in this situation.

Yeah I think this is the problem. I have a dolphin window that I keep open permanently, with two tabs to a bunch of PDFs that I consult every day (docs like the C and C++ standards). So I definitely want that window to be restored when I start dolphin.

But if I open a second dolphin window, or a third one, or some other application runs "xdg-open /some/path", or I mount a USB drive via the systray applet, I don't want a new window with all the same tabs in it *again*.

I have Firefox set to restore my tabs and windows from last time as well, but if I press Ctrl-N to open a new window it doesn't reopen all those tabs *again*. They're still there in the original window, I don't need them reopened!

If I change dolphin's setting to show $HOME (or some other dir) on startup, then launching a new dolphin window to open a specific dir (e.g. with xdg-open) or mounting a removable drive doesn't open with $HOME in a second tab, it *only* opens the location it was told to open. Why doesn't the "show on startup" setting take effect here too? To be clear, I don't think it should take effect, because that would be silly. But that's exactly what it does when "show on startup" is set to restore the previous state.

I think the sensible behaviour would be to ignore that setting when dolphin is launched to show a specific dir (like when clicking on a folder on the desktop, or mounting a removable drive, or some other app uses xdg-open). Just show the dir it's been asked to show.

If dolphin is launched with no arguments, e.g. from the start menu or the command line, then the "show on startup" would be relevant. That is the action "start dolphin", and not "show dir X in a file manager, which happens to be dolphin". They are two very different use cases.
Comment 5 php4fan 2024-01-26 23:22:21 UTC
This is a regression, it used to behave as expected. There's no need to invent anything, just find what broke it.
Comment 6 php4fan 2024-02-13 18:46:09 UTC
Can we please have this adressed?? This is tremendously annoying.
Comment 7 fanzhuyifan 2024-02-16 06:12:38 UTC
(In reply to php4fan from comment #6)
> Can we please have this adressed?? This is tremendously annoying.

Would you be interested to do a git bisect to figure out the first bad commit? : )
Comment 8 php4fan 2024-02-16 09:55:50 UTC
> Would you be interested to do a git bisect to figure out the first bad commit? : )

If there's a guide for dummies on how to do that I may give it a shot, but given I have to learn from scratch and install all the tools and stuff, I strongly suspect it would take me about 20x the time it would take any of the developers (who probably do git bisects all the time) to do the same thing. Especially considering that anybody can easily reproduce the issue on the current version. At least nobody has said they can't reproduce.
Comment 9 php4fan 2024-04-18 15:37:50 UTC
Guys please, this is a huge pain in the a**