#include "placesitemsignalhandler.h"
#include "placesitem.h"
-#include <Solid/StorageAccess>
PlacesItemSignalHandler::PlacesItemSignalHandler(PlacesItem* item,
QObject* parent) :
}
}
-void PlacesItemSignalHandler::onTrashDirListerCompleted()
+void PlacesItemSignalHandler::onTearDownRequested(const QString& udi)
{
+ Q_UNUSED(udi)
if (m_item) {
- m_item->onTrashDirListerCompleted();
+ Solid::StorageAccess *tmp = m_item->device().as<Solid::StorageAccess>();
+ if (tmp) {
+ emit tearDownExternallyRequested(tmp->filePath());
+ }
+ }
+}
+
+void PlacesItemSignalHandler::onTrashEmptinessChanged(bool isTrashEmpty)
+{
+ if (m_item) {
+ m_item->setIcon(isTrashEmpty ? QStringLiteral("user-trash") : QStringLiteral("user-trash-full"));
}
}