[PATCH] tooltip: add update parametr to updateToolTip function

Rafał Miłecki zajec5 at gmail.com
Tue Apr 1 22:28:22 CEST 2008


2008/4/1, Ismael Asensio <caciquecola500 at gmail.com>:
> > > 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.
> >
>
> Sorry if I say something stupid here but to solve this issue couldn't the
> tooltip just get updated before it is shown (updateToolTip), that is,
> retrieving the time from all the required timezones and then, for the
> seconds, get synced with the seconds info provided by the plasmoid itself
> (If I understood it right, via data Updated).

Just imagine what will happen if user configured widget to show seconds.

Function updateToolTip() is called, so we change tooltip's content and
tooltip is displayed. That's fine. But now user wants to watch time
and he doesn't move cursor out ot widget. Tooltip keeps displayed so
updateToolTip is not called anymore. The result is that time in
tooltip is not updated.

You may also find discussion
http://lists.kde.org/?t=120689879200003&r=1&w=2 interesting.

-- 
Rafał Miłecki


More information about the Panel-devel mailing list