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

List:       kde-panel-devel
Subject:    Re: [PATCH] BUG 202473 no sound on emptying trash widget although
From:       "潘 <wppan () redflag-linux ! com>
Date:       2009-09-02 1:50:40
Message-ID: 4A9DCF70.2090201 () redflag-linux ! com
[Download RAW message or body]

Aaron J. Seigo 写道:
> On September 1, 2009, 潘卫平(Peter Pan) wrote:
>> yes, no need.
> 
> the point of that code was to prevent people from emptying the trash while the 
> trash was already emptying. as this can take quite a while, this is a nice 
> feature. it let the user know that their action was successful and prevents 
> people from selecting it over and over. we had this exact problem in 4.0.
> 
Although emptyTrash->setEnabled(m_count > 0) works well in updateIcon() 
function, I'd like to do emptyTrash->setEnabled(false) after emptying trash.

How about the patch followed?

> the KNotification bit looks correct, however.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel


-- 
潘卫平(Peter Pan)
Red Flag Software Co., Ltd

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

Index: trash.cpp
===================================================================
--- trash.cpp	(revision 1018644)
+++ trash.cpp	(working copy)
@@ -35,6 +35,7 @@
 #include <KUrl>
 #include <KProcess>
 #include <KStandardDirs>
+#include <KNotification>
 
 #include <kfileplacesmodel.h>
 
@@ -226,10 +227,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->setEnabled(false);
     emptyTrash->setText(i18n("&Empty Trashcan"));
 }
 


_______________________________________________
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