On Wed, 2011-01-05 at 08:25 -0500, Matthew Barnes wrote:
> Both the backend factory class and the ESource extension types have to
> be registered with g_type_module_register_type(), and the GTypeModule
> isn't available from the class init function.
> Here's the workaround I'm currently having to add to almost every
> backend.  The lengthy comment explains a bit more technical detail. 

Ah, I see, quite complicated. The g_type_module_register_type() says:
   As long as any instances of the type exist, the type plugin
   will not be unloaded.
Whatever that means. Though if it means what I would expect from it,
then registering unconditionally all types in eds_module_initialize()
and "dereferencing" those special types in eds_module_shutdown() may
cause unload of the module.

Nonetheless this is just a theory, and I believe the usage of this
showed you that it doesn't behave this way, thus you've a green from my
side, even I would prefer less intrusive change for providers of
calendar/book backends.

Does the proposed change (in ESourceGroup/ESource) also mean that each
backend should provide its own ESourceExtension when it'll need to set
some custom attributes on an ESourceGroup/ESource? I hope not.

evolution-hackers mailing list
To change your list options or unsubscribe, visit ...

Reply via email to