GNOME Bugzilla – Bug 683415
UOA provider plugins should each return a unique GType
Last modified: 2012-09-06 09:00:20 UTC
The UOA control center panel loads each provider plugin and registers the type with the value returned from ap_module_get_object_type() in the plugin. For this to work correctly, no plugin can have the same GType as another one. The UOA panel currently crashes, after some warnings from GObject about the failed type registration, when switching between two Empathy plugins because all the Empathy provider plugins share the same ap_module_get_object_type() method and therefore the same GType. The fix would be to make each plugin subclass the main EmpathyAccountsPlugin type (or ApPlugin directly) and return a distinct GType. This can probably be done in the plugin generator relatively easily.
Created attachment 223540 [details] [review] Generate one GType per UOA protocol plugin Each plugin now has its own GType inheriting from EmpathyAccountsPlugin. That's cleaner and avoid to try to register the same GType more than once.
Created attachment 223543 [details] [review] Generate one GType per UOA protocol plugin Each plugin now has its own GType inheriting from EmpathyAccountsPlugin. That's cleaner and avoid to try to register the same GType more than once.
You'll have the same problem when registering the base class type and the widget type as well. AFAIK they need to be in a shared lib.
Created attachment 223609 [details] [review] Move account plugins to their own dir
Created attachment 223610 [details] [review] UOA account plugins: move shared code to a shared lib Avoid to redefine existing symbols when different plugins are loaded.
Attachment 223543 [details] pushed as 006b27d - Generate one GType per UOA protocol plugin Attachment 223609 [details] pushed as b73b93e - Move account plugins to their own dir Attachment 223610 [details] pushed as d001dd2 - UOA account plugins: move shared code to a shared lib