<table><tr><td style="">broulik created this revision.<br />broulik added reviewers: Plasma, VDG, dfaure.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />broulik requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D19588">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Right now when a job finishes, we get a notification that just contains whatever file was copied last as summary, which isn't very useful. The "Open" button also just opens that file.<br />
This patch adds some real-world heuristics for file transfer jobs extracting the total number of files processed.<br />
When exactly one file is processed, the label is treated as destination file. If more than one file was processed, and the job's destination URL is known (ie. the parent folder all the files were supposed to be copied into), that one is used instead.<br />
Moreover, a thumbnail is added for the file, so one can easily manipulate the file, open the containing folder of the file copied, or just access the destination parent folder.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Only jobs that set a <tt style="background: #ebebeb; font-size: 13px;">totalAmount</tt> of <tt style="background: #ebebeb; font-size: 13px;">Files</tt> will get this, which is currently only the file copy jobs in KIO. I did the same in p-b-i and get beautiful download finished notifications now.<br />
However, I don't really know the implications of just setting a total amount of Files, I surely don't want to see a "0 of 1 files" or "1 of 1 files" in every file download... Plasma doesn't do this, but I don't know about the widget file copy dialog.</p>

<p>Copied a jpeg file to somewhere else<br />
<a href="https://phabricator.kde.org/F6668002" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F6668002: Screenshot_20190307_114122.png</a><br />
Context menu has all the goodies<br />
<a href="https://phabricator.kde.org/F6668005" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F6668005: Screenshot_20190307_114245.png</a><br />
Copied a folder. When copying a bunch of files the parent folder is quite useful. However, when copying a folder it shows the parent of that folder instead of the folder that I copied, which isn't super ideal but a lot better than status quo.<br />
<a href="https://phabricator.kde.org/F6668009" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F6668009: Screenshot_20190307_114338.png</a></p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19588">https://phabricator.kde.org/D19588</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>applets/notifications/package/contents/ui/Jobs.qml<br />
dataengines/notifications/notificationaction.cpp<br />
dataengines/notifications/notifications.operations</div></div></div><br /><div><strong>To: </strong>broulik, Plasma, VDG, dfaure<br /><strong>Cc: </strong>plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>