[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-01 11:36:53
Message-ID: 4A9D0755.5090303 () redflag-linux ! com
[Download RAW message or body]
Alessandro Diaferia 写道:
>
>
> 2009/9/1 "潘卫平(Peter Pan)" <wppan@redflag-linux.com
> <mailto:wppan@redflag-linux.com>>
>
> 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
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org <mailto:Plasma-devel@kde.org>
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
>
>
> +1 for committing this patch from my side
>
> Just one little side note: is it really needed to do
> emptyTrash->setEnabled(false); again in the emptyFinished slot?
>
> --
> Alessandro Diaferia
> KDE Developer
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
yes, no need.
I think emptyTrash->setEnabled() and emptyTrash->setText() are not
necessary.
The modified patch is followed.
Regards
--
潘卫平(Peter Pan)
Red Flag Software Co., Ltd
["kdebase-plasma-trash-empty.patch" (text/x-patch)]
Index: trash.cpp
===================================================================
--- trash.cpp (revision 1018141)
+++ 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,12 @@
{
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"));
}
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