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
#include "placespanel.h"
-#include <KConfigGroup>
#include <KDebug>
#include <KDirNotify>
#include <KIcon>
} 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..."));