Re: [evolution-patches] folder.expunged and message.changed events



On Mon, 2005-01-17 at 00:10 -0500, Nat Friedman wrote:
Hi Michael,

On Mon, 2005-01-17 at 12:26 +0800, Not Zed wrote:

> Since folder.changed has no detail on how it changed, it would
> probably make sense to just extend its target to include a
> CamelFolderChangeInfo, then you can extrapolate a message.changed and
> folder.expunged equivalent from that yourself.  The source camel event
> folder_changed does include this info so it probably wouldn't be too
> hard to add to the target.

Ah, all excellent points.  That was very educational for me.
Thanks :-).

I was looking at implementing this, and noticed that folder.changed is
emitted from real_flush_updates() and not from folder_changed().  Is
there a good reason for this?  It'd be a lot easier to add the
CamelFolderChangeInfo to the event target in folder_changed.

One reason is to serialise everything.  The main reason though is to run it from the main thread, as camel events can come in from any thread.  So it must remain where it is.  changeinfo's can be easily copied (.new()+.cat()), so it shouldn't be a major task to add in another pointer to the update job.

--
Michael Zucchi <notzed ximian com>
"Ride, Work, Sleep. Beer."
Novell's Evolution and Free Software Developer


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]