Review Request: Patch to add free space indicator into device notifier plasmoid

Jacopo De Simoi wilderkde at gmail.com
Sat Aug 22 16:02:56 CEST 2009


I've not been connected to the internet for a few days, so please disregard this message if it is outdated.

The problem is in fact in the solid plasma engine; the patch works as expected (*) with the following patch in soliddeviceengine.cpp

Index: soliddeviceengine.cpp
===================================================================
--- soliddeviceengine.cpp=(revision 1013054)
+++ soliddeviceengine.cpp=(working copy)

@@ -596,7 +597,7 @@
 void SolidDeviceEngine::deviceChanged(const QString& udi, const QString &property, const QVariant &value)
 {
     setData(udi, property, value);
-    scheduleSourcesUpdated();
+    updateAllSources();
 }

 #include "soliddeviceengine.moc"

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;
 I see two solutions:
- Once the device is made accessible trigger an update of the free disk space every (say) 10 seconds
- Make the KCapacityBar appear on hover and trigger an update of the free disk space on hover; 

I personally like the second possibility more than the first one, 
Best 
  --J 


More information about the Plasma-devel mailing list