diff options
| author | Frank Reininghaus <[email protected]> | 2012-05-21 23:15:44 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2012-05-21 23:19:08 +0200 |
| commit | 0f70b6048037c505b4451aa23e27712f89fc0799 (patch) | |
| tree | 1ec2bca704117041914148ecb970c94391c80aec /src | |
| parent | ff9ce4dab36fa6afb1d7c602a1171cd81341d860 (diff) | |
Enable the "Empty Trash" action if items are deleted by non-KDE apps
To achieve this, the Places Panel context menu now checks the icon of
the "Trash" item (which is updated by a dir lister that watches the
state of the trash), rather then reading a config file which is only
used by KDE applications.
BUG: 293651
FIXED-IN: 4.9.0
Diffstat (limited to 'src')
| -rw-r--r-- | src/panels/places/placespanel.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index ccf9d8cff..968c9af45 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -23,7 +23,6 @@ #include "placespanel.h" -#include <KConfigGroup> #include <KDebug> #include <KDirNotify> #include <KIcon> @@ -157,8 +156,7 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos) } else { if (item->url() == KUrl("trash:/")) { emptyTrashAction = menu.addAction(KIcon("trash-empty"), i18nc("@action:inmenu", "Empty Trash")); - KConfig trashConfig("trashrc", KConfig::SimpleConfig); - emptyTrashAction->setEnabled(!trashConfig.group("Status").readEntry("Empty", true)); + emptyTrashAction->setEnabled(item->icon() == "user-trash-full"); menu.addSeparator(); } addAction = menu.addAction(KIcon("document-new"), i18nc("@item:inmenu", "Add Entry...")); |
