[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    [PATCH] BUG 202473 no sound on emptying trash widget although sound
From:       <wppan () redflag-linux ! com>
Date:       2009-09-01 10:01:21
Message-ID: 4A9CF0F1.5060701 () redflag-linux ! com
[Download RAW message or body]

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

["kdebase-plasma-trash-empty.patch" (text/x-patch)]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic