Bug 385043 - Ark : after extraction, clicking on the notification button re-opens the archive instead of target directory
Summary: Ark : after extraction, clicking on the notification button re-opens the arch...
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 17.11.70
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
: 386928 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-09-25 08:17 UTC by Mahendra Tallur
Modified: 2017-11-18 09:42 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 17.11.90


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mahendra Tallur 2017-09-25 08:17:40 UTC
After extracting an archive, an interactive notification asks whether one would like to open the target directory in Dolphin.

Clicking on the button re-opens the archive in Ark instead of opening the target directory.

Bug reproduced under both KDE Neon (latest) + Arch Linux.
Latest KDE apps 17.08.1 but it used to occur with former versions.
Comment 1 Elvis Angelaccio 2017-10-15 09:03:40 UTC
This is something that the Plasma applet does, happens also when just opening a big archive.

I'm not sure if there is a way to disable the Open button in the notification from the application side. @Kai?
Comment 2 Mahendra Tallur 2017-11-04 14:03:08 UTC
Oops, late reply ! 

Well, actually this is an useful feature I think. Enabled to quickly open the destination dir after an archive is extracted. Problem is it doesn't, but re-open the same archive.
Comment 3 Mahendra Tallur 2017-11-14 22:18:06 UTC
Hmm... This is apparently not an Ark issue, but another KDE is at  fault, can you help me find which one ?

Indeed, I get a similar notification after moving a list of files. Clicking on the  notification "Open" button is supposed to open the target dir of the operation ; instead it tries to open one of the moved files. Which obviously makes no sense when a list of files is concerned, why would I want to open a single one ?
Comment 4 Elvis Angelaccio 2017-11-14 22:22:34 UTC
(In reply to Mahendra Tallur from comment #3)
> Hmm... This is apparently not an Ark issue, but another KDE is at  fault,
> can you help me find which one ?

The plasma notification stack, but not sure where lives (plasma-desktop or plasma-workspace I think?).
Comment 5 Kai Uwe Broulik 2017-11-14 22:23:37 UTC
Re-assigning to Plasma notifications. That button and notification is provided by it. Improving that isn't trivial, though, as by the time the notification fires, often the Destination hasn't been updated, so it ends up pointing at the Source.
Comment 6 Kai Uwe Broulik 2017-11-14 22:28:17 UTC
It's plasma-workspace.git/tree/applets/notifications/package/contents/ui/Jobs.qml you want to be looking at.
Comment 7 Mahendra Tallur 2017-11-14 22:49:58 UTC
Oh man, you replied so quickly ! Meanwhile I filed a bug against plasmashell / notifications : https://bugs.kde.org/show_bug.cgi?id=386928 !

Thanks a lot
Comment 8 Kai Uwe Broulik 2017-11-14 22:51:25 UTC
*** Bug 386928 has been marked as a duplicate of this bug. ***
Comment 9 Mahendra Tallur 2017-11-14 22:52:43 UTC
I'm clueless as I haven't looked at code for more than 10 years but... Why would the notification be started before the operation is complete ? You mean it's initiated before it's actually shown ? In the case of Ark, it definitely appears after the extraction is complete. 

Also the destination folder is known as soon as the user starts the operation as he decides where to move / extract files :-)

Sorry if that's a clueless dumb user remark ! Thanks for the kind replies.
Comment 10 Kai Uwe Broulik 2017-11-16 11:07:08 UTC
Re-assigning to Ark. When I extract a file using drag and drop it works fine, if I do that from Ark it results in the behavior described.

Ark does not set a destination in the job, there's just "Extracting. Archive: path/to/archive.zip" so it uses the source (the only information available to it) for the Open button.
Comment 11 Mahendra Tallur 2017-11-16 13:29:56 UTC
Hi !
I have to double check but I'm pretty sure the notification appears when the operation is over son it's meant to designate the result of the opération.

More importantly, as this behaviour occurs when just moving files in Dolphin, is it possible to consider my second bug report is not a duplicate ? Is it possible to "un-duplicate" it ?

Cheers
Comment 12 Elvis Angelaccio 2017-11-18 09:16:47 UTC
Git commit 52cbbd803a2f57a971372fde1b5ebcc3808bfb7a by Elvis Angelaccio.
Committed on 18/11/2017 at 09:15.
Pushed by elvisangelaccio into branch 'Applications/17.12'.

ExtractJob: set destination URL in the job description

The plasma notification applet looks for it for the "Open" button within
the notification. If it doesn't find it, it falls back to the archive
URL which is not what one would expect.
FIXED-IN: 17.11.90

Differential Revision: D8861

M  +1    -1    kerfuffle/jobs.cpp

https://commits.kde.org/ark/52cbbd803a2f57a971372fde1b5ebcc3808bfb7a
Comment 13 Mahendra Tallur 2017-11-18 09:42:57 UTC
Thank you for the fix, Elvis :-) Cheers !