Blame SOURCES/kde-runtime-solid-device-automounter.patch

feb621
diff --git a/solid-device-automounter/kcm/DeviceAutomounterKCM.cpp b/solid-device-automounter/kcm/DeviceAutomounterKCM.cpp
feb621
index 42fbfae..80f6d28 100644
feb621
--- a/solid-device-automounter/kcm/DeviceAutomounterKCM.cpp
feb621
+++ b/solid-device-automounter/kcm/DeviceAutomounterKCM.cpp
feb621
@@ -57,6 +57,7 @@ DeviceAutomounterKCM::DeviceAutomounterKCM(QWidget *parent, const QVariantList &
feb621
 
feb621
     m_devices = new DeviceModel(this);
feb621
     deviceView->setModel(m_devices);
feb621
+    deviceView->setEnabled(true);
feb621
 
feb621
     connect(automountOnLogin, SIGNAL(stateChanged(int)), this, SLOT(emitChanged()));
feb621
     connect(automountOnPlugin, SIGNAL(stateChanged(int)), this, SLOT(emitChanged()));
feb621
@@ -112,12 +113,10 @@ DeviceAutomounterKCM::enabledChanged()
feb621
         automountOnLogin->setEnabled(false);
feb621
         automountOnPlugin->setEnabled(false);
feb621
         automountUnknownDevices->setEnabled(false);
feb621
-        deviceView->setEnabled(false);
feb621
     } else {
feb621
         automountOnLogin->setEnabled(true);
feb621
         automountOnPlugin->setEnabled(true);
feb621
         automountUnknownDevices->setEnabled(true);
feb621
-        deviceView->setEnabled(true);
feb621
     }
feb621
 }
feb621
 
feb621
diff --git a/solid-device-automounter/kcm/DeviceModel.cpp b/solid-device-automounter/kcm/DeviceModel.cpp
feb621
index 9469cb6..7ab6eb4 100644
feb621
--- a/solid-device-automounter/kcm/DeviceModel.cpp
feb621
+++ b/solid-device-automounter/kcm/DeviceModel.cpp
feb621
@@ -60,7 +60,8 @@ void
feb621
 DeviceModel::deviceAttached(const QString &udi)
feb621
 {
feb621
     Solid::Device dev(udi);
feb621
-    if (dev.is<Solid::StorageVolume>()) {
feb621
+    Solid::StorageVolume *volume = dev.as<Solid::StorageVolume>();
feb621
+    if (volume && !volume->isIgnored()) {
feb621
         if (m_disconnected.contains(udi)) {
feb621
             emit layoutAboutToBeChanged();
feb621
             beginRemoveRows(index(1, 0), m_disconnected.indexOf(udi), m_disconnected.indexOf(udi));
feb621
@@ -81,7 +82,6 @@ DeviceModel::deviceRemoved(const QString &udi)
feb621
         m_attached.removeOne(udi);
feb621
         endRemoveRows();
feb621
         emit layoutChanged();
feb621
-        addNewDevice(udi);
feb621
     }
feb621
 }
feb621