D19588: [Notifications] Improve finished notification

Kai Uwe Broulik noreply at phabricator.kde.org
Thu Mar 7 10:45:42 GMT 2019


broulik created this revision.
broulik added reviewers: Plasma, VDG, dfaure.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
broulik requested review of this revision.

REVISION SUMMARY
  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.
  This patch adds some real-world heuristics for file transfer jobs extracting the total number of files processed.
  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.
  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.

TEST PLAN
  Only jobs that set a `totalAmount` of `Files` 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.
  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.
  
  Copied a jpeg file to somewhere else
  F6668002: Screenshot_20190307_114122.png <https://phabricator.kde.org/F6668002>
  Context menu has all the goodies
  F6668005: Screenshot_20190307_114245.png <https://phabricator.kde.org/F6668005>
  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.
  F6668009: Screenshot_20190307_114338.png <https://phabricator.kde.org/F6668009>

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D19588

AFFECTED FILES
  applets/notifications/package/contents/ui/Jobs.qml
  dataengines/notifications/notificationaction.cpp
  dataengines/notifications/notifications.operations

To: broulik, #plasma, #vdg, dfaure
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190307/ed1ab85a/attachment-0001.html>


More information about the Plasma-devel mailing list