Bug 469762 - Give us a way to configure if the destination opens or not after creating an archive via "Compress to..." option from the context menus
Summary: Give us a way to configure if the destination opens or not after creating an ...
Status: CONFIRMED
Alias: None
Product: ark
Classification: Applications
Component: plugins (show other bugs)
Version: 23.04.1
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-14 18:35 UTC by Patrick Silva
Modified: 2024-04-04 22:08 UTC (History)
6 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 Patrick Silva 2023-05-14 18:35:57 UTC
SUMMARY
In Ark settings there is an option used to open or not the destination after an extraction.
However, currently Ark always opens the destination after creating an archive via "Compress to..." option from the context menus and there is no option to change this behavior.

STEPS TO REPRODUCE
1.  right-click on a file in Dolphin, hover over "Compress" and choose "Compress to..."
2. choose a destination that is not open in Dolphin
3. click on "OK" button

OBSERVED RESULT
when the compression finishes, the destination opens in a new tab/window

EXPECTED RESULT
the behavior after creating an archive should be configurable

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Graphics Platform: Wayland
Comment 1 Andrey 2023-05-14 18:39:31 UTC
I suggest maybe we could combine these two options in the current one and just rename it instead of adding a new one.
Comment 2 Luke Horwell 2024-01-24 00:17:55 UTC
This "bug" still bites (23.08.4). Sometimes I use the compress menu to create archives, but don't expect Dolphin to steal focus(!) after the archive finished being created minutes later. The notification is good on its own since it allows to open the containing folder if desired. Having Dolphin honour Ark's "Open destination folder after extraction" will greatly help.

Another way to reproduce (on X11) is to compress a large file and switch to another application.
- Expected: Only the notification is shown when compression finished.
- Observed: Dolphin pops up (even if it was on another virtual desktop) and steals focus of the active app. Hopefully the DELETE key isn't being pressed at the time :)
Comment 3 Luke Horwell 2024-04-04 22:08:11 UTC
With the latest Plasma 6 and Ark/Dolphin 24.02.1, here's what happens when starting a long-running compression via context menu:

* Dolphin process that started the compression is closed: No dolphin window opens on completion. [Good]
* Dolphin process that started the compression stays open: That window steals focus back on completion. [Bad]
* Dolphin process that started the compression navigated to a different folder: New window opens on completion, stealing focus. [Bad]

Under X11 at least, I haven't checked if this is the same behaviour under Wayland. I have "Keep a single Dolphin window, opening new folders in tabs" unchecked in Dolphin's settings if that's related.

For now, until a configuration option is present, I'll rebuild the ark package locally but revert changes in:
https://invent.kde.org/utilities/ark/-/commit/2c847f76778a797964e189bb17ce774e56005f57

In particular, by removing this line in app/compressfileitemaction.cpp:

    KIO::highlightInFileManager({QUrl::fromLocalFile(addToArchiveJob->fileName())});