Hi, all The plasma trash applet doesn't emit a KNotification when the trash is emptied, so there is no sound.
Regards -- 潘卫平(Peter Pan) Red Flag Software Co., Ltd
Index: trash.cpp =================================================================== --- trash.cpp (revision 1018113) +++ trash.cpp (working copy) @@ -35,6 +35,7 @@ #include <KUrl> #include <KProcess> #include <KStandardDirs> +#include <KNotification> #include <kfileplacesmodel.h> @@ -213,7 +214,6 @@ // we can simply call ktrash. //KonqOperations::emptyTrash(&m_menu); emptyTrash->setEnabled(false); - emptyTrash->setText(i18n("Emptying Trashcan...")); m_emptyProcess = new KProcess(this); connect(m_emptyProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(emptyFinished(int,QProcess::ExitStatus))); @@ -226,11 +226,13 @@ { Q_UNUSED(exitCode) Q_UNUSED(exitStatus) + + KNotification::event("Trash: emptied", QString() , QPixmap() , 0l, KNotification::DefaultEvent ); + //TODO: check the exit status and let the user know if it fails delete m_emptyProcess; m_emptyProcess = 0; - emptyTrash->setEnabled(true); - emptyTrash->setText(i18n("&Empty Trashcan")); + emptyTrash->setEnabled(false); } void Trash::updateIcon()
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel