<br><br><div class="gmail_quote">2009/8/22 Jacopo De Simoi <span dir="ltr">&lt;<a href="mailto:wilderkde@gmail.com">wilderkde@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;ve not been connected to the internet for a few days, so please disregard this message if it is outdated.<br>
<br>
The problem is in fact in the solid plasma engine; the patch works as expected (*) with the following patch in soliddeviceengine.cpp<br>
<br>
Index: soliddeviceengine.cpp<br>
===================================================================<br>
--- soliddeviceengine.cpp=(revision 1013054)<br>
+++ soliddeviceengine.cpp=(working copy)<br>
<br>
@@ -596,7 +597,7 @@<br>
 void SolidDeviceEngine::deviceChanged(const QString&amp; udi, const QString &amp;property, const QVariant &amp;value)<br>
 {<br>
     setData(udi, property, value);<br>
-    scheduleSourcesUpdated();<br>
+    updateAllSources();<br>
 }<br>
<br>
 #include &quot;soliddeviceengine.moc&quot;<br>
<br>
However I see a couple of problems with the patch; the first one is that, for consistency, I believe the result should look like what is shown in KFilePlaces; the second one is that (*) the free disk space is not updated if files are added/removed. This is ultimately a problem with the engine but makes the free space indicator only partially useful;<br>

 I see two solutions:<br>
- Once the device is made accessible trigger an update of the free disk space every (say) 10 seconds<br>
- Make the KCapacityBar appear on hover and trigger an update of the free disk space on hover;<br>
<br>
I personally like the second possibility more than the first one,<br>
Best<br>
<font color="#888888">  --J<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
</div></div></blockquote></div><br><br clear="all">I&#39;ve already committed a patch for the soliddevice engine and it is the following:<br><br>SVN commit 1013933 by adiaferia:<br>
<br>
immediately update free space and hd temp in order to let applets be aware of the status change of the device<br>
<br>
 M  +2 -4      soliddeviceengine.cpp<br>
<br>
<br>
--- trunk/KDE/kdebase/workspace/<div id=":p1" class="ii gt">plasma/dataengines/<span class="il">soliddevice</span>/soliddeviceengine.cpp #1013932:1013933<br>
@@ -507,8 +507,6 @@<br>
             setData(query, predicatemap[query]);<br>
         }<br>
     }<br>
-<br>
-    scheduleSourcesUpdated();<br>
 }<br>
<br>
 qlonglong SolidDeviceEngine::freeDiskSpace(const QString &amp;mountPoint)<br>
@@ -591,13 +589,13 @@<br>
<br>
     devicemap.remove(udi);<br>
     removeSource(udi);<br>
-    scheduleSourcesUpdated();<br>
 }<br>
<br>
 void SolidDeviceEngine::deviceChanged(const QString&amp; udi, const QString &amp;property, const QVariant &amp;value)<br>
 {<br>
     setData(udi, property, value);<br>
-    scheduleSourcesUpdated();<br>
+    updateFreeSpace(udi);<br>
+    updateHardDiskTemperature(udi);<br>
 }<br>
<br>
 #include &quot;soliddeviceengine.moc&quot;<br><br><br>But i dunno if now it updates when files are added/removed. I feel the fix should go into the engine imho anyway :)<br><br>Regards<br></div><br>-- <br>Alessandro Diaferia<br>
KDE Developer<br>