From kde-panel-devel Tue Apr 01 16:18:12 2008 From: "=?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?=" Date: Tue, 01 Apr 2008 16:18:12 +0000 To: kde-panel-devel Subject: Re: [PATCH] tooltip: add update parametr to updateToolTip function Message-Id: X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=120716457801481 2008/4/1, Rafał Miłecki : > 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: 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 _______________________________________________ Panel-devel mailing list Panel-devel@kde.org https://mail.kde.org/mailman/listinfo/panel-devel