[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request: Patch to add free space indicator into device
From: Alessandro Diaferia <alediaferia () gmail ! com>
Date: 2009-08-25 10:29:11
Message-ID: 65627f3a0908250329x3fb9d480nf70d09b01ec3e3ae () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
2009/8/22 Jacopo De Simoi <wilderkde@gmail.com>
> 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
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
I've already committed a patch for the soliddevice engine and it is the
following:
SVN commit 1013933 by adiaferia:
immediately update free space and hd temp in order to let applets be aware
of the status change of the device
M +2 -4 soliddeviceengine.cpp
--- trunk/KDE/kdebase/workspace/plasma/dataengines/soliddevice/soliddeviceengine.cpp
#1013932:1013933
@@ -507,8 +507,6 @@
setData(query, predicatemap[query]);
}
}
-
- scheduleSourcesUpdated();
}
qlonglong SolidDeviceEngine::freeDiskSpace(const QString &mountPoint)
@@ -591,13 +589,13 @@
devicemap.remove(udi);
removeSource(udi);
- scheduleSourcesUpdated();
}
void SolidDeviceEngine::deviceChanged(const QString& udi, const QString
&property, const QVariant &value)
{
setData(udi, property, value);
- scheduleSourcesUpdated();
+ updateFreeSpace(udi);
+ updateHardDiskTemperature(udi);
}
#include "soliddeviceengine.moc"
But i dunno if now it updates when files are added/removed. I feel the fix
should go into the engine imho anyway :)
Regards
--
Alessandro Diaferia
KDE Developer
[Attachment #5 (text/html)]
<br><br><div class="gmail_quote">2009/8/22 Jacopo De Simoi <span dir="ltr"><<a \
href="mailto:wilderkde@gmail.com">wilderkde@gmail.com</a>></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'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& udi, const QString \
&property, const QVariant &value)<br> {<br>
setData(udi, property, value);<br>
- scheduleSourcesUpdated();<br>
+ updateAllSources();<br>
}<br>
<br>
#include "soliddeviceengine.moc"<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'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 &mountPoint)<br>
@@ -591,13 +589,13 @@<br>
<br>
devicemap.remove(udi);<br>
removeSource(udi);<br>
- scheduleSourcesUpdated();<br>
}<br>
<br>
void SolidDeviceEngine::deviceChanged(const QString& udi, const QString \
&property, const QVariant &value)<br> {<br>
setData(udi, property, value);<br>
- scheduleSourcesUpdated();<br>
+ updateFreeSpace(udi);<br>
+ updateHardDiskTemperature(udi);<br>
}<br>
<br>
#include "soliddeviceengine.moc"<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>
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic