]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Add proper labels to Trash Emptied notification
authorKai Uwe Broulik <kde@privat.broulik.de>
Wed, 10 Oct 2018 14:25:49 +0000 (16:25 +0200)
committerKai Uwe Broulik <kde@privat.broulik.de>
Wed, 10 Oct 2018 14:25:49 +0000 (16:25 +0200)
It is not shown by default but when the user enables it, it should show something sensible.

Differential Revision: https://phabricator.kde.org/D15589

src/trash/dolphintrash.cpp

index 749d0d48111318374a4b35bc703c29876ed7c9b9..e4a2d947c1a7a2ffe7086e429d69e5d0c8596e74 100644 (file)
@@ -26,7 +26,7 @@
 #include <KNotification>
 #include <KConfig>
 #include <KConfigGroup>
-
+#include <KLocalizedString>
 
 Trash::Trash()
     : m_trashDirLister(new KDirLister())
@@ -66,8 +66,10 @@ KIO::Job *Trash::empty(QWidget *window)
         KJobWidgets::setWindow(job, window);
         job->uiDelegate()->setAutoErrorHandlingEnabled(true);
          // as long as KIO doesn't do this, do it ourselves
-        connect(job, &KIO::Job::result, [](){
-            KNotification::event(QStringLiteral("Trash: emptied"), QString(), QPixmap(), nullptr, KNotification::DefaultEvent);
+        connect(job, &KIO::Job::result, []() {
+            KNotification::event(QStringLiteral("Trash: emptied"), i18n("Trash Emptied"),
+                                 i18n("The Trash was emptied."), QStringLiteral("user-trash"),
+                                 nullptr, KNotification::DefaultEvent);
         });
         return job;
     }