[PATCH] tooltip: add update parametr to updateToolTip function
Rafał Miłecki
zajec5 at gmail.com
Tue Apr 1 18:18:12 CEST 2008
2008/4/1, Rafał Miłecki <zajec5 at gmail.com>:
> void updateToolTip(bool update) {
> m_isToolTipShown = update;
> }
>
> That is something we need in digital clock. We use Plasma::DataEngine
> to update time in panel but we have no idea when updating tooltip
> content is needed. With this updateToolTip(bool update) we will know.
Question from IRC:
<pinda> Zajec: I've just looked at it, but it's not clear to me why
that's necesarry.. according to the comments, updateToolTip get's
called just before showing the tooltip. why do you also want to know
when the tooltip get's hidden?
To make clear why I need this for digital clock:
In digital clock we use Plasma::DataEngine and connectSource(...) with
interval 1sec or 60secs (depending on user's configuration).
DataEngine calls dataUpdated(...) every that interval and inside this
function we update displayed time in panel + displayed time in tooltip
- even if it's not displayed (tooltip). That causes a lot of unneeded
updates when tooltip is not visible.
Problem will be even bigger when we introduce multizones support (I
have patch 90% ready). For each timezone we will use single query and
we will add response to tooltip. That will cause horribly big amount
on unneeded operations.
With this patch I can track visibility on tooltip and avoid updating
text inside tooltip (I won't update it when tooltip is invisible).
--
Rafał Miłecki
More information about the Panel-devel
mailing list