GNOME Bugzilla – Bug 620057
Support for construction-time extension properties
Last modified: 2010-07-27 18:54:33 UTC
Currently, extensions are created with zero dynamic arguments. It would be nice if we were able to give some arguments during the creation, through GObject properties. For exemple, PeasActivatable (which are usually per-object) now has such an interface: iface PeasActivatable { PeasActivatable(); void activate(object); void deactivate(object); } Support for construction-time properties would allow something like this: iface PeasActivatable { PeasActivatable(object); void activate(); void deactivate(); }
Created attachment 166035 [details] [review] Add support for construct-properties for extensions.
Created attachment 166036 [details] [review] Change PeasActivatable to take the object as a construct property. This makes it more explicit that a PeasActivatable instance is bound to a single object. It makes the C plugin code a bit more tedious, but the changes in the python and seed code are very tight. The Seed plugin part depends on Seed bugfixes attached to bug 624560 and 624562.
Created attachment 166172 [details] [review] [PeasEngine] Rename get_extension() to create_extension() This is closer to the actual behaviour of that function.
Attachment 166035 [details] pushed as 5c6d89f - Add support for construct-properties for extensions. Attachment 166036 [details] pushed as 1c6a2e3 - Change PeasActivatable to take the object as a construct property. Attachment 166172 [details] pushed as 754bc3a - [PeasEngine] Rename get_extension() to create_extension()