[Panel-devel] Applet updating

Petri Damsten petri.damsten at iki.fi
Sun Sep 16 18:49:46 CEST 2007


On Sunday 16 September 2007 18:43:13 Aaron J. Seigo wrote:
> On Sunday 16 September 2007, Petri Damsten wrote:
> > Trying to get applet update behave similarly whether data is ready in
> > DataEngine::updateSource() or not. After all applet writer should not
> > have to know how engine gets it's data.
>
> what's the use care for where it matters?

I try to solve the issue that news applet doesn't work at all at the moment 
and would like to see updated called similarly whether engine has the data or 
has to wait for it.

> > 1. Data might not be ready yet so don't call update yet. It gets called
> > when engine calls setData.
>
> which breaks every call to connectSource to existing data sources. this
> part of the patch is wrong.

OK, didn't thought that. Well it's just one extra updated call if data isn't 
ready.

> > 2. Call source with createWhenMissing true so DataContainer gets created
> > even if setData is not called in DataEngine::updateSource()
>
> this is incorrect; if the engine rejects the source request (returns false)
> the source should not be created.

But if sourceRequested returns false it doesn't get to the source call (the 
second one)?

> > 3. queue to true so updated gets called after first setData
>
> hm.. doesn't it already? or is this a side effect of not calling updated
> immediately as per point #1?

Yes for engines which setData in updateSource but not for the engines that has 
to wait for the data. If #1 call is there I guess it could be:
if (!dc->hasUpdates()) {  
		m_queued = true; 
}
     
Petri

-- 
AIRPORTS: A place where people hurry up and wait.
           (Terry Pratchett, Wings)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070916/85d3fec0/attachment.pgp 


More information about the Panel-devel mailing list